#打卡不停更#OpenHarmony -Hi3516 wifi SDIO异常panic 原创

民之码农
发布于 2022-10-8 15:05
浏览
1收藏

@toc

1.前言

基于OpenHarmony L2 3.0 release改版硬件,在压力稳定行测试时发现主控芯片连接wifi芯片hi3881的sdio,openharmony L2 linux内核的sdio驱动异常panic死机重启。经过长时间的分析,发现不是软件问题引起,但软件可以提升IO端口的驱动能力级,可以解决该问题。

2.异常panic日志

[2022/1/7 19:33:57] himci: voltage switch read MCI_RESP
[2022/1/7 19:33:57] himci: 0 : 0x2000
[2022/1/7 19:33:57] himci: voltage switch read MCI_RESP
[2022/1/7 19:33:57] himci: 1 : 0x0
[2022/1/7 19:33:57] himci: voltage switch read MCI_RESP
[2022/1/7 19:33:57] himci: 2 : 0x0
[2022/1/7 19:33:57] himci: voltage switch read MCI_RESP
[2022/1/7 19:33:57] himci: 3 : 0x0
[2022/1/7 19:33:57] himci_wait_cmd:259: 
[2022/1/7 19:33:57] Other CMD is running,please operate cmd again!
[2022/1/7 19:33:57] 
[2022/1/7 19:33:57] 8<--- cut here ---
[2022/1/7 19:33:57] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[2022/1/7 19:33:57] pgd = d60df41b
[2022/1/7 19:33:57] [00000000] *pgd=00000000
[2022/1/7 19:33:57] Internal error: Oops: 5 [#1] SMP ARM
[2022/1/7 19:33:57] Modules linked in: hi_mipi_rx(O) hi3516cv500_hdmi(O) hifb(O) hi3516cv500_vo_dev(O) hi3516cv500_tde(O) hi3516cv500_sys(O) hi3516cv500_base(O) sys_config(O) hi_proc(PO) hi_irq(O) hi_osal(O)
[2022/1/7 19:33:57] CPU: 1 PID: 57 Comm: chip_factory_lo Tainted: P        W  O      5.10.57 #1
[2022/1/7 19:33:57] Hardware name: Generic DT based system
[2022/1/7 19:33:57] PC is at mmc_io_rw_direct+0x28/0x120
[2022/1/7 19:33:57] LR is at sdio_writeb+0x3c/0x64
[2022/1/7 19:33:57] pc : [<c06f6808>]    lr : [<c06f8314>]    psr: a0000013
[2022/1/7 19:33:57] sp : c2a3dd48  ip : 00000009  fp : c0bad153
[2022/1/7 19:33:57] r10: c2c5e508  r9 : c0f6e490  r8 : c0e04ec8
[2022/1/7 19:33:57] r7 : 00000000  r6 : c139be08  r5 : 00000001  r4 : c2a3ddb0
[2022/1/7 19:33:57] r3 : 00000009  r2 : 00000030  r1 : 00000000  r0 : 00000000
[2022/1/7 19:33:57] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[2022/1/7 19:33:57] Control: 10c5387d  Table: 82dd406a  DAC: 00000051
[2022/1/7 19:33:57] Process chip_factory_lo (pid: 57, stack limit = 0x986b9d41)
[2022/1/7 19:33:57] Stack: (0xc2a3dd48 to 0xc2a3e000)
[2022/1/7 19:33:57] dd40:                   64425cf8 00000004 c1124810 c112489c 60000013 c2a3c000
[2022/1/7 19:33:57] dd60: c1012000 00000000 c101224c c05a2e74 00000000 00000000 60000013 64425cf8
[2022/1/7 19:33:57] dd80: c2a3ddb0 00000009 c139be08 c2a3de08 c0e04ec8 c0f6e490 c2c5e508 c06f8314
[2022/1/7 19:33:57] dda0: 00000000 00000000 c0e04ec8 c0775b08 00000000 64425cf8 00000001 c0774f5c
[2022/1/7 19:33:57] ddc0: ffffffff c07f02e4 c078d7c0 c2d95000 c0bad153 c078d808 c2c21f08 c07f7da4
[2022/1/7 19:33:57] dde0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[2022/1/7 19:33:57] de00: 00000000 00000000 00000000 64425cf8 c2c21f08 c2d95800 c07f1b58 c0f6ee6c
[2022/1/7 19:33:57] de20: 00000000 c07f02e4 00000000 00000000 00000000 00000000 c0bd4e8d 00000000
[2022/1/7 19:33:57] de40: 00000000 00000000 00000000 c0e04ec8 c07e1828 c07e94c0 00000003 c0f6ed3d
[2022/1/7 19:33:57] de60: 00000000 c0f6e490 c2c5e508 c07f1b58 c2a3de94 00000000 c0bad153 c01734f4
[2022/1/7 19:33:57] de80: 00080204 c2a3de94 64425cf8 c07e17c8 c07e9948 00000000 c07e1828 00000000
[2022/1/7 19:33:57] dea0: c0bad153 c07e94c0 00000002 00000002 c0bd37b1 00000003 00000004 00000000
[2022/1/7 19:33:57] dec0: 00000000 c2c21f08 c0804360 c2c21f08 c0804360 c2c21f08 c0bad153 c07e1828
[2022/1/7 19:33:57] dee0: c0f6e490 c2c5e508 c0bad153 c0175a94 c2a3df14 c0bad0c3 c0bad153 c01734f4
[2022/1/7 19:33:57] df00: 00000000 c2a3df14 00000000 c2c5e508 ffffffff c0bad0c3 c0bad153 c0804360
[2022/1/7 19:33:57] df20: c2c5e508 c0f6fa34 c0bad136 c078621c 64425cf8 c0bacf01 c0f6e44c c0bad136
[2022/1/7 19:33:57] df40: c0bad0c3 00000000 c0f6e490 c2c5e508 c0bad153 c0786978 c10d3cf4 c2a10040
[2022/1/7 19:33:57] df60: 0000045c c0740de4 c2a3c000 c2a10054 00000040 c2a10064 c2a0efc8 c0740e1c
[2022/1/7 19:33:57] df80: c2a0efc8 c01412bc c0740de4 c2a10000 c0141108 00000000 00000000 00000000
[2022/1/7 19:33:57] dfa0: 00000000 00000000 00000000 c0100170 00000000 00000000 00000000 00000000
[2022/1/7 19:33:57] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[2022/1/7 19:33:57] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[2022/1/7 19:33:57] [<c06f6808>] (mmc_io_rw_direct) from [<c06f8314>] (sdio_writeb+0x3c/0x64)
[2022/1/7 19:33:57] [<c06f8314>] (sdio_writeb) from [<c0775b08>] (Hi35xxLinuxSdioIncrAddrWriteBytes+0x68/0xf0)
[2022/1/7 19:33:57] [<c0775b08>] (Hi35xxLinuxSdioIncrAddrWriteBytes) from [<c0774f5c>] (SdioWriteBytes+0x4c/0x90)
[2022/1/7 19:33:57] [<c0774f5c>] (SdioWriteBytes) from [<c078d808>] (HdfSdioWriteN+0x48/0x70)
[2022/1/7 19:33:57] [<c078d808>] (HdfSdioWriteN) from [<c07f7da4>] (oal_sdio_func_remove+0x50/0x130)
[2022/1/7 19:33:57] [<c07f7da4>] (oal_sdio_func_remove) from [<c07f02e4>] (hcc_host_init+0x62c/0x664)
[2022/1/7 19:33:57] [<c07f02e4>] (hcc_host_init) from [<c07f1b58>] (hcc_hmac_init+0x10/0xe8)
[2022/1/7 19:33:57] [<c07f1b58>] (hcc_hmac_init) from [<c07e94c0>] (hi_wifi_host_init+0x20/0x274)
[2022/1/7 19:33:57] [<c07e94c0>] (hi_wifi_host_init) from [<c07e1828>] (hi_wifi_init+0x124/0x1a4)
[2022/1/7 19:33:57] [<c07e1828>] (hi_wifi_init) from [<c0804360>] (InitHi3881Chip+0x8c/0x10c)
[2022/1/7 19:33:57] [<c0804360>] (InitHi3881Chip) from [<c078621c>] (HdfWifiInitDevice+0x98/0x2bc)
[2022/1/7 19:33:57] [<c078621c>] (HdfWifiInitDevice) from [<c0786978>] (HdfWlanInitThread+0x330/0x3cc)
[2022/1/7 19:33:57] [<c0786978>] (HdfWlanInitThread) from [<c0740e1c>] (osal_thread_entry+0x38/0x3c)
[2022/1/7 19:33:57] [<c0740e1c>] (osal_thread_entry) from [<c01412bc>] (kthread+0x1b4/0x1b8)
[2022/1/7 19:33:57] [<c01412bc>] (kthread) from [<c0100170>] (ret_from_fork+0x14/0x24)
[2022/1/7 19:33:57] Exception stack(0xc2a3dfb0 to 0xc2a3dff8)
[2022/1/7 19:33:57] dfa0:                                     00000000 00000000 00000000 00000000
[2022/1/7 19:33:57] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[2022/1/7 19:33:57] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[2022/1/7 19:33:57] Code: e5981000 e3a02030 e58d1034 e3a01000 (e590a000) 
[2022/1/7 19:33:57] ---[ end trace fb01be132a8f05ea ]---
[2022/1/7 19:33:57] Kernel panic - not syncing: Fatal exception
[2022/1/7 19:33:57] CPU0: stopping
[2022/1/7 19:33:57] CPU: 0 PID: 0 Comm: swapper/0 Tainted: P      D W  O      5.10.57 #1
[2022/1/7 19:33:57] Hardware name: Generic DT based system
[2022/1/7 19:33:57] [<c011065c>] (unwind_backtrace) from [<c010bf18>] (show_stack+0x10/0x14)
[2022/1/7 19:33:57] [<c010bf18>] (show_stack) from [<c04be454>] (dump_stack+0x90/0xc4)
[2022/1/7 19:33:57] [<c04be454>] (dump_stack) from [<c010e860>] (ipi_cpu_stop+0x5c/0x78)
[2022/1/7 19:33:57] [<c010e860>] (ipi_cpu_stop) from [<c010e5e8>] (ipi_handler+0x0/0x20)
[2022/1/7 19:33:57] [<c010e5e8>] (ipi_handler) from [<c101cb80>] (0xc101cb80)
[2022/1/7 19:33:57] Kernel Offset: disabled
[2022/1/7 19:33:57] ---[ end Kernel panic - not syncing: Fatal exception ]-

3.解决问题的方法

提高SDIO的驱动能力级,代码位置,如下图:
#打卡不停更#OpenHarmony -Hi3516 wifi SDIO异常panic-鸿蒙开发者社区

4.修改代码的SDIO的驱动能力级

根据芯片手册的引脚表,修改代码的SDIO的驱动能力级;相同的条件下复现问题,发现问题解决。
#打卡不停更#OpenHarmony -Hi3516 wifi SDIO异常panic-鸿蒙开发者社区

©著作权归作者所有,如需转载,请注明出处,否则将追究法律责任
Hi3516DV300_PINOUT_CN.zip 118.25K 32次下载
已于2022-10-8 15:27:34修改
收藏 1
回复
举报
回复
    相关推荐