Skip to content

[DO NOT MERGE]os/board/rtl8730e: Add recovery mechanism for IPC hang#7197

Open
jwei5 wants to merge 1 commit intoSamsung:masterfrom
jwei5:ipc_recovery
Open

[DO NOT MERGE]os/board/rtl8730e: Add recovery mechanism for IPC hang#7197
jwei5 wants to merge 1 commit intoSamsung:masterfrom
jwei5:ipc_recovery

Conversation

@jwei5
Copy link
Copy Markdown
Contributor

@jwei5 jwei5 commented Mar 19, 2026

  • If CA32 IPC or KM4 IPC keeps waiting for ACK from the other party, it can be stuck in a while loop
  • Add a recovery mechanism to check if either side is stuck waiting for ACK by writing into BKUP_REG2
  • On CA32 and KM4,a HW timer will check the value of BKUP_REG2 and reset if it detects IPC is stuck
  • Add reboot reason REBOOT_SYSTEM_CA32_IPC_ERROR to indicate reset due to CA32 IPC not replying ACK to KM4 IPC

- If CA32 IPC or KM4 IPC keeps waiting for ACK from the other party, it can be stuck in a while loop
- Add a recovery mechanism to check if either side is stuck waiting for ACK by writing into BKUP_REG2
- On CA32 and KM4,a HW timer will check the value of BKUP_REG2 and reset if it detects IPC is stuck
- Add reboot reason REBOOT_SYSTEM_CA32_IPC_ERROR to indicate reset due to CA32 IPC not replying ACK to KM4 IPC
@jwei5
Copy link
Copy Markdown
Contributor Author

jwei5 commented Mar 19, 2026

Scenario to test KM4 stuck waiting for IPC ACK:

[WT][T25] send signal _wt_sta_connected:242
[WT][T30] <-- _wt_connect:380
[WT][T30] send func signal _wt_process:938
MsgSend wait inic ipc done for ID 0x6, event 0xb, latest ID 0x6, latest event 0xb
MsgSend wait inic ipc done for ID 0x6, event 0xb, latest ID 0x6, latest event 0xb
MsgSend wait inic ipc done for ID 0x6, event 0xb, latest ID 0x6, latest event 0xb
MsgSend wait inic ipc done for ID 0x6, event 0xb, latest ID 0x6, latest event 0xb
MsgSend wait inic ipc done for ID 0x6, event 0xb, latest ID 0x6, latest event 0xb
MsgSend wait inic ipc done for ID 0x6, event 0xb, latest ID 0x6, latest event 0xb
MsgSend wait inic ipc done for ID 0x6, event 0xb, latest ID 0x6, latest event 0xb
np_lp_status_timer_hdl: boot_reason_reg2 0x5
security level: 1
##########################################################################################################################################
boardctl: Board will Reboot now. pid: 31
.
.
.
[BOOT-I] BKUP_REG2 0x5
.
.
.
up_allocate_kheap: start = 0x6011fe00 size = 1442304
up_initialize: [Reboot Reason] : 247
os_start: All SMP cores started!!
silent_reboot_set_mode: board boot with SILENT MODE.

Scenario to test CA32 stuck waiting for IPC ACK:

TASH>>wm_test scan
TASH>>[WT][T29] wifi manager test!! wm_test_main:979
[WT][T29] wait func signal wm_test_main:990
[WT][T30] --> _wt_scan:522
[WM][INFO] --> wifi_manager_scan_ap 203
[WM][INFO] handle request state(STA_DISCONNECTED) evt(CMD_SCAN)
HstMsgSend wait inic ipc done 0x10, 0x10
Error: CA32 IPC waiting for ack
.
.
BOOT FROM NOR
.
.
[BOOT-I] BKUP_REG2 0x4
.
.
up_allocate_kheap: start = 0x6011fe00 size = 1442304
up_reboot_reason_get_hw_value: Reboot reason: KM4 IPC error
up_initialize: [Reboot Reason] : 251
os_start: All SMP cores started!!
silent_reboot_set_mode: board boot with SILENT MODE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant