提交 53ed0314 编写于 作者: R rewine 提交者: guo

[bsp/qemu-virt64-riscv]: dont use sbi in m-mode

上级 20067853
...@@ -18,12 +18,14 @@ ...@@ -18,12 +18,14 @@
#include "drv_uart.h" #include "drv_uart.h"
#include "encoding.h" #include "encoding.h"
#include "stack.h" #include "stack.h"
#include "sbi.h"
#include "riscv.h" #include "riscv.h"
#include "stack.h" #include "stack.h"
#include "riscv_io.h" #include "riscv_io.h"
#include "plic.h" #include "plic.h"
#include "interrupt.h" #include "interrupt.h"
#ifdef CONFIG_RISCV_S_MODE
#include "sbi.h"
#endif
void primary_cpu_entry(void) void primary_cpu_entry(void)
{ {
...@@ -62,9 +64,11 @@ void rt_hw_board_init(void) ...@@ -62,9 +64,11 @@ void rt_hw_board_init(void)
#endif #endif
} }
void rt_hw_cpu_reset(void) #ifdef CONFIG_RISCV_S_MODE
static void cmd_shutdown(void)
{ {
sbi_shutdown(); sbi_shutdown();
while(1); while(1);
} }
MSH_CMD_EXPORT_ALIAS(rt_hw_cpu_reset, reboot, reset machine); MSH_CMD_EXPORT_ALIAS(cmd_shutdown, shutdown, shutdown qemu-virt64);
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册