From 5a0202fb50c4c89868fa2d8a285a81d3f13768d8 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 `Reset` 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..bde702c70d 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::Reset, sbi_rt::NoReason); loop { core::hint::spin_loop(); }