diff options
author | Ard Biesheuvel <ard.biesheuvel@arm.com> | 2020-05-26 16:58:53 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@arm.com> | 2020-05-27 07:54:26 +0200 |
commit | 2d43fd6ff2012cfacee43c0f2ec2bf09dbc8c32f (patch) | |
tree | 31e5293c4e017b63888c2b98c71d32f04f8796c2 | |
parent | 28cc64cb979bf5f638b0eb763532e54abdeb8ada (diff) |
ArmPkg/PlatformBootManagerLib: fall back to the UiApp on boot failure
As a last resort, drop into the UiApp application when no active boot
options could be started. Doing so will connect all devices, and so
it will allow the user to enter the Boot Manager submenu and pick a
network or removable disk option. With the right UiApp library added
in, the UiApp also gives access to the UEFI Shell.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
-rw-r--r-- | ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c index 23c925bbdb..f91f7cd09c 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -830,5 +830,19 @@ PlatformBootManagerUnableToBoot ( VOID
)
{
- return;
+ EFI_STATUS Status;
+ EFI_BOOT_MANAGER_LOAD_OPTION BootManagerMenu;
+
+ //
+ // BootManagerMenu doesn't contain the correct information when return status
+ // is EFI_NOT_FOUND.
+ //
+ Status = EfiBootManagerGetBootManagerMenu (&BootManagerMenu);
+ if (EFI_ERROR (Status)) {
+ return;
+ }
+
+ for (;;) {
+ EfiBootManagerBoot (&BootManagerMenu);
+ }
}
|