From 143b44bf0830bd3a96b584b105e08e5231c88e30 Mon Sep 17 00:00:00 2001 From: Zhouqi Jiang Date: Wed, 17 Apr 2024 14:28:20 +0800 Subject: [PATCH] riscv64: fix: use sbi-rt `Shutdown` struct for SBI shutdown Signed-off-by: Zhouqi Jiang --- src/arch/riscv64/kernel/processor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/riscv64/kernel/processor.rs b/src/arch/riscv64/kernel/processor.rs index 9151a89340..4e0f8c52dd 100644 --- a/src/arch/riscv64/kernel/processor.rs +++ b/src/arch/riscv64/kernel/processor.rs @@ -234,7 +234,7 @@ pub fn shutdown(error_code: i32) -> ! { semihosting::process::exit(error_code) } else { // use SBI shutdown - sbi_rt::system_reset(sbi_rt::ColdReboot, sbi_rt::NoReason); + sbi_rt::system_reset(sbi_rt::Shutdown, sbi_rt::NoReason); loop { core::hint::spin_loop(); }