On Sep 10, 2005, at 9:33 AM, Radek Podgorny wrote:
Hello,
I've been playing with the 2.6 kernel lately and I'm experiencing the
following problem which I can't solve. I compile everything into
the kernel
(no modules). When booting I always get:
Unable to handle kernel NULL pointer dereference at virtual address
00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: f5 [#1]
Modules linked in:
CPU: 0
PC is at samcop_sdi_probe+0xb0/0x244
LR is at setup_irq+0x124/0x148
pc : [<c0124788>] lr : [<c001d4c0>] Not tainted
sp : c02c5f2c ip : c02c5ee0 fp : c02c5f54
r10: 00000000 r9 : 00000000 r8 : 00000000
r7 : c02fb208 r6 : c03a73a0 r5 : c03a742c r4 : 00000000
r3 : 00000000 r2 : c02c4000 r1 : 00000003 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 Segment kernel
Control: 397F Table: A0004000 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc02c4194)
Stack: (0xc02c5f2c to 0xc02c6000)
5f20: c03a742c c02fb208 00000000
c01bd748 c01bd748
5f40: 00000000 00000000 c02c5f70 c02c5f58 c0102b60 c01246e4
c02fb2b0 c02c5f88
5f60: c0102c58 c02c5f84 c02c5f74 c0102ca4 c0102b10 00000000
c02c5fb0 c02c5f88
5f80: c0102448 c0102c64 c01bc31c c01bc31c c02fb248 c01bd75c
c01bd748 00000001
5fa0: c01bc234 c02c5fd8 c02c5fb4 c0102720 c0102404 c02c4000
c0019744 00000001
5fc0: 00000000 00000000 00000000 c02c5ff4 c02c5fdc c001b0e4
c01026c0 00000000
5fe0: 00000000 00000000 00000000 c02c5ff8 c0038688 c001b06c
c00e5b14 c00e5b28
Backtrace:
[<c01246d8>] (samcop_sdi_probe+0x0/0x244) from [<c0102b60>]
(driver_probe_device
+0x5c/0xa8)
[<c0102b04>] (driver_probe_device+0x0/0xa8) from [<c0102ca4>]
(__driver_attach+0
x4c/0x78)
r6 = C0102C58 r5 = C02C5F88 r4 = C02FB2B0
[<c0102c58>] (__driver_attach+0x0/0x78) from [<c0102448>]
(bus_for_each_dev+0x50
/0x8c)
r4 = 00000000
[<c01023f8>] (bus_for_each_dev+0x0/0x8c) from [<c0102720>]
(bus_add_driver+0x6c/
0x114)
r7 = C01BC234 r6 = 00000001 r5 = C01BD748 r4 = C01BD75C
[<c01026b4>] (bus_add_driver+0x0/0x114) from [<c001b0e4>] (init
+0x84/0x1cc)
[<c001b060>] (init+0x0/0x1cc) from [<c0038688>] (do_exit+0x0/0xba4)
r6 = 00000000 r5 = 00000000 r4 = 00000000
Code: e3e04001 ea000054 e5953010 e3a01003 (e5930000)
<0>Kernel panic - not syncing: Attempted to kill init!
I've found the problem is that in samcop_sdi.c in function
samcop_sdi_probe(),
there is plat variable which gets value from dev->platform_data.
The problem
is this value is NULL and it's not verified anywhere. Later on, it's
dereferenced which takes the kernel down.
I can't continue in looking further because I don't know where the
platform_data var is being filled in. Can you please give me some
hints or
take a look at it yourselves?
Thanks...
Radek Podgorny
Radek,
Dev->platform_data is set in arch/arm/common/ipaq/hamcop_base.c in
the hamcop_block structure for SD.
Are you running this kernel on h5400? Currently samcop_sdi.c only
works on h2200; I have a few more changes to make before it can be
used on h5400. Would you like to do that? It should be easy.
Matt