From 41a51d173557350ec8bcf64075a3e97730bf70dd Mon Sep 17 00:00:00 2001 From: Nhi Pham Date: Fri, 23 Aug 2024 09:01:37 +0700 Subject: [PATCH] ArmPkg/GenericWatchdogDxe: Disable WDOG before the protocol installed This moves the WatchdogDisable() function before the installation of the gEfiWatchdogTimerArchProtocolGuid protocol. It allows a platform to promptly carry out platform specific configurations, such as UEFI boot monitoring, by registering the protocol installation callback. Signed-off-by: Nhi Pham --- ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c index 5bff073bc5..b91e62e1a8 100644 --- a/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c +++ b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c @@ -391,6 +391,8 @@ GenericWatchdogEntry ( goto UnregisterHandler; } + WatchdogDisable (); + // Install the Timer Architectural Protocol onto a new handle Handle = NULL; Status = gBS->InstallMultipleProtocolInterfaces ( @@ -413,8 +415,6 @@ GenericWatchdogEntry ( ); ASSERT_EFI_ERROR (Status); - WatchdogDisable (); - return EFI_SUCCESS; UnregisterHandler: