MdeModulePkg: Wait for input after boot failure

Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
Matt DeVillier
2021-04-02 17:55:47 -05:00
committed by Tim Crawford
parent 552ca5cc88
commit 232f661f99
2 changed files with 19 additions and 9 deletions

View File

@ -1779,6 +1779,8 @@ EfiBootManagerBoot (
UINTN FileSize;
EFI_BOOT_LOGO_PROTOCOL *BootLogo;
EFI_EVENT LegacyBootEvent;
EFI_INPUT_KEY Key;
UINTN Index;
if (BootOption == NULL) {
return;
@ -1914,6 +1916,23 @@ EfiBootManagerBoot (
//
BmReportLoadFailure (EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR, Status);
BootOption->Status = Status;
if (gST->ConOut != NULL) {
gST->ConOut->ClearScreen (gST->ConOut);
AsciiPrint (
"Booting from '%s' failed; verify it contains a 64-bit UEFI OS.\n"
"\nPress any key to continue booting...\n",
BootOption->Description);
}
if (gST->ConIn != NULL) {
Status = gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &Index);
ASSERT_EFI_ERROR (Status);
ASSERT (Index == 0);
while (!EFI_ERROR (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key))) {}
}
return;
}
}