]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ddb: have 'reset' command use normal reboot path
authorMitchell Horne <mhorne@FreeBSD.org>
Sat, 7 Jan 2023 18:09:28 +0000 (14:09 -0400)
committerMitchell Horne <mhorne@FreeBSD.org>
Mon, 6 Feb 2023 19:34:37 +0000 (15:34 -0400)
commitf0e49ab720d3bc71f82dc1e73db4047f3a03defb
tree14e770c355273f6c0ac32e4c94430828c34f1f07
parent2f12145a37befc2bae3db859699d394611e96e2d
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)
share/man/man4/ddb.4
sys/ddb/db_command.c