HomeFreeBSD

riscv: Use SBI shutdown call to implement RB_POWEROFF

Description

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

Details

Provenance
jrtc27Authored on
Reviewer
br
Differential Revision
D25183: riscv: Use SBI shutdown call to implement RB_POWEROFF
Parents
rS361931: Move MPASS() macros to systm.h. They are widely used all over
Branches
Unknown
Tags
Unknown