mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 07:46:16 +08:00
riscv/nsbi: halt upon sbi_mexception
This avoids endless restart if NuttSBI fails to enter S-mode. Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <debug.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/****************************************************************************
|
||||
@@ -32,7 +33,10 @@
|
||||
|
||||
void sbi_mexception(uintreg_t mcause, uintreg_t *mepc, uintreg_t tval)
|
||||
{
|
||||
UNUSED(mcause);
|
||||
UNUSED(mepc);
|
||||
UNUSED(tval);
|
||||
sinfo("cauz=%"PRIxREG" epc=%p tval=0x%"PRIxREG"\n", mcause, mepc, tval);
|
||||
|
||||
while (1)
|
||||
{
|
||||
__asm__ __volatile__("wfi");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user