mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
On SBSA platforms using standard UEFI firmware (such as EDK II), the watchdog timer is often enabled during early boot stages but explicitly disabled by the firmware before handing over control to the OS (e.g., during ExitBootServices). This is done to prevent unintended resets while the OS is loading, assuming the OS watchdog driver will take over. However, this leaves a protection gap. If the system hangs between the firmware handover and the userspace watchdog daemon startup, the hardware watchdog will not fire to recover the system. For safety-critical systems that require continuous hardware watchdog protection from the earliest possible moment, this gap is problematic. Add an 'early_enable' module parameter to allow the kernel driver to re-enable the watchdog immediately during probe if it was left disabled by the firmware. By setting the WDOG_HW_RUNNING status bit, the watchdog core is instructed that the hardware is active. As a result, the core's pre-userspace handler (controlled by 'handle_boot_enabled') will automatically issue periodic keepalives until userspace opens the device. This bridges the protection gap seamlessly without requiring firmware modifications and without risking unintended resets during kernel boot. The parameter defaults to false to preserve the traditional behavior. Signed-off-by: Zexin Wang <ot_zexin.wang@mediatek.com> Link: https://patch.msgid.link/20260817023838.6459-1-ot_zexin.wang@mediatek.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> |
||
|---|---|---|
| .. | ||
| convert_drivers_to_kernel_api.rst | ||
| hpwdt.rst | ||
| ics-wdt.rst | ||
| index.rst | ||
| mlx-wdt.rst | ||
| npcm_wdt.rst | ||
| pcwd-watchdog.rst | ||
| watchdog-api.rst | ||
| watchdog-kernel-api.rst | ||
| watchdog-parameters.rst | ||
| watchdog-pm.rst | ||