Improve error output when boot option fails to load
This commit is contained in:
committed by
Tim Crawford
parent
7050fc3a26
commit
52d5d1b2c5
@ -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.
|
||||
|
@ -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
|
||||
//
|
||||
|
@ -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))) {}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user