From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web12.193.1590595048449401877 for ; Wed, 27 May 2020 08:57:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PTyurqVT; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590595047; 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=gW8Kt3H+bt373jdZqiFoU7RgoBOFIglEhNvpQXrG5xI=; b=PTyurqVTN72cH8Ccs0GZe/UdosoG84zfW4+XFvy1kH1B2TFJNWOb+CIVMZS1uU+2cTwcgb oo1i2IYQ2DRKqMkEQLnOMDI94zzvqjpU7k0Ydy3AZZMNWagbrK8/OE2zCeFgMlOllJ/Gxi BLOhEN6r3E2aKVjxIGHt8Z+iGLAAKTM= 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-354-OmbkX3eSNxm0XpcAYanPHQ-1; Wed, 27 May 2020 11:57:24 -0400 X-MC-Unique: OmbkX3eSNxm0XpcAYanPHQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C86A880183C; Wed, 27 May 2020 15:57:23 +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 0424526198; Wed, 27 May 2020 15:57:22 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 5/5] ShellPkg: add BootManager library to add UEFI Shell menu 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-6-ard.biesheuvel@arm.com> From: "Laszlo Ersek" Message-ID: Date: Wed, 27 May 2020 17:57:22 +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-6-ard.biesheuvel@arm.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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: > Add a plug-in library for UiApp that creates a 'UEFI Shell' menu > option at the root level which gives access to a form that allows > the UEFI Shell to be launched. > > This gives the PlatformBootManagerLib implementation of the platform > more flexibility in the way it handles boot options pointing to the > UEFI Shell, which will typically be invoked with only the boot path > connected on fast boots. > > This library may be incorporated to a platform build by adding a > NULL resolution to the section of the UiApp.inf > {} block in the platform .DSC > > Signed-off-by: Ard Biesheuvel > --- > ShellPkg/Library/ShellBootManagerLib/ShellBootManagerLib.inf | 45 ++++ > ShellPkg/Library/ShellBootManagerLib/ShellBootManagerLib.h | 44 ++++ > ShellPkg/Library/ShellBootManagerLib/ShellBootManagerLib.c | 258 ++++++++++++++++++++ > ShellPkg/Library/ShellBootManagerLib/ShellBmStrings.uni | 17 ++ > ShellPkg/Library/ShellBootManagerLib/ShellBmVfr.Vfr | 37 +++ > 5 files changed, 401 insertions(+) I've had to go back to the blurb and re-read this part, to understand the goal of this patch: > - finally, add a plugin library for UiApp to expose the UEFI Shell via an > ordinary main menu option (this works around the fact that patch #3 will > result in the UEFI Shell disappearing from the Boot Manager list). > Entering the shell this way will resemble the old situation, given that > UiApp connects all devices and refreshes all boot options etc at launch. If I understand correctly: - patch #3 does two things: it clears LOAD_OPTION_ACTIVE (preventing the boot manager from auto-booting the shell), and sets LOAD_OPTION_HIDDEN (hiding the boot option from UiApp), - patch #5 undoes LOAD_OPTION_HIDDEN, in effect -- it makes sure that we still see the shell option "somewhere" in UiApp (not among the boot options, but at the root level) Can we: - drop patch#5, and - pass zero (0) as "Attributes" to PlatformRegisterFvBootOption() in patch#3, rather than LOAD_OPTION_HIDDEN? Because, per spec, Attributes=0 should prevent the auto-booting of the shell *without* hiding the shell boot option from the menu. Thanks, Laszlo