diff options
author | Michael Brown | 2015-08-03 13:39:05 +0200 |
---|---|---|
committer | Michael Brown | 2015-08-03 13:48:02 +0200 |
commit | c6b299df2047adb87fcfa3a132b6ff06633dbc90 (patch) | |
tree | 7ecdae5397b22e8ba88143eaee53091f2d49c272 /src/arch/x86/prefix/efiprefix.c | |
parent | [crypto] Support SHA-{224,384,512} in X.509 certificates (diff) | |
download | ipxe-c6b299df2047adb87fcfa3a132b6ff06633dbc90.tar.gz ipxe-c6b299df2047adb87fcfa3a132b6ff06633dbc90.tar.xz ipxe-c6b299df2047adb87fcfa3a132b6ff06633dbc90.zip |
[efi] Hold off watchdog timer while running
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>
Diffstat (limited to 'src/arch/x86/prefix/efiprefix.c')
-rw-r--r-- | src/arch/x86/prefix/efiprefix.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arch/x86/prefix/efiprefix.c b/src/arch/x86/prefix/efiprefix.c index b0bf99c6..18b931e6 100644 --- a/src/arch/x86/prefix/efiprefix.c +++ b/src/arch/x86/prefix/efiprefix.c @@ -26,6 +26,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <ipxe/efi/efi_driver.h> #include <ipxe/efi/efi_snp.h> #include <ipxe/efi/efi_autoboot.h> +#include <ipxe/efi/efi_watchdog.h> /** * EFI entry point @@ -49,6 +50,9 @@ EFI_STATUS EFIAPI _efi_start ( EFI_HANDLE image_handle, /* Claim SNP devices for use by iPXE */ efi_snp_claim(); + /* Start watchdog holdoff timer */ + efi_watchdog_start(); + /* Call to main() */ if ( ( rc = main() ) != 0 ) { efirc = EFIRC ( rc ); @@ -56,6 +60,7 @@ EFI_STATUS EFIAPI _efi_start ( EFI_HANDLE image_handle, } err_main: + efi_watchdog_stop(); efi_snp_release(); efi_loaded_image->Unload ( image_handle ); efi_driver_reconnect_all(); |