diff --git a/lib/sbi/sbi_system.c b/lib/sbi/sbi_system.c index 479060b9..8b457d63 100644 --- a/lib/sbi/sbi_system.c +++ b/lib/sbi/sbi_system.c @@ -42,6 +42,7 @@ bool sbi_system_reset_supported(u32 reset_type, u32 reset_reason) return FALSE; } +#include void __noreturn sbi_system_reset(u32 reset_type, u32 reset_reason) { ulong hbase = 0, hmask; @@ -66,6 +67,8 @@ void __noreturn sbi_system_reset(u32 reset_type, u32 reset_reason) reset_dev && reset_dev->system_reset) reset_dev->system_reset(reset_type, reset_reason); + writew(0x5555, (void *)0x100000); // qemu poweroff + /* If platform specific reset did not work then do sbi_exit() */ sbi_exit(scratch); }