MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / handle_nested_trap_panic

Function handle_nested_trap_panic

libcpu/risc-v/common64/trap.c:280–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278#endif
279
280static void handle_nested_trap_panic(rt_ubase_t cause, rt_ubase_t tval,
281 rt_ubase_t epc,
282 struct rt_hw_stack_frame *eframe)
283{
284 LOG_E("\n-------- [SEVER ERROR] --------");
285 LOG_E("Nested trap detected");
286 LOG_E("scause:%p,stval:%p,sepc:%p\n", cause, tval, epc);
287 dump_regs(eframe);
288 rt_hw_cpu_shutdown();
289}
290
291#define IN_USER_SPACE (stval >= USER_VADDR_START && stval < USER_VADDR_TOP)
292#define PAGE_FAULT (id == EP_LOAD_PAGE_FAULT || id == EP_STORE_PAGE_FAULT)

Callers

nothing calls this directly

Calls 2

dump_regsFunction · 0.85
rt_hw_cpu_shutdownFunction · 0.70

Tested by

no test coverage detected