From nobody Mon Feb 9 11:46:42 2026 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+60286+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+60286+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1590509660; cv=none; d=zohomail.com; s=zohoarc; b=Ke4yqMcN5RV3jYCA7AstoQHqGx9ggjr462nHgT6Lf8bJFtqCr6zCSnqvuR1glwkszs5bhqOiCOID8K04gjV+zFRbrZJJwU6d2O4n/4NX4CQZlqtSteSq5HwBS2WCR/lcDKjuAyU8y4OVid660aTb4+XL5dIl1l8PwoX4XBk9i+Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590509660; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=8dWJPJ82eELLgzJjCpdTlAmgd89eJZJ5qKnDOCVKVqE=; b=cXSGerbeHa1Iz7AJ++WuHTrnGI3cyaq1hFYFSH/NRPb2H9//sc5wbbYbyxSqriEcRTEXzUI9Ig2bDWpiKnnGMbWaz1+/gPH051vlCJ4Ap+ri5cFtPyvqcwT+YgCIAGsVL/mg4YkH1zCz2IMuQmE3oxe5DqbgagAVbFHMgAd3XDI= 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+60286+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1590509660770456.5096055146531; Tue, 26 May 2020 09:14:20 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id o30QYY1788612xdOJFl7KhhU; Tue, 26 May 2020 09:14:20 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.54177.1590509659313696079 for ; Tue, 26 May 2020 09:14:19 -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 C6EFA30E; Tue, 26 May 2020 09:14:17 -0700 (PDT) X-Received: from e123331-lin.nice.arm.com (unknown [10.37.8.89]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BCCCC3F7C3; Tue, 26 May 2020 09:14:16 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: jon@solid-run.com, Ard Biesheuvel Subject: [edk2-devel] [PATCH 1/5] ArmPkg/PlatformBootManagerLib: register 's' as UEFI Shell hotkey Date: Tue, 26 May 2020 18:13:55 +0200 Message-Id: <20200526161359.4810-2-ard.biesheuvel@arm.com> In-Reply-To: <20200526161359.4810-1-ard.biesheuvel@arm.com> References: <20200526161359.4810-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: osRoDCKAOV9DuZ09VBMxLNkSx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590509660; bh=wKUHQxUSuWcXdxUzpkg+9Q5LYONrZiFUyN4KV+hzfvg=; h=Cc:Date:From:Reply-To:Subject:To; b=o6h1klx6lVK4QbhemlLmwUDh1wNkG38mixWkrdfsNYO9VZroQ5WuXGK7z9V4rIGC+8w Pnt0cVq1bfxszQ3TccTUx9TpV87qPzpankQ9MG6WWMtGBfVDHKq/PBHJFPLfXTf8bJSMm 2leYuhyds0oL/quvRzDE0/bn39QkZv/G320= 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 (#60286): https://edk2.groups.io/g/devel/message/60286 Mute This Topic: https://groups.io/mt/74481032/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-