diff --git a/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.c b/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.c index 011c2df0bf..859cfd946d 100644 --- a/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.c +++ b/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.c @@ -1317,6 +1317,8 @@ Returns: { CHAR16 *TmpStr; + gST->ConOut->ClearScreen(gST->ConOut); + // // If Boot returned with EFI_SUCCESS and there is not in the boot device // select loop then we need to pop up a UI and wait for user input. @@ -1360,6 +1362,8 @@ Returns: { CHAR16 *TmpStr; + gST->ConOut->ClearScreen(gST->ConOut); + // // If Boot returned with failed status then we need to pop up a UI and wait // for user input. diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c index b9bbce6150..b899deca99 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c @@ -105,6 +105,8 @@ BdsBootDeviceSelect ( BOOLEAN BootNextExist; LIST_ENTRY *LinkBootNext; EFI_EVENT ConnectConInEvent; + UINTN Index; + EFI_INPUT_KEY Key; // // Got the latest boot option @@ -273,6 +275,16 @@ BdsBootDeviceSelect ( BootOption->StatusString = GetStringById (STRING_TOKEN (STR_BOOT_FAILED)); PlatformBdsBootFail (BootOption, Status, ExitData, ExitDataSize); + // Wait for key + gST->ConOut->OutputString ( + gST->ConOut, + GetStringById (STRING_TOKEN (STR_ANY_KEY_CONTINUE)) + ); + Status = gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &Index); + ASSERT_EFI_ERROR (Status); + ASSERT (Index == 0); + while (!EFI_ERROR (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key))) {} + // // Check the next boot option // diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c index 90aa8f59cc..1dca7579c7 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c @@ -203,6 +203,7 @@ CallBootManager ( CHAR16 *ExitData; UINTN ExitDataSize; EFI_STRING_ID Token; + UINTN Index; EFI_INPUT_KEY Key; CHAR16 *HelpString; UINTN HelpSize; @@ -390,10 +391,15 @@ CallBootManager ( } else { gOption->StatusString = GetStringById (STRING_TOKEN (STR_BOOT_FAILED)); PlatformBdsBootFail (gOption, Status, ExitData, ExitDataSize); + + // Wait for key gST->ConOut->OutputString ( gST->ConOut, GetStringById (STRING_TOKEN (STR_ANY_KEY_CONTINUE)) ); - gST->ConIn->ReadKeyStroke (gST->ConIn, &Key); + Status = gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &Index); + ASSERT_EFI_ERROR (Status); + ASSERT (Index == 0); + while (!EFI_ERROR (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key))) {} } } diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c b/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c index 8e33062a54..0da0f961e5 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c @@ -77,6 +77,8 @@ HotkeyBoot ( EFI_STATUS Status; UINTN ExitDataSize; CHAR16 *ExitData; + UINTN Index; + EFI_INPUT_KEY Key; if (mHotkeyBootOption == NULL) { return EFI_NOT_FOUND; @@ -97,6 +99,16 @@ HotkeyBoot ( // mHotkeyBootOption->StatusString = GetStringById (STRING_TOKEN (STR_BOOT_FAILED)); PlatformBdsBootFail (mHotkeyBootOption, Status, ExitData, ExitDataSize); + + // Wait for key + gST->ConOut->OutputString ( + gST->ConOut, + GetStringById (STRING_TOKEN (STR_ANY_KEY_CONTINUE)) + ); + Status = gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &Index); + ASSERT_EFI_ERROR (Status); + ASSERT (Index == 0); + while (!EFI_ERROR (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key))) {} } else { // // Call platform action to indicate the boot success