aboutsummaryrefslogtreecommitdiffstats
path: root/src/interface/efi/efi_snp.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2015-08-03 12:39:05 +0100
committerMichael Brown <mcb30@ipxe.org>2015-08-03 12:48:02 +0100
commitc6b299df2047adb87fcfa3a132b6ff06633dbc90 (patch)
tree7ecdae5397b22e8ba88143eaee53091f2d49c272 /src/interface/efi/efi_snp.c
parentb1caa48e4bb3f15e7eb749e0c3470436ebff3435 (diff)
downloadipxe-c6b299df2047adb87fcfa3a132b6ff06633dbc90.tar.gz
[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/interface/efi/efi_snp.c')
-rw-r--r--src/interface/efi/efi_snp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/interface/efi/efi_snp.c b/src/interface/efi/efi_snp.c
index f3c45a957..1b21c40c4 100644
--- a/src/interface/efi/efi_snp.c
+++ b/src/interface/efi/efi_snp.c
@@ -32,6 +32,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/efi/efi_driver.h>
#include <ipxe/efi/efi_strings.h>
#include <ipxe/efi/efi_utils.h>
+#include <ipxe/efi/efi_watchdog.h>
#include <ipxe/efi/efi_snp.h>
#include <usr/autoboot.h>
#include <config/general.h>
@@ -881,9 +882,15 @@ efi_snp_load_file ( EFI_LOAD_FILE_PROTOCOL *load_file,
/* Claim network devices for use by iPXE */
efi_snp_claim();
+ /* Start watchdog holdoff timer */
+ efi_watchdog_start();
+
/* Boot from network device */
ipxe ( netdev );
+ /* Stop watchdog holdoff timer */
+ efi_watchdog_stop();
+
/* Release network devices for use via SNP */
efi_snp_release();