CorebootBdsLib: Call End of DXE event to allow booting 3rd party efi binaries.

This commit is contained in:
CoolStar
2016-12-04 12:07:30 -08:00
committed by Matt DeVillier
parent 04515ff368
commit 927fc0e4b5
2 changed files with 43 additions and 0 deletions

View File

@ -1129,6 +1129,46 @@ Returns:
Status = BaseMemoryTest (MemoryTestLevel);
}
VOID
EFIAPI
InternalBdsEmptyCallbackFuntion (
IN EFI_EVENT Event,
IN VOID *Context
)
{
return;
}
VOID
InstallReadyToLock (
VOID
)
{
EFI_STATUS Status;
EFI_EVENT EndOfDxeEvent;
DEBUG((DEBUG_INFO,"InstallReadyToLock entering......\n"));
//
// Inform the SMM infrastructure that we're entering BDS and may run 3rd party code hereafter
// Since PI1.2.1, we need signal EndOfDxe as ExitPmAuth
//
Status = gBS->CreateEventEx (
EVT_NOTIFY_SIGNAL,
TPL_CALLBACK,
InternalBdsEmptyCallbackFuntion,
NULL,
&gEfiEndOfDxeEventGroupGuid,
&EndOfDxeEvent
);
ASSERT_EFI_ERROR (Status);
gBS->SignalEvent (EndOfDxeEvent);
gBS->CloseEvent (EndOfDxeEvent);
DEBUG((DEBUG_INFO,"All EndOfDxe callbacks have returned successfully\n"));
DEBUG((DEBUG_INFO,"InstallReadyToLock end\n"));
return;
}
VOID
EFIAPI
PlatformBdsPolicyBehavior (
@ -1164,6 +1204,8 @@ Returns:
EFI_INPUT_KEY Key;
EFI_BOOT_MODE BootMode;
InstallReadyToLock();
//
// Init the time out value
//

View File

@ -58,6 +58,7 @@
gEfiSmbiosTableGuid
gEfiAcpiTableGuid
gLdrMemoryDescriptorGuid
gEfiEndOfDxeEventGroupGuid
[Pcd]
gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut