MdeModulePkg: Wait for input on each boot failure

This commit is contained in:
Tim Crawford
2020-02-04 13:40:13 -07:00
parent e458f432b6
commit 4249b8eb5b
2 changed files with 23 additions and 8 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,19 @@ EfiBootManagerBoot (
BmDestroyRamDisk (RamDiskDevicePath);
FreePool (RamDiskDevicePath);
}
if (gST->ConIn != NULL) {
gST->ConOut->ClearScreen (gST->ConOut);
AsciiPrint (
"Boot Failed. %s\n"
"Press any key to continue...\n",
BootOption->Description);
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;
}
}