From nobody Fri May 3 12:33:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+60389+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60389+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1590657481; cv=none; d=zohomail.com; s=zohoarc; b=ZT9yAimG/T/gVbqzXhXvhOviZTi/P/BKKAoyWOilS0puj1iOBYFijwVrTQftX057mN3SAvod7FWxFM9pv4L1qnKPd20kvhaKPo/smCePDdBkkln6iwMyeDXyYQmcDapKsuwRIqVmrL+AOp/WQUnjnZlLkngpV8NzvMHIAeIkEAY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590657481; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=EST3HkdfxpdfJpoh4/yHMSa2S+ApVFy9W2aZKVXnjm8=; b=LAUq5VS4gNMGzcu2kmiiEoOSZMnFc6KIdEwv99tuOtjyj3GuL2NdUzYeS13fVvPnjvJE3DKRMRDXwt9WkZiqEC7Y8AufQH76qdH2wfTbtvoiQSsneQxgjYPhQFyMUmUNM/ctLLgyvrRpTVYt0wKEadewVXIb3Z/fgHUeU5Mf21U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60389+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1590657481887284.1850660286883; Thu, 28 May 2020 02:18:01 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id T2baYY1788612xeEakDFVSJz; Thu, 28 May 2020 02:18:01 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.8611.1590657481003602155 for ; Thu, 28 May 2020 02:18:01 -0700 X-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 1BBB5D6E; Thu, 28 May 2020 02:17:58 -0700 (PDT) X-Received: from e123331-lin.nice.arm.com (unknown [10.37.8.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 583383F6C4; Thu, 28 May 2020 02:17:56 -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: [edk2-devel] [PATCH v2 1/5] ArmPkg/PlatformBootManagerLib: register 's' as UEFI Shell hotkey Date: Thu, 28 May 2020 11:17:37 +0200 Message-Id: <20200528091741.14610-2-ard.biesheuvel@arm.com> In-Reply-To: <20200528091741.14610-1-ard.biesheuvel@arm.com> References: <20200528091741.14610-1-ard.biesheuvel@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ard.biesheuvel@arm.com X-Gm-Message-State: 5Glq6cl5pfYtkXhCWvTVzNzsx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590657481; bh=xTh2Zc5z0DmlhDWw4PbwHMBhVnKKm7vX7O3yPnUu6eY=; h=Cc:Date:From:Reply-To:Subject:To; b=kLBpS1yDKR9laeaPN2VQR9iHPwyN5AKgFs8Vb7DvAwmO6aesLEcOIkhZaXHSVSSR2IY PkHUnuZ1paUb6Vebc0fSYeQUWDJLiVitquw2c75DvJHM2N723VVNOsKlE7eAnb9tzZ7/V wXHug74QatBAobgg0PI1xT7dAIn8vbV7ib0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" In preparation of hiding the UEFI Shell boot option as an ordinary boot option, make sure we can invoke it directly using the 's' hotkey. Without ConnectAll() having been called, this results in a shell that may have no block devices or other things connected, so don't advertise the 's' in the console string that is printed at boot - for novice users, we will go through the UiApp which connects everything first. For advanced use, having the ability to invoke the UEFI shell without any devices connected may be an advantage, so let's keep this behavior as is for now. Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Li= brary/PlatformBootManagerLib/PlatformBm.c index 4aca1382b042..23c925bbdb9c 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -357,7 +357,8 @@ VOID PlatformRegisterFvBootOption ( CONST EFI_GUID *FileGuid, CHAR16 *Description, - UINT32 Attributes + UINT32 Attributes, + EFI_INPUT_KEY *Key ) { EFI_STATUS Status; @@ -409,6 +410,9 @@ PlatformRegisterFvBootOption ( if (OptionIndex =3D=3D -1) { Status =3D EfiBootManagerAddLoadOptionVariable (&NewOption, MAX_UINTN); ASSERT_EFI_ERROR (Status); + Status =3D EfiBootManagerAddKeyOptionVariable (NULL, + (UINT16)NewOption.OptionNumber, 0, Key, NULL); + ASSERT (Status =3D=3D EFI_SUCCESS || Status =3D=3D EFI_ALREADY_STARTED= ); } EfiBootManagerFreeLoadOption (&NewOption); EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount); @@ -721,6 +725,7 @@ PlatformBootManagerAfterConsole ( UINTN FirmwareVerLength; UINTN PosX; UINTN PosY; + EFI_INPUT_KEY Key; =20 FirmwareVerLength =3D StrLen (PcdGetPtr (PcdFirmwareVersionString)); =20 @@ -770,8 +775,10 @@ PlatformBootManagerAfterConsole ( // // Register UEFI Shell // + Key.ScanCode =3D SCAN_NULL; + Key.UnicodeChar =3D L's'; PlatformRegisterFvBootOption ( - &gUefiShellFileGuid, L"UEFI Shell", LOAD_OPTION_ACTIVE + &gUefiShellFileGuid, L"UEFI Shell", LOAD_OPTION_ACTIVE, &Key ); } =20 --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#60389): https://edk2.groups.io/g/devel/message/60389 Mute This Topic: https://groups.io/mt/74518311/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Fri May 3 12:33:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+60388+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60388+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1590657481; cv=none; d=zohomail.com; s=zohoarc; b=NZOXQxTL3DMOrgsStSXF/3g4BSrqgZIarPs4ibQ7P+YStt8gSQ1FRbuqTSsXpm0l2jZYXYzppPFb5UhV/TDFK3iUpwRoAjwouBFvDy0rgRxTgU17S/xPehRtMEonciwqmYgSbaKlRKNfpRu7VtmoJIUdYhJqR7N4c28DXn7BEb8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590657481; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=zF45E8Fasiak3DxOYsbw2yJxMbuL0bx3cvOAl8Lsa5o=; b=SRQoVjSP+sY7fFUE730ea2QDtTS2G1KYcUPv1fnG56Ez6UH5YkKzP8OxHR9+/KthkAltc7mLfR6zndtOAX80nwSW3Jzg9QbvhF5d+IaREnJZRW9DqyhvMofU6BCm+73oZpluVe4Hk7KklNcvzESFHPS6/TD7HRGlMPECKQk5y1c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60388+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1590657481171798.0499034286787; Thu, 28 May 2020 02:18:01 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 52MtYY1788612xKGTEpJ46qH; Thu, 28 May 2020 02:18:00 -0700 X-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 X-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) X-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: [edk2-devel] [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> In-Reply-To: <20200528091741.14610-1-ard.biesheuvel@arm.com> References: <20200528091741.14610-1-ard.biesheuvel@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ard.biesheuvel@arm.com X-Gm-Message-State: U3uPvqQIDCYxDzV8nMcdxM2Px1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590657480; bh=lKUVH8KPA+zJFaf7te5i4xalTJAdA88XClm/OPclANY=; h=Cc:Date:From:Reply-To:Subject:To; b=p/S5WaLBta3/68xBoucBgXX6wLz8hhCqwskWN/geFE5wMs57xNCoEJe64E3pz/xZgnn q6OKULvnPIJYKVLy+mK7pKxUL7XA5G02/swOlczstjxyQk3UOXaFlumwVyhJdw5BxwnXr fM/N3r7MW4n/QObbHdMJgKZL+rGXwhjcmaM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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(-) diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Li= brary/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 =3D EfiBootManagerGetBootManagerMenu (&BootManagerMenu); + if (EFI_ERROR (Status)) { + return; + } + + for (;;) { + EfiBootManagerBoot (&BootManagerMenu); + } } --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#60388): https://edk2.groups.io/g/devel/message/60388 Mute This Topic: https://groups.io/mt/74518310/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Fri May 3 12:33:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+60390+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60390+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1590657483; cv=none; d=zohomail.com; s=zohoarc; b=XnU90PrkXQeVx+MI3O9UT4kpdFmBq0lP1rGCx1NQ1/M8bvKkbJJ3NZFO5selVa/m8rxgdQJ0pyYKz6zFYJKL/eUiCoWwDi1bOgCybfzXD2b3K+CS5Z5jZjYxVw6DFb0kRZjz/A4Rp+Bv8loqJGAPU6DvOHI1NSytGI29oWQ2CYU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590657483; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=8EEQvsOi6eY1DCJ2325+Rzm8bSg5USeaLgA2+A6A7XM=; b=h2sANzQoah5DL8qhW4WSZwu/QXKQfG/4thVFIinM9HEGkEYUgrmaNsiQVoQLBCasixwgDUAZ4FmDy5mpE+dkfXp0/jYRZgCYLrXrUA2hhamuz4Q/Kg1wAdBRXpMeY2/04oV5WZILm/98jjTlIshysl4TyIjhym+RTv2rtURVNrE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60390+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 159065748346460.74719372784887; Thu, 28 May 2020 02:18:03 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id kPHXYY1788612xOr8xBWMtKp; Thu, 28 May 2020 02:18:03 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.8400.1590657482609298337 for ; Thu, 28 May 2020 02:18:02 -0700 X-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 3499FD6E; Thu, 28 May 2020 02:18:02 -0700 (PDT) X-Received: from e123331-lin.nice.arm.com (unknown [10.37.8.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5779B3F6C4; Thu, 28 May 2020 02:18:00 -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: [edk2-devel] [PATCH v2 3/5] MdeModulePkg/BootManagerUiLib: show inactive boot options Date: Thu, 28 May 2020 11:17:39 +0200 Message-Id: <20200528091741.14610-4-ard.biesheuvel@arm.com> In-Reply-To: <20200528091741.14610-1-ard.biesheuvel@arm.com> References: <20200528091741.14610-1-ard.biesheuvel@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ard.biesheuvel@arm.com X-Gm-Message-State: Waih7yGc1gFKYTQ3qOskjWPSx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590657483; bh=Rq/i0WnkhH7RoZac49TdvoCHTcwowkLa9TFUidOTlF0=; h=Cc:Date:From:Reply-To:Subject:To; b=q35yb7jFtV7siu7nkjE/nw+W0wS7YzPDlr5Z4QLfwAKb7kYyYTKey0IFxUFAKlgLDR5 TYMPjdqhTIL/XYz8Hk3OOO9W0E/eQtVLhMKETZG3t8kLyWcd+hFqYc18SCPmMP/B1GT3V Px/unbfEvrd/IK/sXpn4m1S+KGwySwKSi14= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" UEFI boot options may exist but have the LOAD_OPTION_ACTIVE flag cleared. This means that the boot option should not be selected by default, but it does not mean it should be omitted from the boot selection presented by the boot manager: for this purpose, another flag LOAD_OPTION_HIDDEN exists. Given that the latter flag exists solely for the purpose of omitting boot options from the boot selection menu, and LOAD_OPTION_XXX flags can be combined if desired, hiding inactive boot options as well is a mistake, and violates the intent of paragraph 3.1.3 of the UEFI specification (revision 2.8 errata A). Let's fix this by dropping the LOAD_OPTION_ACTIVE check from the code that populates the boot selection menu. Signed-off-by: Ard Biesheuvel Acked-by: Leif Lindholm Reviewed-by: Laszlo Ersek Reviewed-by: Zhichao Gao --- MdeModulePkg/Library/BootManagerUiLib/BootManager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Library/BootManagerUiLib/BootManager.c b/MdeModul= ePkg/Library/BootManagerUiLib/BootManager.c index 13b40e11b396..4b2c4c77a124 100644 --- a/MdeModulePkg/Library/BootManagerUiLib/BootManager.c +++ b/MdeModulePkg/Library/BootManagerUiLib/BootManager.c @@ -535,9 +535,9 @@ UpdateBootManager ( mKeyInput++; =20 // - // Don't display the hidden/inactive boot option + // Don't display hidden boot options, but retain inactive ones. // - if (((BootOption[Index].Attributes & LOAD_OPTION_HIDDEN) !=3D 0) || ((= BootOption[Index].Attributes & LOAD_OPTION_ACTIVE) =3D=3D 0)) { + if ((BootOption[Index].Attributes & LOAD_OPTION_HIDDEN) !=3D 0) { continue; } =20 --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#60390): https://edk2.groups.io/g/devel/message/60390 Mute This Topic: https://groups.io/mt/74518313/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Fri May 3 12:33:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+60391+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60391+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1590657486; cv=none; d=zohomail.com; s=zohoarc; b=CanM5dlHv1nPnud0cmPhI/EeUmZVy4Th41MYia43WZwuX19SE4vpzKjliu795ZkVPY6UE80bTSU2Y6Y14Tx0dle7BkKhmKgfdRm7upM3MyMaT0oHYgWuiXWhiwcwdlP77RMhJEVooX6hO9cUzoB1OJFf2+75YjDHFXPJylZmeF4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590657486; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=104oqyURnw3P5ft/g4rOAerOQhFL3f+sgCcAJxOGh8o=; b=MTAdWMFpcPInTYxdXs6aizdTkBI4Tu7IuEX9hr9/n+FJX3dcddy+QlvhBGZmFtXV8SmgcuCUNjVUtB6jRPkwQCLNvVA2ac64/B/c6ethFShWR4aezCxKcpxAd5AKUV35BhFlddoF2PWPtxoGTADa90sCVXgGxpfB46PF/bwkgbE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60391+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1590657486462212.14093685258229; Thu, 28 May 2020 02:18:06 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id WS0XYY1788612xz5tQoNEdRa; Thu, 28 May 2020 02:18:06 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.8578.1590657484865899521 for ; Thu, 28 May 2020 02:18:04 -0700 X-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 8A66331B; Thu, 28 May 2020 02:18:04 -0700 (PDT) X-Received: from e123331-lin.nice.arm.com (unknown [10.37.8.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 944293F6C4; Thu, 28 May 2020 02:18:02 -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: [edk2-devel] [PATCH v2 4/5] ArmPkg/PlatformBootManagerLib: hide UEFI Shell as a regular boot option Date: Thu, 28 May 2020 11:17:40 +0200 Message-Id: <20200528091741.14610-5-ard.biesheuvel@arm.com> In-Reply-To: <20200528091741.14610-1-ard.biesheuvel@arm.com> References: <20200528091741.14610-1-ard.biesheuvel@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ard.biesheuvel@arm.com X-Gm-Message-State: KRDvehly94hFcKlHUFFB4k2ax1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590657486; bh=1VVXkVxTAZpupAM3ZzdnHihoYkpZH4YFUsVhWw63NwI=; h=Cc:Date:From:Reply-To:Subject:To; b=Y/cy9+GrDalSCpib4ZmkuMVXlMTJljpV8HCz5Pgn1gLv8Y7RZjvq3QGbptwO+9ywxxF kKDbxy0Bkz7nHtqgdJaT6b+BBRTsQE/XR2nZCHr1/+vfBvgABKJTC5yJzmgWbNlhBfU6V BalirBbO94ya3IFvufdgNMHB/AV7bdDOvtQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Without ConnectAll() being called on the boot path, the UEFI shell will be entered with no block devices or anything else connected, and so for the novice user, this is not a very accommodating environment. Now that we have made the UiApp the last resort on boot failure, and made the UEFI Shell accessible directly via the 's' hotkey if you really need it, let's hide it as an ordinary boot option. Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek Reviewed-by: Leif Lindholm --- ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Li= brary/PlatformBootManagerLib/PlatformBm.c index 85cb32f6d7cd..1e9b736993d0 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -777,9 +777,7 @@ PlatformBootManagerAfterConsole ( // Key.ScanCode =3D SCAN_NULL; Key.UnicodeChar =3D L's'; - PlatformRegisterFvBootOption ( - &gUefiShellFileGuid, L"UEFI Shell", LOAD_OPTION_ACTIVE, &Key - ); + PlatformRegisterFvBootOption (&gUefiShellFileGuid, L"UEFI Shell", 0, &Ke= y); } =20 /** --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#60391): https://edk2.groups.io/g/devel/message/60391 Mute This Topic: https://groups.io/mt/74518314/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Fri May 3 12:33:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+60392+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60392+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1590657488; cv=none; d=zohomail.com; s=zohoarc; b=D8IYW9Sr8BfhL9IQAhd9v72QD/losI6UKXBUbEUsDW2xaLwc4OisK1O1sc9cb/zh42Xgki8iiIImPglc4q4BEEeF9tVNN3wxf0lGO/kjn0U0kNtwnDCT4zOPhj/DsdjjLPrFG3CUTZhyOGwoF0YCKIuoeZMQOenhlO8603rJqs4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590657488; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=fzqVuGWFC1XNA9OsrLs+4+Lqa2mw16fQ/d2IDNKgMo0=; b=XHmIExHqLkbbwLtqdPHxTcEpF/ApMgF3OJ1eziw/zQwmHOEvntlcDbTybx9/ZWXPNbVEOmATtgSR5CW2kRRqCQyhRRdtW5j7M0k41c89m9ZLlHHhxc4AfUGlHnTP42eQ3OWISFYTUDV101SBMENT1raTJuW0PA3FXaRaOpUJD5U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60392+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1590657488044223.84759920649674; Thu, 28 May 2020 02:18:08 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id hq7eYY1788612xuIsqCtjK5D; Thu, 28 May 2020 02:18:07 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.8613.1590657487223579891 for ; Thu, 28 May 2020 02:18:07 -0700 X-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 D9E1731B; Thu, 28 May 2020 02:18:06 -0700 (PDT) X-Received: from e123331-lin.nice.arm.com (unknown [10.37.8.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EB0833F6C4; Thu, 28 May 2020 02:18:04 -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: [edk2-devel] [PATCH v2 5/5] ArmPkg/PlatformBootManagerLib: don't connect all devices on each boot Date: Thu, 28 May 2020 11:17:41 +0200 Message-Id: <20200528091741.14610-6-ard.biesheuvel@arm.com> In-Reply-To: <20200528091741.14610-1-ard.biesheuvel@arm.com> References: <20200528091741.14610-1-ard.biesheuvel@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ard.biesheuvel@arm.com X-Gm-Message-State: S6G17gKREKUVYr8WJunpLg9Qx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590657487; bh=MHdh7ns0y9JRyIpuI4dQjjUPjctx5WFHC4IgFhtZbW8=; h=Cc:Date:From:Reply-To:Subject:To; b=ty8uIG5D4PcLTJJ/SEo6qaOziHqakEXLWCf4vyJrzTLafChaS4a8UKvCkI+Y7uMiV3/ Pac4O0nL4mba4mhJuHXJLTVtanS6DG2lwemSUBdQAbkgGXap0uB5eWjURrw+bNjwnh7SK 1n/u3Bot3tvfZCJMIM7y5Y17R1Xh+/A779s= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" In order to avoid boot delays from devices such as network controllers that may not even be involved in booting at all, drop the call to EfiBootManagerConnectAll () from the boot path. It will be called by UiApp, so when going through the menu, all devices will be connected as usual, but for the default boot, it is really not necessary so let's get rid of this. Enumerating all possible boot options and creating Boot#### variables for them is equally unnecessary in the default case, and also happens automatically in UiApp, so drop that as well. Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Li= brary/PlatformBootManagerLib/PlatformBm.c index 1e9b736993d0..15c5cac1bea0 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -753,11 +753,6 @@ PlatformBootManagerAfterConsole ( } } =20 - // - // Connect the rest of the devices. - // - EfiBootManagerConnectAll (); - // // On ARM, there is currently no reason to use the phased capsule // update approach where some capsules are dispatched before EndOfDxe @@ -767,11 +762,6 @@ PlatformBootManagerAfterConsole ( // HandleCapsules (); =20 - // - // Enumerate all possible boot options. - // - EfiBootManagerRefreshAllBootOption (); - // // Register UEFI Shell // --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#60392): https://edk2.groups.io/g/devel/message/60392 Mute This Topic: https://groups.io/mt/74518315/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-