From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.8398.1590657480357039806 for ; Thu, 28 May 2020 02:18:00 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 032C731B; Thu, 28 May 2020 02:18:00 -0700 (PDT) Received: from e123331-lin.nice.arm.com (unknown [10.37.8.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6D88F3F6C4; Thu, 28 May 2020 02:17:58 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: jon@solid-run.com, Ard Biesheuvel , Laszlo Ersek , Leif Lindholm , Ray Ni , Zhichao Gao Subject: [PATCH v2 2/5] ArmPkg/PlatformBootManagerLib: fall back to the UiApp on boot failure Date: Thu, 28 May 2020 11:17:38 +0200 Message-Id: <20200528091741.14610-3-ard.biesheuvel@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200528091741.14610-1-ard.biesheuvel@arm.com> References: <20200528091741.14610-1-ard.biesheuvel@arm.com> 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 --- ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c index 23c925bbdb9c..85cb32f6d7cd 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); + } } -- 2.17.1