ArmPkg/BdsLib: Prevent application to hang the platform using watchdog

Before to start an image we start the watchdog. And it stops when the
application returns.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11478 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin 2011-03-31 12:16:28 +00:00
parent 20fd35dc44
commit bad880b172
1 changed files with 9 additions and 0 deletions

View File

@ -34,7 +34,16 @@ BdsLoadPeCoff (
Status = gBS->LoadImage (TRUE, gImageHandle, DevicePath, NULL, 0, &ImageHandle);
if (!EFI_ERROR (Status)) {
//
// Before calling the image, enable the Watchdog Timer for
// the 5 Minute period
//
gBS->SetWatchdogTimer (5 * 60, 0x0000, 0x00, NULL);
Status = gBS->StartImage (ImageHandle, NULL, NULL);
//
// Clear the Watchdog Timer after the image returns
//
gBS->SetWatchdogTimer (0x0000, 0x0000, 0x0000, NULL);
}
return Status;