在linux下调tvp5150am1的过程中,遇到了一kernel oops,内容如下:
[ 66.714603] Unable to handle kernel paging request at virtual address 00100104
[ 66.721658] pgd = d37d0000
[ 66.724344] [00100104] *pgd=950c2831, *pte=00000000, *ppte=00000000
[ 66.730587] Internal error: Oops: 817 [#1] PREEMPT
[ 66.735351] Modules linked in: vpu_encoder vpu_decoder_ext vpu_decoder vpu_manager ufsd(P) ohci_hcd ehci_hcd tcc_ndd(P) tcc_mtd tcc_nand(P)
[ 66.747835] CPU: 0 Tainted: P (3.0.8-tcc #31)
[ 66.753481] PC is at cif_cam_isr_in8920+0x5c/0x368
[ 66.758234] LR is at cif_cam_isr_in8920+0x28/0x368
[ 66.763003] pc : [<c02acfb4>] lr : [<c02acf80>] psr: a0000193
[ 66.763013] sp : d0055f18 ip : 00000001 fp : 00000001
[ 66.774439] r10: 408b3f90 r9 : c0666058 r8 : 00000000
[ 66.779640] r7 : 00000000 r6 : 00000000 r5 : 00000085 r4 : c0673d70
[ 66.786141] r3 : c0673ee0 r2 : 00200200 r1 : 00100100 r0 : c0673ed8
[ 66.792642] Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
[ 66.799835] Control: 10c53c7d Table: 937d0059 DAC: 00000015
[ 66.805552]
[ 66.805556] PC: 0xc02acf34:
[ 66.809797] cf34 aa000001 e59f0014 eb04e57b e1a00006 e8bd807c c0673d70 c0591780 c02acf58
[ 66.817943] cf54 c0591c93 e92d47f0 e59f433c e5946014 e3560000 1a000080 e594372c e5933040
[ 66.826090] cf74 e3130040 0a0000c6 eb0006b3 e5d43000 e3530000 1a000069 e5d42001 e3520000
[ 66.834237] cf94 15c43000 1a000069 e5943748 e3530000 0a000008 e5932004 e2840f5a e5931000
[ 66.842384] cfb4 e5812004 e5821000 e594216c e584316c e8830005 e5823000 e59f42cc e3a0e05c
[ 66.850531] cfd4 e1a02004 e5d43120 e594c678 e5b20160 e5d41120 e023c39e e584174c e5843748
[ 66.858678] cff4 e5900000 e1500002 0a00003b e1530000 0a000039 e5933008 e1510003 0a000008
[ 66.866825] d014 e59f0288 eb04e544 e5943748 e59f0280 e5931008 eb04e540 e594274c e5943748
[ 66.874973]
[ 66.874978] LR: 0xc02acf00:
[ 66.879219] cf00 1a00000e e59fc040 e3a03020 e3a00085 e59f1038 e1a02005 e58d5004 e58dc000
[ 66.887365] cf20 ebf794b7 e2506000 a3a03001 a1a06005 a5c43744 aa000001 e59f0014 eb04e57b
[ 66.895512] cf40 e1a00006 e8bd807c c0673d70 c0591780 c02acf58 c0591c93 e92d47f0 e59f433c
[ 66.903660] cf60 e5946014 e3560000 1a000080 e594372c e5933040 e3130040 0a0000c6 eb0006b3
[ 66.911806] cf80 e5d43000 e3530000 1a000069 e5d42001 e3520000 15c43000 1a000069 e5943748
[ 66.919953] cfa0 e3530000 0a000008 e5932004 e2840f5a e5931000 e5812004 e5821000 e594216c
[ 66.928100] cfc0 e584316c e8830005 e5823000 e59f42cc e3a0e05c e1a02004 e5d43120 e594c678
[ 66.936247] cfe0 e5b20160 e5d41120 e023c39e e584174c e5843748 e5900000 e1500002 0a00003b
[ 66.944396]
[ 66.944400] SP: 0xd0055e98:
[ 66.948641] 5e98 1423a440 00000042 00000042 1443fd00 1423a440 00000042 c060bd28 00000042
[ 66.956788] 5eb8 00000000 ffffffff d0055f04 00000000 00000000 c003652c c0673ed8 00100100
[ 66.964935] 5ed8 00200200 c0673ee0 c0673d70 00000085 00000000 00000000 00000000 c0666058
[ 66.973082] 5ef8 408b3f90 00000001 00000001 d0055f18 c02acf80 c02acfb4 a0000193 ffffffff
[ 66.981228] 5f18 c576fee0 00000085 c0611654 00000000 00000000 c0666058 408b3f90 c0091494
[ 66.989375] 5f38 c0611654 c576fee0 d0055f60 c0611654 c061169c c576fee0 00000001 00000000
[ 66.997522] 5f58 d0054000 408b3f90 568f9dca c0091614 c0611654 c061169c 00000020 c00935e0
[ 67.005669] 5f78 00000020 00000001 00000020 c004030c 00000014 00000000 00000001 c00911a0
[ 67.013818]
[ 67.013822] R0: 0xc0673e58:
[ 67.018063] 3e58 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 67.026210] 3e78 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000003
[ 67.034357] 3e98 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 67.042504] 3eb8 00000000 00000000 00000000 00000000 00000000 00000000 c0673f3c c0674108
[ 67.050651] 3ed8 c0673ed8 c0673ed8 00100100 00200200 00000000 00000001 00012c00 00000000
[ 67.058798] 3ef8 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 67.066944] 3f18 00000001 00000000 00096000 00000000 00000000 00000000 00000000 00000000
[ 67.075092] 3f38 c0673d78 c0673f98 c0673ed0 00000001 00000001 00000000 00000002 00000001
[ 67.083240]
[ 67.083244] R3: 0xc0673e60:
[ 67.087485] 3e60 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 67.095632] 3e80 00000000 00000000 00000000 00000000 00000000 00000003 00000000 00000000
[ 67.103779] 3ea0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 67.111926] 3ec0 00000000 00000000 00000000 00000000 c0673f3c c0674108 c0673ed8 c0673ed8
[ 67.120073] 3ee0 00100100 00200200 00000000 00000001 00012c00 00000000 00000001 00000000
[ 67.128220] 3f00 00000000 00000000 00000000 00000000 00000000 00000000 00000001 00000000
[ 67.136367] 3f20 00096000 00000000 00000000 00000000 00000000 00000000 c0673d78 c0673f98
[ 67.144514] 3f40 c0673ed0 00000001 00000001 00000000 00000002 00000001 00000000 00000000
[ 67.152662]
[ 67.152666] R4: 0xc0673cf0:
[ 67.156907] 3cf0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 67.165054] 3d10 00000000 00000000 00000000 00000000 00000000 00000000 00000000 c06021a0
[ 67.173201] 3d30 d5bbd400 d5bc7380 d5c49ac0 00000032 c02ab8b0 c02ab8b4 00000280 000001e0
[ 67.181348] 3d50 56595559 00000001 000005a0 000a8c00 00000007 00000000 00000280 000001e0
[ 67.189495] 3d70 00000000 f3380000 00000000 00000000 01010100 00000000 02d00000 000000f0
[ 67.197642] 3d90 00000000 02800000 000001e0 97c00000 00000000 00000006 97c00000 97c4b000
[ 67.205789] 3db0 97c5dc00 97c80000 97ccb000 97cddc00 97d00000 97d4b000 97d5dc00 97d80000
[ 67.213936] 3dd0 97dcb000 97dddc00 97e00000 97e4b000 97e5dc00 97e80000 97ecb000 97eddc00
[ 67.222085]
[ 67.222089] R9: 0xc0665fd8:
[ 67.226330] 5fd8 00000000 d355d324 00000000 00000000 00000000 00000000 00000000 00000000
[ 67.234477] 5ff8 00000000 00000000 00000000 00000000 c57bec84 00000000 00000000 00000000
[ 67.242623] 6018 d50f78e4 d0285604 00000000 d50f7164 00000000 c57be144 00000000 00000003
[ 67.250770] 6038 d6401e60 d6548ee0 ffffffff ffffffff ffffffff ffffffff ffffffff 00000001
[ 67.258917] 6058 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 67.267064] 6078 00000000 00000000 00000000 d641dbc0 00000000 00000000 00000000 00000000
[ 67.275211] 6098 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 67.283358] 60b8 00000000 00000000 00000000 c0600920 00000000 00000000 00000000 00000000
[ 67.291510] Process WindowManager (pid: 1198, stack limit = 0xd00542f0)
[ 67.298096] Stack: (0xd0055f18 to 0xd0056000)
[ 67.302432] 5f00: c576fee0 00000085
[ 67.310586] 5f20: c0611654 00000000 00000000 c0666058 408b3f90 c0091494 c0611654 c576fee0
[ 67.318733] 5f40: d0055f60 c0611654 c061169c c576fee0 00000001 00000000 d0054000 408b3f90
[ 67.326880] 5f60: 568f9dca c0091614 c0611654 c061169c 00000020 c00935e0 00000020 00000001
[ 67.335026] 5f80: 00000020 c004030c 00000014 00000000 00000001 c00911a0 00000014 c0031060
[ 67.343174] 5fa0: ffffffff f5100000 00000001 c00367a0 01f067bc 4154c4d0 00000001 00000001
[ 67.351321] 5fc0: 00000005 ffe93b65 00000001 41552d78 01f06700 fffffe4c 408b3f90 568f9dca
[ 67.359468] 5fe0: 0000b624 5c51cca8 40843a7c 408439ac 20000010 ffffffff 00000000 00000000
[ 67.367637] [<c02acfb4>] (cif_cam_isr_in8920+0x5c/0x368) from [<c0091494>] (handle_irq_event_percpu+0x30/0x174)
[ 67.377675] [<c0091494>] (handle_irq_event_percpu+0x30/0x174) from [<c0091614>] (handle_irq_event+0x3c/0x5c)
[ 67.387467] [<c0091614>] (handle_irq_event+0x3c/0x5c) from [<c00935e0>] (handle_level_irq+0xc4/0xf4)
[ 67.396572] [<c00935e0>] (handle_level_irq+0xc4/0xf4) from [<c004030c>] (tcc8920_irq_vioc_handler+0xd4/0xe0)
[ 67.406361] [<c004030c>] (tcc8920_irq_vioc_handler+0xd4/0xe0) from [<c00911a0>] (generic_handle_irq+0x24/0x38)
[ 67.416332] [<c00911a0>] (generic_handle_irq+0x24/0x38) from [<c0031060>] (asm_do_IRQ+0x60/0x84)
[ 67.425083] [<c0031060>] (asm_do_IRQ+0x60/0x84) from [<c00367a0>] (__irq_usr+0x40/0xc0)
[ 67.433040] Exception stack(0xd0055fb0 to 0xd0055ff8)
[ 67.438071] 5fa0: 01f067bc 4154c4d0 00000001 00000001
[ 67.446224] 5fc0: 00000005 ffe93b65 00000001 41552d78 01f06700 fffffe4c 408b3f90 568f9dca
[ 67.454368] 5fe0: 0000b624 5c51cca8 40843a7c 408439ac 20000010 ffffffff
[ 67.460957] Code: 0a000008 e5932004 e2840f5a e5931000 (e5812004)
[ 67.467232] ---[ end trace 0feebdc8a0e1374f ]---
[ 67.471677] Kernel panic - not syncing: Fatal exception in interrupt
[ 67.478064] [<c003b2bc>] (unwind_backtrace+0x0/0xf0) from [<c03e63fc>] (panic+0x60/0x194)
[ 67.486192] [<c03e63fc>] (panic+0x60/0x194) from [<c003a150>] (die+0x178/0x1b8)
[ 67.493461] [<c003a150>] (die+0x178/0x1b8) from [<c003c304>] (__do_kernel_fault+0x64/0x84)
[ 67.501711] [<c003c304>] (__do_kernel_fault+0x64/0x84) from [<c003c4e8>] (do_page_fault+0x1c4/0x1dc)
[ 67.510805] [<c003c4e8>] (do_page_fault+0x1c4/0x1dc) from [<c00312b8>] (do_DataAbort+0x34/0x94)
[ 67.519472] [<c00312b8>] (do_DataAbort+0x34/0x94) from [<c003652c>] (__dabt_svc+0x4c/0x60)
[ 67.527685] Exception stack(0xd0055ed0 to 0xd0055f18)
[ 67.532695] 5ec0: c0673ed8 00100100 00200200 c0673ee0
[ 67.540881] 5ee0: c0673d70 00000085 00000000 00000000 00000000 c0666058 408b3f90 00000001
[ 67.549012] 5f00: 00000001 d0055f18 c02acf80 c02acfb4 a0000193 ffffffff
[ 67.555589] [<c003652c>] (__dabt_svc+0x4c/0x60) from [<c02acfb4>] (cif_cam_isr_in8920+0x5c/0x368)
[ 67.564457] [<c02acfb4>] (cif_cam_isr_in8920+0x5c/0x368) from [<c0091494>] (handle_irq_event_percpu+0x30/0x174)
[ 67.574503] [<c0091494>] (handle_irq_event_percpu+0x30/0x174) from [<c0091614>] (handle_irq_event+0x3c/0x5c)
[ 67.584296] [<c0091614>] (handle_irq_event+0x3c/0x5c) from [<c00935e0>] (handle_level_irq+0xc4/0xf4)
[ 67.593404] [<c00935e0>] (handle_level_irq+0xc4/0xf4) from [<c004030c>] (tcc8920_irq_vioc_handler+0xd4/0xe0)
[ 67.603190] [<c004030c>] (tcc8920_irq_vioc_handler+0xd4/0xe0) from [<c00911a0>] (generic_handle_irq+0x24/0x38)
[ 67.613157] [<c00911a0>] (generic_handle_irq+0x24/0x38) from [<c0031060>] (asm_do_IRQ+0x60/0x84)
[ 67.621913] [<c0031060>] (asm_do_IRQ+0x60/0x84) from [<c00367a0>] (__irq_usr+0x40/0xc0)
[ 67.629868] Exception stack(0xd0055fb0 to 0xd0055ff8)
[ 67.634878] 5fa0: 01f067bc 4154c4d0 00000001 00000001
[ 67.643058] 5fc0: 00000005 ffe93b65 00000001 41552d78 01f06700 fffffe4c 408b3f90 568f9dca
[ 67.651204] 5fe0: 0000b624 5c51cca8 40843a7c 408439ac 20000010 ffffffff
[ 67.657779] Rebooting in 5 seconds..
利用Oops信息准确定位错误代码所在行步骤:
1、编译的时候需要在menuconfig里面打开complie with debug info选项:
进入menuconfig ----------> 进入Kernel hacking ------> 选择 Compile the kernel with debug info ----> 保存,退出。
2、利用arm-linux-androideabi-gdb调试,注意这里的gdb调试器视具体情况,名字不一样,以方案提供商的工具为准。
arm-linux-androideabi-gdb vmlinux
3、看Oops 信息里面的这一行:PC is at cif_cam_isr_in8920+0x5c/0x368
在命令行上键入命令:l(小写的L) * at cif_cam_isr_in8920+0x5c // l表示查找,*表示通配符
反馈信息如下:
(gdb) l *cif_cam_isr_in8920+0x5c
0xc02acfb4 is in cif_cam_isr_in8920 (include/linux/list.h:88).
83 * This is only for internal list manipulation where we know
84 * the prev/next entries already!
85 */
86 static inline void __list_del(struct list_head * prev, struct list_head * next)
87 {
88 next->prev = prev;
89 prev->next = next;
90 }
91
92 /**