From 40e2e3ca33f93f5d45b469bd7aa486b1423ce9ad Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Thu, 28 May 2020 11:17:38 +0200 Subject: 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. Note that this only occurs if even the default removable filepath could not be booted (e.g., \EFI\BOOT\BOOTAA64.EFI on AArch64) Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek Reviewed-by: Leif Lindholm --- ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'ArmPkg') diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c index 23c925bbdb..85cb32f6d7 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -830,5 +830,15 @@ PlatformBootManagerUnableToBoot ( VOID ) { - return; + EFI_STATUS Status; + EFI_BOOT_MANAGER_LOAD_OPTION BootManagerMenu; + + Status = EfiBootManagerGetBootManagerMenu (&BootManagerMenu); + if (EFI_ERROR (Status)) { + return; + } + + for (;;) { + EfiBootManagerBoot (&BootManagerMenu); + } } -- cgit v1.2.3