HomeFreeBSD

ddb: have 'reset' command use normal reboot path

Description

ddb: have 'reset' command use normal reboot path

This conditionally gives all registered shutdown handlers a chance to
perform the reboot, with cpu_reset() being the fallback. The '\s'
modifier can be used with the command to get the previous behaviour.

The motivation is that some platforms may not be able do anything
meaningful via cpu_reset(), due to a lack of standardized reset
mechanism and/or firmware shortcomings. However, they may have a
separate device driver attached that normally performs the reboot. Such
is the case for some versions of the Raspberry Pi, where reset via PSCI
fails, but the BCM2835 watchdog driver has a shutdown hook.

Reported by: bz
Reviewed by: markj (slightly earlier version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D37981

(cherry picked from commit 5644850620aead7c257a4e3040e20201b510f499)

Details

Provenance
mhorneAuthored on Jan 7 2023, 6:09 PM
Reviewer
markj
Differential Revision
D37981: ddb: have 'reset' command use normal reboot path
Parents
rG2f12145a37be: kern_reboot: unconditionally call shutdown_reset()
Branches
Unknown
Tags
Unknown