mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 10:01:03 +03:00
UEFI platforms may provide a watchdog timer, which will reboot the machine if an operating system takes more than five minutes to load. This can cause long-lived iPXE downloads (or interactive shell sessions) to unexpectedly reboot. Fix by resetting the watchdog timer every ten seconds while the iPXE main processing loop continues to run. Reported-by: Bradley B Williams <bradleybwilliams@swbell.net> Reported-by: John Clark <john.r.clark.3@gmail.com> Reported-by: wdriever@gmail.com Reported-by: Charlie Beima <cbeima@indiana.edu> Signed-off-by: Michael Brown <mcb30@ipxe.org>
32 lines
492 B
C
32 lines
492 B
C
#ifndef _IPXE_EFI_WATCHDOG_H
|
|
#define _IPXE_EFI_WATCHDOG_H
|
|
|
|
/** @file
|
|
*
|
|
* EFI watchdog holdoff timer
|
|
*/
|
|
|
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
|
|
|
extern struct retry_timer efi_watchdog;
|
|
|
|
/**
|
|
* Start EFI watchdog holdoff timer
|
|
*
|
|
*/
|
|
static inline void efi_watchdog_start ( void ) {
|
|
|
|
start_timer_nodelay ( &efi_watchdog );
|
|
}
|
|
|
|
/**
|
|
* Stop EFI watchdog holdoff timer
|
|
*
|
|
*/
|
|
static inline void efi_watchdog_stop ( void ) {
|
|
|
|
stop_timer ( &efi_watchdog );
|
|
}
|
|
|
|
#endif /* _IPXE_EFI_WATCHDOG_H */
|