主题 : 求助:Unable to handle kernel NULL pointer dereference at virt ual address 00000000 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 55342
精华: 0
发帖: 11
金钱: 60 两
威望: 12 点
综合积分: 22 分
注册时间: 2011-09-16
最后登录: 2012-04-28
楼主  发表于: 2012-01-04 14:43

 求助:Unable to handle kernel NULL pointer dereference at virt ual address 00000000

我用的是micro2440,编了一个qtopia的界面,需要用到三路AD。
于是找了一个ad的驱动修改了一下,这样一次可以读出三路的数据,用insmod命令加载。
之后又谢了一个测试程序,可以成功读出三路的电压数值。
于是着手qtopia界面的编写,但是奇怪的是:板子启动后如果先运行一下测试程序,然后ctrl+c停掉,再启动界面就没事;如果启动好后没有运行测试程序,而是直接在触摸屏上点击界面的图标,就会出错,超级终端收到的字符如下:
Unable to handle kernel NULL pointer dereference at virtua
l address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 17 [#1]
last sysfs file: /sys/devices/virtual/vc/vcsa2/dev
Modules linked in: my_mlx90614_driver my_pin_driver pwm_2 pwm_1 pwm_0 s3c2440_ad
c
CPU: 0    Not tainted  (2.6.32.2 #6)
PC is at __wake_up_common+0x2c/0x88
LR is at __wake_up+0x2c/0x38
pc : [<c00440d4>]    lr : [<c004415c>]    psr: a0000093
sp : c0437e68  ip : 00000000  fp : c0437e94
r10: 00000003  r9 : 00000000  r8 : 00000000
r7 : 00000001  r6 : bf000574  r5 : 00000001  r4 : a0000013
r3 : 00000000  r2 : 00000001  r1 : 00000003  r0 : 00000000
Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: c000717f  Table: 33acc000  DAC: 00000017
Process swapper (pid: 0, stack limit = 0xc0436270)
Stack: (0xc0437e68 to 0xc0438000)
7e60:                   00000000 a0000013 00000001 000000c0 00000050 3001ede8
7e80: 41129200 3001edb4 c0437eb4 c0437e98 c004415c c00440b8 00000000 00000040
7ea0: c0437ec4 c3a86280 c0437ec4 c0437eb8 bf000210 c0044140 c0437ee4 c0437ec8
7ec0: c0070500 bf000200 c0440a7c c38fa080 00000050 c049190c c0437f04 c0437ee8
7ee0: c0072000 c00704b0 00000002 c044c32c 00000000 c043a448 c0437f1c c0437f08
7f00: c0039b58 c0071f68 0000002f c044c32c c0437f3c c0437f20 c002f044 c0039b10
7f20: ffffffff f4000000 80000000 c043a448 c0437f94 c0437f40 c002fb04 c002f010
7f40: f4100000 00000032 f4100000 60000013 c0436000 c046e1c4 c043a450 c043a448
7f60: 3001ede8 41129200 3001edb4 c0437f94 c0437f98 c0437f88 c003164c c0031064
7f80: 60000013 ffffffff c0437fb4 c0437f98 c003164c c0030fe4 c049198c c046df60
7fa0: c0020000 c043a448 c0437fc4 c0437fb8 c0338964 c00315e4 c0437ff4 c0437fc8
7fc0: c00089a8 c0338918 c00084f4 00000000 00000000 c0020ca0 00000000 c0007175
7fe0: c046e270 c0020c9c 00000000 c0437ff8 30008034 c00087ac 00000000 00000000
Backtrace:
[<c00440a8>] (__wake_up_common+0x0/0x88) from [<c004415c>] (__wake_up+0x2c/0x38)

[<c0044130>] (__wake_up+0x0/0x38) from [<bf000210>] (adcdone_int_handler+0x20/0x
2c [s3c2440_adc])
r4:c3a86280
[<bf0001f0>] (adcdone_int_handler+0x0/0x2c [s3c2440_adc]) from [<c0070500>] (han
dle_IRQ_event+0x60/0x130)
[<c00704a0>] (handle_IRQ_event+0x0/0x130) from [<c0072000>] (handle_edge_irq+0xa
8/0x16c)
r7:c049190c r6:00000050 r5:c38fa080 r4:c0440a7c
[<c0071f58>] (handle_edge_irq+0x0/0x16c) from [<c0039b58>] (s3c_irq_demux_adc+0x
58/0x84)
r7:c043a448 r6:00000000 r5:c044c32c r4:00000002
[<c0039b00>] (s3c_irq_demux_adc+0x0/0x84) from [<c002f044>] (asm_do_IRQ+0x44/0x8
c)
r5:c044c32c r4:0000002f
[<c002f000>] (asm_do_IRQ+0x0/0x8c) from [<c002fb04>] (__irq_svc+0x24/0xa0)
Exception stack(0xc0437f40 to 0xc0437f88)
7f40: f4100000 00000032 f4100000 60000013 c0436000 c046e1c4 c043a450 c043a448
7f60: 3001ede8 41129200 3001edb4 c0437f94 c0437f98 c0437f88 c003164c c0031064
7f80: 60000013 ffffffff
r7:c043a448 r6:80000000 r5:f4000000 r4:ffffffff
[<c0030fd4>] (default_idle+0x0/0x9c) from [<c003164c>] (cpu_idle+0x78/0xb0)
[<c00315d4>] (cpu_idle+0x0/0xb0) from [<c0338964>] (rest_init+0x5c/0x70)
r7:c043a448 r6:c0020000 r5:c046df60 r4:c049198c
[<c0338908>] (rest_init+0x0/0x70) from [<c00089a8>] (start_kernel+0x20c/0x27c)
[<c000879c>] (start_kernel+0x0/0x27c) from [<30008034>] (0x30008034)
Code: e1560000 e1a0a001 e1a07002 e59b9004 (e41c300c)
---[ end trace 958ce703ab55e533 ]---
Kernel panic - not syncing: Fatal exception in interrupt
Backtrace:
[<c0034270>] (dump_backtrace+0x0/0x10c) from [<c033b11c>] (dump_stack+0x18/0x1c)

r7:c00440d4 r6:c046e7d0 r5:c0437c7f r4:c00440d4
[<c033b104>] (dump_stack+0x0/0x1c) from [<c033b16c>] (panic+0x4c/0x134)
[<c033b120>] (panic+0x0/0x134) from [<c0034580>] (die+0x204/0x240)
r3:00010000 r2:c043d638 r1:00004f50 r0:c03d9470
[<c003437c>] (die+0x0/0x240) from [<c0036934>] (__do_kernel_fault+0x6c/0x7c)
[<c00368c8>] (__do_kernel_fault+0x0/0x7c) from [<c0036a8c>] (do_page_fault+0x148
/0x200)
r7:c04397c0 r6:00000000 r5:00000000 r4:c043a618
[<c0036944>] (do_page_fault+0x0/0x200) from [<c002f28c>] (do_DataAbort+0x40/0xa4
)
[<c002f24c>] (do_DataAbort+0x0/0xa4) from [<c002fac0>] (__dabt_svc+0x40/0x60)
Exception stack(0xc0437e20 to 0xc0437e68)
7e20: 00000000 00000003 00000001 00000000 a0000013 00000001 bf000574 00000001
7e40: 00000000 00000000 00000003 c0437e94 00000000 c0437e68 c004415c c00440d4
7e60: a0000093 ffffffff
[<c00440a8>] (__wake_up_common+0x0/0x88) from [<c004415c>] (__wake_up+0x2c/0x38)

[<c0044130>] (__wake_up+0x0/0x38) from [<bf000210>] (adcdone_int_handler+0x20/0x
2c [s3c2440_adc])
r4:c3a86280
[<bf0001f0>] (adcdone_int_handler+0x0/0x2c [s3c2440_adc]) from [<c0070500>] (han
dle_IRQ_event+0x60/0x130)
[<c00704a0>] (handle_IRQ_event+0x0/0x130) from [<c0072000>] (handle_edge_irq+0xa
8/0x16c)
r7:c049190c r6:00000050 r5:c38fa080 r4:c0440a7c
[<c0071f58>] (handle_edge_irq+0x0/0x16c) from [<c0039b58>] (s3c_irq_demux_adc+0x
58/0x84)
r7:c043a448 r6:00000000 r5:c044c32c r4:00000002
[<c0039b00>] (s3c_irq_demux_adc+0x0/0x84) from [<c002f044>] (asm_do_IRQ+0x44/0x8
c)
r5:c044c32c r4:0000002f
[<c002f000>] (asm_do_IRQ+0x0/0x8c) from [<c002fb04>] (__irq_svc+0x24/0xa0)
Exception stack(0xc0437f40 to 0xc0437f88)
7f40: f4100000 00000032 f4100000 60000013 c0436000 c046e1c4 c043a450 c043a448
7f60: 3001ede8 41129200 3001edb4 c0437f94 c0437f98 c0437f88 c003164c c0031064
7f80: 60000013 ffffffff
r7:c043a448 r6:80000000 r5:f4000000 r4:ffffffff
[<c0030fd4>] (default_idle+0x0/0x9c) from [<c003164c>] (cpu_idle+0x78/0xb0)
[<c00315d4>] (cpu_idle+0x0/0xb0) from [<c0338964>] (rest_init+0x5c/0x70)
r7:c043a448 r6:c0020000 r5:c046df60 r4:c049198c
[<c0338908>] (rest_init+0x0/0x70) from [<c00089a8>] (start_kernel+0x20c/0x27c)
[<c000879c>] (start_kernel+0x0/0x27c) from [<30008034>] (0x30008034)
级别: 新手上路
UID: 55342
精华: 0
发帖: 11
金钱: 60 两
威望: 12 点
综合积分: 22 分
注册时间: 2011-09-16
最后登录: 2012-04-28
1楼  发表于: 2012-01-04 16:16
不知道有没有哪位大侠帮个忙看看哈
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2012-01-04 18:17

Backtrace:
[<c00440a8>] (__wake_up_common+0x0/0x88) from [<c004415c>] (__wake_up+0x2c/0x38)

[<c0044130>] (__wake_up+0x0/0x38) from [<bf000210>] (adcdone_int_handler+0x20/0x
2c [s3c2440_adc])

adcdone_int_handler调用wake_up的时候用了NULL指针?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 55342
精华: 0
发帖: 11
金钱: 60 两
威望: 12 点
综合积分: 22 分
注册时间: 2011-09-16
最后登录: 2012-04-28
3楼  发表于: 2012-01-05 11:03

 回 2楼(kasim) 的帖子

麻烦您帮忙看一下,谢谢了 [attachment=3313]
附件设置隐藏,需要回复后才能看到
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2012-01-05 12:46

 回 3楼(stev_yang11) 的帖子

抱歉,debug的事情还是得靠你自己。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."