2.4.17-rc1 kernel panic at boot
Hello,
I have a problem with booting 2.4.17-rc1 on a RS/6000 (43P-140), when Vortex support is compiled into the kernel.
01:03.0 Ethernet controller: 3Com Corporation 3c905 100BaseTX [Boomerang]
Flags: bus master, medium devsel, latency 32, IRQ 24 I/O ports at 3f7ffc00 [disabled] [size=64]
Expansion ROM at feef0000 [disabled] [size=64K]
Oops data:
ksymoops 2.4.3 on ppc 2.4.17-rc1. Options used
-V (default)
-k /proc/ksyms (default)
-L (specified)
-o /lib/modules/2.4.17-rc1/ (default)
-m /boot/System.map-2.4.17-rc1.vortex (specified)Error (regular_file): read_ksyms stat /proc/ksyms failed No modules in ksyms, skipping objects
3c59x: Donald Becker and others. www.scyld.com/network/vortex.html
Oops: kernel access of bad area, sig: 11 NIP: C0264050 XER: 00000000 LR: C0263F28 SP: C0E05DF0 REGS: c0e05d40 TRAP: 0300d
Using defaults from ksymoops -t elf32-powerpc -a powerpc:common
MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK = c0e04000[1] 'swapper' Last syscall: 120
last math 00000000 last altivec 00000000
GPR00: 00000800 C0E05DF0 C0E04000 C0368000 00000000 00000000 C03685FC C02A0000
GPR08: 00000368 BF7FFC0E 80000000 70000200 24000024 00000000 00000000 C0E08800
GPR16: C026F594 00000000 3F7FFC00 00000000 003FF000 00000000 00000000 00000000
GPR24: 00000000 C0370400 40000000 00000000 00000018 C0370540 FFFFFFF4 FFFFFFFF Call backtrace:
C0263F28 C0263C94 C010E230 C010E2C4 C0264998 C02507AC C02507F8 C0003B08 C000659C
Kernel panic: Attempted to kill init!
Warning (Oops_read): Code line not seen, dumping what data is available
Quoted 1 line
Quoted 1 line
NIP;
c0264050<vortex_probe1+394/cbc> <=====
Trace; c0263f28 <vortex_probe1+26c/cbc>
Trace; c0263c94 <vortex_init_one+44/6c>
Trace; c010e230 <pci_announce_device+54/80>
Trace; c010e2c4 <pci_register_driver+68/90>
Trace; c0264998 <vortex_init+20/bc>
Trace; c02507ac <do_initcalls+30/50>
Trace; c02507f8 <do_basic_setup+2c/3c>
Trace; c0003b08 <init+14/1ac>
Trace; c000659c <kernel_thread+2c/38>
1 warning and 1 error issued. Results may not be reliable.
I tried older kernels (2.4.15, 2.4.16) too, the error remained.
buga
Quoted 10 lines · BURJAN Gabor
Hello,
I have a problem with booting 2.4.17-rc1 on a RS/6000 (43P-140), when Vortex support is compiled into the kernel.
...
Quoted 1 line
Quoted 1 line
NIP;
c0264050<vortex_probe1+394/cbc> <=====Trace;
c0263f28<vortex_probe1+26c/cbc>
That's a big function, unfortunately. Could you please
do the following?
In the top-level makefile, add the line:
CFLAGS += -g
right at the end. Then rebuild the kernel, recreate the
crash, then run:
gdb vmlinux
(gdb) l *0xc0264050
(Assuming that this is still the NIP address after you've rebuilt).
This should point us at the source code where the problem is occurring.
Thanks.
Quoted 9 lines · Andrew Morton
Quoted 2 lines · BURJAN Gabor
Quoted 1 line
Quoted 1 line
NIP;
c0264050<vortex_probe1+394/cbc> <=====Trace;
c0263f28<vortex_probe1+26c/cbc>That's a big function, unfortunately. Could you please
do the following?In the top-level makefile, add the line:
Quoted 7 lines
CFLAGS += -g
right at the end. Then rebuild the kernel, recreate the
crash, then run:gdb vmlinux
(gdb) l *0xc0264050
Not need to go quite that far. It is not necessary to recompile the entire kernel nor do you need to boot a kernel to get the source code for an instruction.
cd linux
rm drivers/net/3c59x.o
make CFLAGS_3c59x.o=-g vmlinux
s=$(sed -ne '/vortex_probe1/s/ .*//p' System.map | tr '[a-z]' '[A-Z]') e=$(echo -e "obase=16\nibase=16\n$s+500" | bc)
objdump -S --start-address=0x$s --stop-address=0x$e vmlinux
That recompiles just 3c59x.o with -g and dumps the first 0x500 bytes of vortex_probe1, including the source code.
Hello,
Quoted 10 lines · Keith Owens
Not need to go quite that far. It is not necessary to recompile the entire kernel nor do you need to boot a kernel to get the source code for an instruction.
cd linux
rmdrivers/net/3c59x.o
make CFLAGS_3c59x.o=-g vmlinux
s=$(sed -ne '/vortex_probe1/s/ .*//p' System.map | tr '[a-z]' '[A-Z]') e=$(echo -e "obase=16\nibase=16\n$s+500" | bc)
objdump -S --start-address=0x$s --stop-address=0x$e vmlinux
I did this.
c0264048: 39 32 00 0e addi r9,r18,14
c026404c: 7d 29 52 14 add r9,r9,r10
c0264050: 91 7d 01 90 stw r11,400(r29) <==
vp->options = option;c0264054: 93 fd 01 8c stw r31,396(r29)
Full output: http://www.csoma.elte.hu/~burjang/objdump-2001-12-18.out
buga
Quoted 18 lines · BURJAN Gabor
Hello,
Quoted 10 lines · Keith Owens
Not need to go quite that far. It is not necessary to recompile the entire kernel nor do you need to boot a kernel to get the source code for an instruction.
cd linux
rmdrivers/net/3c59x.o
make CFLAGS_3c59x.o=-g vmlinux
s=$(sed -ne '/vortex_probe1/s/ .*//p' System.map | tr '[a-z]' '[A-Z]') e=$(echo -e "obase=16\nibase=16\n$s+500" | bc)
objdump -S --start-address=0x$s --stop-address=0x$e vmlinuxI did this.
Quoted 7 lines
c0264048: 39 32 00 0e addi r9,r18,14 c026404c: 7d 29 52 14 add r9,r9,r10 c0264050: 91 7d 01 90 stw r11,400(r29) <== vp->options = option;
c0264054: 93 fd 01 8c stw r31,396(r29)Full output: http://www.csoma.elte.hu/~burjang/objdump-2001-12-18.out
That particular statement looks OK. I'd be suspecting the next line:
EL3WINDOW(0);
which is a rather sickly macro which does an outw(N, ioaddr), where ioaddr was passed into the probe function from the PCI layer.
It seems that this is the first IO instruction which the driver executes, and that's a likely place for it to crash.
My guess would be that something has gone wrong with the PPC emulation of `outw' to this PCI device's IO space.
What I suggest you do is to add a
printk("ioaddr=%lx\n", ioaddr);immediately before that EL3WINDOW statement, then take it up on the appropriate PPC mailing list.
-
Quoted 3 lines · Andrew Morton
What I suggest you do is to add a
printk("ioaddr=%lx\n", ioaddr);
It says ioaddr=3f7ffc00, it's equal to what lspci shows.
buga