From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web12.8880.1590594052400969680 for ; Wed, 27 May 2020 08:40:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iHSN/sj3; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590594051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8XtWcJa1cSFtfDdj2AKW43oMuYZUWesWTrO8/9Lbr4M=; b=iHSN/sj3PzJRFYNl37IrlYHctzmpaJ0vFGMq8Bav4qvj6yp47lQfnVQbUw8uJR/eApU1EN jYtkWQtM/4Z7yaX5SjvUisQ2dqVo3wv5HlIjdGnlsNg6DY+hNMQcpSMuqB8+hoc+KPMMLx XNZ1X5xweqhTpnLnF/BVgSvONwvZ/EQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-427-bW2o4_RQPdeWrut6tZfkjA-1; Wed, 27 May 2020 11:40:49 -0400 X-MC-Unique: bW2o4_RQPdeWrut6tZfkjA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 684F880183C; Wed, 27 May 2020 15:40:48 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-77.ams2.redhat.com [10.36.113.77]) by smtp.corp.redhat.com (Postfix) with ESMTP id 529155D9E5; Wed, 27 May 2020 15:40:47 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 3/5] ArmPkg/PlatformBootManagerLib: hide UEFI Shell as a regular boot option To: devel@edk2.groups.io, ard.biesheuvel@arm.com Cc: jon@solid-run.com References: <20200526161359.4810-1-ard.biesheuvel@arm.com> <20200526161359.4810-4-ard.biesheuvel@arm.com> From: "Laszlo Ersek" Message-ID: Date: Wed, 27 May 2020 17:40:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200526161359.4810-4-ard.biesheuvel@arm.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 05/26/20 18:13, Ard Biesheuvel wrote: > 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 when 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 > --- > ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > index f91f7cd09ca1..b465f9ff388f 100644 > --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > @@ -778,7 +778,7 @@ PlatformBootManagerAfterConsole ( > Key.ScanCode = SCAN_NULL; > Key.UnicodeChar = L's'; > PlatformRegisterFvBootOption ( > - &gUefiShellFileGuid, L"UEFI Shell", LOAD_OPTION_ACTIVE, &Key > + &gUefiShellFileGuid, L"UEFI Shell", LOAD_OPTION_HIDDEN, &Key > ); > } > > This is a policy decision for ArmPkg/PlatformBootManagerLib, which affects ArmVirtXen and probably a number of physical ARM platforms. I'm OK with that. This patch does two things (which I don't mean as a request to split the patch), it clears LOAD_OPTION_ACTIVE, and sets LOAD_OPTION_HIDDEN. From the spec: - "If a load option is marked as LOAD_OPTION_ACTIVE, the boot manager will attempt to boot automatically using the device path information in the load option. This provides an easy way to disable or enable load options without needing to delete and re-add them." - "If any Boot#### load option is marked as LOAD_OPTION_HIDDEN, then the load option will not appear in the menu (if any) provided by the boot manager for load option selection." So this change will both stop auto-booting the shell, and hide it from the UiApp menu. I'm OK with that. (Maybe add this one sentence to the commit message.) Reviewed-by: Laszlo Ersek Thanks Laszlo