riscv/riscv: use shutdown SBI in s-mode

Updates #3337
This commit is contained in:
Gedare Bloom
2026-03-18 12:44:46 -06:00
parent 32de7146e2
commit fd4b66ff12
+8
View File
@@ -33,6 +33,10 @@
#include <libfdt.h>
#ifdef RISCV_USE_S_MODE
#include <machine/sbi.h>
#endif
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{
const char *fdt;
@@ -55,6 +59,10 @@ void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
for(;;);
#endif
#ifdef RISCV_USE_S_MODE
sbi_system_reset(SBI_SRST_TYPE_SHUTDOWN, SBI_SRST_REASON_NONE);
#endif
node = fdt_node_offset_by_compatible(fdt, -1, "sifive,test0");
sifive_test = riscv_fdt_get_address(fdt, node);