diff --git a/MdeModulePkg/Library/BootManagerUiLib/BootManager.c b/MdeModulePkg/Library/BootManagerUiLib/BootManager.c index b7526796d6..0205e760b5 100644 --- a/MdeModulePkg/Library/BootManagerUiLib/BootManager.c +++ b/MdeModulePkg/Library/BootManagerUiLib/BootManager.c @@ -797,7 +797,6 @@ BootManagerCallback ( { EFI_BOOT_MANAGER_LOAD_OPTION *BootOption; UINTN BootOptionCount; - EFI_INPUT_KEY Key; if (Action == EFI_BROWSER_ACTION_FORM_OPEN) { // @@ -842,14 +841,6 @@ BootManagerCallback ( EfiBootManagerBoot (&BootOption[QuestionId - 1]); BmSetConsoleMode (TRUE); - if (EFI_ERROR (BootOption[QuestionId - 1].Status)) { - gST->ConOut->OutputString ( - gST->ConOut, - HiiGetString (gBootManagerPrivate.HiiHandle, STRING_TOKEN (STR_ANY_KEY_CONTINUE), NULL) - ); - gST->ConIn->ReadKeyStroke (gST->ConIn, &Key); - } - EfiBootManagerFreeLoadOptions (BootOption, BootOptionCount); return EFI_SUCCESS; diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c index f7da5bcdfc..a447c5dbe1 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c @@ -1831,6 +1831,8 @@ EfiBootManagerBoot ( UINTN FileSize; EFI_BOOT_LOGO_PROTOCOL *BootLogo; EFI_EVENT LegacyBootEvent; + EFI_INPUT_KEY Key; + UINTN Index; if (BootOption == NULL) { return; @@ -1971,6 +1973,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; } }