From nobody Mon Feb 9 22:02:54 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+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-