From ba1efee47e5d5fbd2a0358a94d64c240f6aa3ca9 Mon Sep 17 00:00:00 2001 From: belliash Date: Thu, 11 Aug 2022 19:19:55 +0200 Subject: [PATCH] Disable watchdog timer --- xtldr/xtldr.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xtldr/xtldr.c b/xtldr/xtldr.c index 7760cb4..1565cfb 100644 --- a/xtldr/xtldr.c +++ b/xtldr/xtldr.c @@ -81,6 +81,14 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle, return STATUS_EFI_INCOMPATIBLE_VERSION; } + /* Disable watchdog timer */ + Status = EfiSystemTable->BootServices->SetWatchdogTimer(0, 0x10000, 0, NULL); + if(Status != STATUS_EFI_SUCCESS) + { + /* Failed to disable the timer, print message */ + BlDbgPrint(L"WARNING: Failed to disable watchdog timer"); + } + /* Infinite bootloader loop */ for(;;);