mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +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 <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <debug.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -32,7 +33,10 @@
|
|||||||
|
|
||||||
void sbi_mexception(uintreg_t mcause, uintreg_t *mepc, uintreg_t tval)
|
void sbi_mexception(uintreg_t mcause, uintreg_t *mepc, uintreg_t tval)
|
||||||
{
|
{
|
||||||
UNUSED(mcause);
|
sinfo("cauz=%"PRIxREG" epc=%p tval=0x%"PRIxREG"\n", mcause, mepc, tval);
|
||||||
UNUSED(mepc);
|
|
||||||
UNUSED(tval);
|
while (1)
|
||||||
|
{
|
||||||
|
__asm__ __volatile__("wfi");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user