]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
riscv: Use SBI shutdown call to implement RB_POWEROFF
authorjrtc27 <jrtc27@FreeBSD.org>
Mon, 8 Jun 2020 17:57:21 +0000 (17:57 +0000)
committerjrtc27 <jrtc27@FreeBSD.org>
Mon, 8 Jun 2020 17:57:21 +0000 (17:57 +0000)
commit1e3c1ba3b5f84d483052090a308eaf7194efd1ca
tree8c6ee0114b7e564010a264d043ff9eec9eb336cf
parent88a7dd376c33f59c9a5f94cdbce7994ff32aaef4
riscv: Use SBI shutdown call to implement RB_POWEROFF

Currently we only call sbi_shutdown in cpu_reset, which means we reach
"Please press any key to reboot." even when RB_POWEROFF is set, and only
once the user presses a key do we then shutdown. Instead, register a
shutdown_final event handler and make an SBI shutdown call if
RB_POWEROFF is set.

Reviewed by: br, jhb (mentor), kp
Approved by: br, jhb (mentor), kp
Differential Revision: https://reviews.freebsd.org/D25183
sys/riscv/riscv/sbi.c