Add PlatformBdsPreBoot to allow hooks immediately before booting an option

This commit is contained in:
Jeremy Soller
2019-10-31 14:54:27 -06:00
committed by Tim Crawford
parent 814c0fa862
commit 6dff36c9b2
5 changed files with 48 additions and 0 deletions

View File

@@ -91,6 +91,12 @@ PlatformBdsPolicyBehavior (
IN BASEM_MEMORY_TEST BaseMemoryTest
);
VOID
EFIAPI
PlatformBdsPreBoot (
IN BDS_COMMON_OPTION *Option
);
/**
Hook point for a user-provided function, for after a boot attempt fails.

View File

@@ -263,6 +263,8 @@ BdsBootDeviceSelect (
//
BdsSetConsoleMode (FALSE);
PlatformBdsPreBoot (BootOption);
//
// All the driver options should have been processed since
// now boot will be performed.

View File

@@ -380,6 +380,8 @@ CallBootManager (
//
BdsSetConsoleMode (FALSE);
PlatformBdsPreBoot (gOption);
//
// parse the selected option
//

View File

@@ -91,6 +91,8 @@ HotkeyBoot (
//
gST->ConOut->Reset (gST->ConOut, FALSE);
PlatformBdsPreBoot (mHotkeyBootOption);
Status = BdsLibBootViaBootOption (mHotkeyBootOption, mHotkeyBootOption->DevicePath, &ExitDataSize, &ExitData);
if (EFI_ERROR (Status)) {