summaryrefslogtreecommitdiffstats
path: root/ArmPkg
diff options
context:
space:
mode:
authorNhi Pham <nhi@os.amperecomputing.com>2024-08-23 09:01:37 +0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-08-28 22:17:56 +0000
commit41a51d173557350ec8bcf64075a3e97730bf70dd (patch)
tree9bb9e2a77b9b13be30b8ad7e6bb2d6cc5b6f32c7 /ArmPkg
parent7cde720e5126a47dadfb63ec9fd11b637620102d (diff)
downloadedk2-41a51d173557350ec8bcf64075a3e97730bf70dd.tar.gz
edk2-41a51d173557350ec8bcf64075a3e97730bf70dd.tar.bz2
edk2-41a51d173557350ec8bcf64075a3e97730bf70dd.zip
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 <nhi@os.amperecomputing.com>
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c4
1 files 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: