On RPi4B, PSCI reset, precisely, PSCI_FNID_SYSTEM_RESET doesn't work. This causes a reset (a key press) after shutdown -h to halt the board rather than to reboot, and need a powercycle to restart. To workaround, SoC's watchdog must handle the reset, as its 32-bit sibling did so in bcm2835_machdep.c:bcm2835_cpu_reset() . This happens on 13.2-RELEASE image, 13.2-STABLE and 14-CURRENT with more recent u-boot and firmware. Long story: After shutdown -h, the "Please press any key to reboot." message is shown, and by a key press, architecture dependent cpu_reset() is called to try to reset: on 32-bit RPis, arm/platform.c:cpu_reset() broadcom/bcm2835/bcm2835_machdep.c:bcm2835_cpu_reset() broadcom/bcm2835/bcm2835_wdog.c:bcmwd_watchdog_reset() on arm64, arm64/arm64/vm_machdep.c:cpu_reset() dev/psci/psci.c:psci_reset() dev/psci/psci.c:psci_shutdown() dev/psci/psci.h:psci_call(PSCI_FNID_SYSTEM_RESET) Since PSCI reset works properly on RPi3B+, I guess this issue is specific to BCM2711 and is due to a bug in this newer generation SoC's PSCI implementation. To workaround, watchdog is armed to fire immediately instead of psci_call(). I wasn't sure if I could add SoC dependent snippet in this location (arm64/arm64), but I found a quirk for Cavium in GIC v3 code, so I thought it might be OK. Finally note that about simple reboots, triggered by shutdown -r or reboot(8), are all handled by watchdog on both arm and arm64; broadcom/bcm2835/bcm2835_wdog.c:bcmwd_reboot_system() via shutdown_final event handler.
Created attachment 242549 [details] patch_sys_arm64_arm64_vm__machdep.c
^Triage: avoid [tags] in summary lines. <https://wiki.freebsd.org/Bugzilla/DosAndDonts>