]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
riscv: Use SBI shutdown call to implement RB_POWEROFF
authorJessica Clarke <jrtc27@FreeBSD.org>
Mon, 8 Jun 2020 17:57:21 +0000 (17:57 +0000)
committerJessica Clarke <jrtc27@FreeBSD.org>
Mon, 8 Jun 2020 17:57:21 +0000 (17:57 +0000)
commite28d8a5b2659632da659c3e7bd893d6c1a3a7000
tree8c6ee0114b7e564010a264d043ff9eec9eb336cf
parent953171ba9e9e44e23dfe6c7fe93297dcf3c3fac1
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