- 积分
- 55
贡献340
飞刀87 FD
注册时间2016-12-12
在线时间10 小时
扫一扫,手机访问本帖
|
本人按照飞凌ok210软件手册-v2.0-linux2.6-2015-08-20上写的步骤编译了资料里的uboot,内核以及文件系统,烧到开发板上后可以正常使用,但是当把sdio wifi(RTL8189ES)插到开发板上后再上电就出现如下错误:unable to handle kernel NULL pointer deference at virtual address 00000000;
[ 2.603432] RTL871X: <==== ReadAdapterInfo8188ES in 359 ms
[ 2.609037] RTL871X: init_channel_set ChannelPlan ID 20 Chan num:13
[ 2.616007] RTL871X: rtw_register_early_suspend
[ 2.619829] RTL871X: rtw_macaddr_cfg MAC Address = 34:c3:d2:0b:f5:5a
[ 2.626255] RTL871X: bDriverStopped:1, bSurpriseRemoved:0, bup:0, hw_init_completed:0
[ 2.634037] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 2.642096] pgd = c0004000
[ 2.644842] [00000000] *pgd=00000000
[ 2.648307] Internal error: Oops: 805 [#1] PREEMPT
[ 2.653065] last sysfs file:
[ 2.656012] Modules linked in:
[ 2.659048] CPU: 0 Not tainted (2.6.35.7 #1)
[ 2.663649] PC is at memcpy+0xb4/0x330
[ 2.667365] LR is at 0xbd2c334
[ 2.670400] pc : [<c01f2294>] lr : [<0bd2c334>] psr: 00000013
[ 2.670406] sp : efd07d44 ip : 0000001c fp : efd07d6c
[ 2.681837] r10: 00004108 r9 : 00004044 r8 : efe7c800
[ 2.687036] r7 : 00000000 r6 : efe7c800 r5 : efea1800 r4 : f08b9000
[ 2.693536] r3 : f08bc07b r2 : ffffffe6 r1 : f08bc0b4 r0 : 00000000
[ 2.700036] Flags: nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 2.707315] Control: 10c5387d Table: 20004019 DAC: 00000017
以下是backtrace:
[ 3.535238] Backtrace:
[ 3.537681] [<c02e0854>] (_rtw_memcpy+0x0/0x14) from [<c02e2b64>] (rtw_drv_register_netdev+0xb8/0x178)
[ 3.546946] [<c02e2aac>] (rtw_drv_register_netdev+0x0/0x178) from [<c02e3680>] (rtw_drv_init+0x9c/0xd4)
[ 3.556304] [<c02e35e4>] (rtw_drv_init+0x0/0xd4) from [<c042cc34>] (sdio_bus_probe+0x64/0x70)
[ 3.564789] r7:00000000 r6:c05f6bc0 r5:c085b138 r4:efe57a00
[ 3.570430] [<c042cbd0>] (sdio_bus_probe+0x0/0x70) from [<c0260148>] (driver_probe_device+0xb0/0x160)
[ 3.579607] r7:c085b138 r6:c0260284 r5:efe57a08 r4:c085b138
[ 3.585246] [<c0260098>] (driver_probe_device+0x0/0x160) from [<c02602c8>] (__device_attach+0x44/0x48)
[ 3.594512] r7:efe57c00 r6:c0260284 r5:efe57a08 r4:c085b138
[ 3.600151] [<c0260284>] (__device_attach+0x0/0x48) from [<c025f63c>] (bus_for_each_drv+0x50/0x90)
[ 3.609070] r5:00000000 r4:efe57a08
[ 3.612629] [<c025f5ec>] (bus_for_each_drv+0x0/0x90) from [<c0260350>] (device_attach+0x58/0x70)
[ 3.621376] r6:00000000 r5:efe57a08 r4:efe57a3c
[ 3.625975] [<c02602f8>] (device_attach+0x0/0x70) from [<c025f49c>] (bus_probe_device+0x2c/0x48)
[ 3.634721] r5:efe57a10 r4:efe57a08
[ 3.638280] [<c025f470>] (bus_probe_device+0x0/0x48) from [<c025de40>] (device_add+0x32c/0x4a0)
[ 3.646945] [<c025db14>] (device_add+0x0/0x4a0) from [<c042caa0>] (sdio_add_func+0x3c/0x54)
[ 3.655270] [<c042ca64>] (sdio_add_func+0x0/0x54) from [<c042c460>] (mmc_attach_sdio+0x2d8/0x364)
[ 3.664098] r5:00000000 r4:efea0400
[ 3.667658] [<c042c188>] (mmc_attach_sdio+0x0/0x364) from [<c04285f8>] (mmc_rescan+0x1cc/0x284)
[ 3.676326] [<c042842c>] (mmc_rescan+0x0/0x284) from [<c006e398>] (worker_thread+0x164/0x1f4)
[ 3.684809] r8:efd2a7d0 r7:efd2a7d8 r6:c042842c r5:efd06000 r4:efd2a7c0
[ 3.691491] [<c006e234>] (worker_thread+0x0/0x1f4) from [<c0071cb0>] (kthread+0x84/0x8c)
[ 3.699553] [<c0071c2c>] (kthread+0x0/0x8c) from [<c005f0d4>] (do_exit+0x0/0x5f0)
[ 3.706993] r7:00000013 r6:c005f0d4 r5:c0071c2c r4:efc37ed8
[ 3.712631] Code: e4805004 e4806004 e4807004 e4808004 (e480e004)
[ 3.718829] ---[ end trace 69fd16961b625491 ]
最后就卡在这不动了
[ 76.690667] FIMC0 registered successfully
[ 76.694539] FIMC1 registered successfully
[ 76.698524] FIMC2 registered successfully
[ 76.701416] DBUG_PORT must not use AFC!
根据Unable to handle kernel NULL pointer dereference at virtual address 00000000这个问题我找到PC is at memcpy+0xb4/0x330所指位置pc : [<c01f2294>],地址为../arch/arm/lib/copy_template.S中第142行,代码如下:
80 1: subs r2, r2, #(28)
81 stmfd sp!, {r5 - r8}
82 blt 5f
83
84 CALGN( ands ip, r0, #31 )
85 CALGN( rsb r3, ip, #32 )
86 CALGN( sbcnes r4, r3, r2 ) @ C is always set here
87 CALGN( bcs 2f )
88 CALGN( adr r4, 6f )
89 CALGN( subs r2, r2, r3 ) @ C gets set
90 CALGN( add pc, r4, ip )
91
92 PLD( pld [r1, #0] )
93 2: PLD( subs r2, r2, #96 )
94 PLD( pld [r1, #28] )
95 PLD( blt 4f )
96 PLD( pld [r1, #60] )
97 PLD( pld [r1, #92] )
98
99 3: PLD( pld [r1, #124] )
100 4: ldr8w r1, r3, r4, r5, r6, r7, r8, ip, lr, abort=20f
101 subs r2, r2, #32
102 str8w r0, r3, r4, r5, r6, r7, r8, ip, lr, abort=20f
103 bge 3b
104 PLD( cmn r2, #96 )
105 PLD( bge 4b )
106
107 5: ands ip, r2, #28
108 rsb ip, ip, #32
109 #if LDR1W_SHIFT > 0
110 lsl ip, ip, #LDR1W_SHIFT
111 #endif
112 addne pc, pc, ip @ C is always clear here
113 b 7f
114 6:
115 .rept (1 << LDR1W_SHIFT)
116 W(nop)
117 .endr
118 ldr1w r1, r3, abort=20f
119 ldr1w r1, r4, abort=20f
120 ldr1w r1, r5, abort=20f
121 ldr1w r1, r6, abort=20f
122 ldr1w r1, r7, abort=20f
123 ldr1w r1, r8, abort=20f
124 ldr1w r1, lr, abort=20f
125
126 #if LDR1W_SHIFT < STR1W_SHIFT
127 lsl ip, ip, #STR1W_SHIFT - LDR1W_SHIFT
128 #elif LDR1W_SHIFT > STR1W_SHIFT
129 lsr ip, ip, #LDR1W_SHIFT - STR1W_SHIFT
130 #endif
131 add pc, pc, ip
132 nop
133 .rept (1 << STR1W_SHIFT)
134 W(nop)
135 .endr
136 str1w r0, r3, abort=20f
137 str1w r0, r4, abort=20f
138 str1w r0, r5, abort=20f
139 str1w r0, r6, abort=20f
140 str1w r0, r7, abort=20f
141 str1w r0, r8, abort=20f
142 str1w r0, lr, abort=20f
143
144 CALGN( bcs 2b )
145
146 7: ldmfd sp!, {r5 - r8}
147
148 8: movs r2, r2, lsl #31
149 ldr1b r1, r3, ne, abort=21f
150 ldr1b r1, r4, cs, abort=21f
151 ldr1b r1, ip, cs, abort=21f
152 str1b r0, r3, ne, abort=21f
153 str1b r0, r4, cs, abort=21f
154 str1b r0, ip, cs, abort=21f
相应的汇编代码如下:
c01f21e0 <memcpy>:
c01f21e0: e92d4011 push {r0, r4, lr}
c01f21e4: e2522004 subs r2, r2, #4
c01f21e8: ba00002b blt c01f229c <memcpy+0xbc>
c01f21ec: e210c003 ands ip, r0, #3
c01f21f0: f5d1f000 pld [r1]
c01f21f4: 1a000030 bne c01f22bc <memcpy+0xdc>
c01f21f8: e211c003 ands ip, r1, #3
c01f21fc: 1a00003a bne c01f22ec <memcpy+0x10c>
c01f2200: e252201c subs r2, r2, #28
c01f2204: e92d01e0 push {r5, r6, r7, r8}
c01f2208: ba00000c blt c01f2240 <memcpy+0x60>
c01f220c: f5d1f000 pld [r1]
c01f2210: e2522060 subs r2, r2, #96 ; 0x60
c01f2214: f5d1f01c pld [r1, #28]
c01f2218: ba000002 blt c01f2228 <memcpy+0x48>
c01f221c: f5d1f03c pld [r1, #60] ; 0x3c
c01f2220: f5d1f05c pld [r1, #92] ; 0x5c
c01f2224: f5d1f07c pld [r1, #124] ; 0x7c
c01f2228: e8b151f8 ldm r1!, {r3, r4, r5, r6, r7, r8, ip, lr}
c01f222c: e2522020 subs r2, r2, #32
c01f2230: e8a051f8 stmia r0!, {r3, r4, r5, r6, r7, r8, ip, lr}
c01f2234: aafffffa bge c01f2224 <memcpy+0x44>
c01f2238: e3720060 cmn r2, #96 ; 0x60
c01f223c: aafffff9 bge c01f2228 <memcpy+0x48>
c01f2240: e212c01c ands ip, r2, #28
c01f2244: e26cc020 rsb ip, ip, #32
c01f2248: 108ff00c addne pc, pc, ip
c01f224c: ea000011 b c01f2298 <memcpy+0xb8>
c01f2250: e320f000 nop {0}
c01f2254: e4913004 ldr r3, [r1], #4
c01f2258: e4914004 ldr r4, [r1], #4
c01f225c: e4915004 ldr r5, [r1], #4
c01f2260: e4916004 ldr r6, [r1], #4
c01f2264: e4917004 ldr r7, [r1], #4
c01f2268: e4918004 ldr r8, [r1], #4
c01f226c: e491e004 ldr lr, [r1], #4
c01f2270: e08ff00c add pc, pc, ip
c01f2274: e320f000 nop {0}
c01f2278: e320f000 nop {0}
c01f227c: e4803004 str r3, [r0], #4
c01f2280: e4804004 str r4, [r0], #4
c01f2284: e4805004 str r5, [r0], #4
c01f2288: e4806004 str r6, [r0], #4
c01f228c: e4807004 str r7, [r0], #4
c01f2290: e4808004 str r8, [r0], #4
c01f2294:e480e004 str lr, [r0], #4
c01f2298: e8bd01e0 pop {r5, r6, r7, r8}
c01f229c: e1b02f82 lsls r2, r2, #31
c01f22a0: 14d13001 ldrbne r3, [r1], #1
c01f22a4: 24d14001 ldrbcs r4, [r1], #1
c01f22a8: 24d1c001 ldrbcs ip, [r1], #1
c01f22ac: 14c03001 strbne r3, [r0], #1
c01f22b0: 24c04001 strbcs r4, [r0], #1
c01f22b4: 24c0c001 strbcs ip, [r0], #1
c01f22b8: e8bd8011 pop {r0, r4, pc}
c01f22bc: e26cc004 rsb ip, ip, #4
c01f22c0: e35c0002 cmp ip, #2
c01f22c4: c4d13001 ldrbgt r3, [r1], #1
c01f22c8: a4d14001 ldrbge r4, [r1], #1
c01f22cc: e4d1e001 ldrb lr, [r1], #1
c01f22d0: c4c03001 strbgt r3, [r0], #1
c01f22d4: a4c04001 strbge r4, [r0], #1
c01f22d8: e052200c subs r2, r2, ip
c01f22dc: e4c0e001 strb lr, [r0], #1
c01f22e0: baffffed blt c01f229c <memcpy+0xbc>
c01f22e4: e211c003 ands ip, r1, #3
c01f22e8: 0affffc4 beq c01f2200 <memcpy+0x20>
c01f22ec: e3c11003 bic r1, r1, #3
这个问题有没有能帮忙解决的,万分感谢!!!!
|
|