现在的位置: 首页 > 综合 > 正文

操作寄存器错误Unable to handle kernel NULL pointer dereference at virtual address的解决办法

2013年09月15日 ⁄ 综合 ⁄ 共 2618字 ⁄ 字号 评论关闭

i=0

readnflash i=0
nandll_read_page addr=0x400000
Unable to handle kernel NULL pointer dereference at virtual address 00000004
pgd = c107c000
[00000004] *pgd=31f5d031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1]
Modules linked in: lcm(+) [last unloaded: lcm]
CPU: 0    Not tainted  (2.6.26 #13)
PC is at nandll_read_page+0x20/0xd8 [lcm]
LR is at release_console_sem+0x198/0x1b4
pc : [<bf00078c>]    lr : [<c00418d8>]    psr: 60000013
sp : c1f55e20  ip : 00000000  fp : c1f55e3c
r10: c286fbc8  r9 : c1f41f9c  r8 : bf004080
r7 : 00000001  r6 : bf0041e3  r5 : 00000000  r4 : 00400000
r3 : c02f7a3c  r2 : c02f7a70  r1 : 00001859  r0 : 00000023
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: c000717f  Table: 3107c000  DAC: 00000015
Process insmod (pid: 848, stack limit = 0xc1f54268)
Stack: (0xc1f55e20 to 0xc1f56000)
5e20: 00000000 00400000 bf0041e3 00000001 c1f55e5c c1f55e40 bf00087c bf00077c
5e40: 00400000 00000001 00000020 0000001f c1f55e74 c1f55e60 bf0008d4 bf000854
5e60: bf0ffdf0 ffffffff c1f55e9c c1f55e78 bf001d44 bf0008ac bf001fdc c1f55e94
5e80: c1f55eb4 00000000 bf0ffdf0 00000001 c1f55eb4 c1f55ea0 bf001e9c bf001bb8
5ea0: c1dbc1a0 00000001 c1f55fa4 c1f55eb8 c0061394 bf001ddc 00000000 00000000
5ec0: c1c64cc0 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5ee0: 00000000 00000000 00000005 00000000 00000000 00000000 00000000 c2875278
5f00: c1dc34e0 c286fa9b c285d000 c2870050 c286fd30 c28605fc 0000008a 0000008a
5f20: c008b874 c1f54000 bf0040c8 c1f55f38 bf003cc4 0000001d c2870078 bf00408c
5f40: 0000001f c28700a0 00000000 00000000 00000000 00000000 00000000 00000000
5f60: 00000000 00000000 00000000 00000000 00000000 00000000 c1f55fa4 00000001
5f80: 00000000 becafea8 00000080 c0026c68 c1f54000 00000000 00000000 c1f55fa8
5fa0: c0026ac0 c005feb0 00000001 00000000 000df038 0001859b 000ca88b 00000000
5fc0: 00000001 00000000 becafea8 00000080 becafea4 becafea8 00000001 becafea4
5fe0: 00000069 becafb6c 0001fe08 4019ac24 60000010 000df038 00000000 00000000
Backtrace:
[<bf00076c>] (nandll_read_page+0x0/0xd8 [lcm]) from [<bf00087c>] (readnflash+0x3
8/0x58 [lcm])
 r7:00000001 r6:bf0041e3 r5:00400000 r4:00000000
[<bf000844>] (readnflash+0x0/0x58 [lcm]) from [<bf0008d4>] (zikucopytoram+0x38/0
x124 [lcm])
 r7:0000001f r6:00000020 r5:00000001 r4:00400000
[<bf00089c>] (zikucopytoram+0x0/0x124 [lcm]) from [<bf001d44>] (beep_test+0x19c/
0x224 [lcm])
 r5:ffffffff r4:bf0ffdf0
[<bf001ba8>] (beep_test+0x0/0x224 [lcm]) from [<bf001e9c>] (DEMO_init_module+0xd
0/0x104 [lcm])
 r6:00000001 r5:bf0ffdf0 r4:00000000
[<bf001dcc>] (DEMO_init_module+0x0/0x104 [lcm]) from [<c0061394>] (sys_init_modu
le+0x14f4/0x1638)
 r5:00000001 r4:c1dbc1a0
[<c005fea0>] (sys_init_module+0x0/0x1638) from [<c0026ac0>] (ret_fast_syscall+0x
0/0x2c)
Code: e1a06000 e59f00ac e1a04001 eb4b6db2 (e1d520b4)
---[ end trace ba62362d42a84e2c ]---
Segmentation fault

物理地址没有映射到虚拟地址的原因。参考LDD3,申请IO内存,重映射IO内存后就可以读写寄存器,不会出现这个错误。

抱歉!评论已关闭.