From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.443.1590557723428709333 for ; Tue, 26 May 2020 22:35:23 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) 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 0A22255D; Tue, 26 May 2020 22:35:22 -0700 (PDT) Received: from [192.168.1.81] (unknown [10.37.8.89]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B5B8E3F305; Tue, 26 May 2020 22:35:20 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH 0/5] ArmPkg/PlatformBootManagerLib: play nice without ConnectAll() To: devel@edk2.groups.io, leif@nuviainc.com Cc: jon@solid-run.com, Laszlo Ersek , Ray Ni , Zhichao Gao References: <20200526161359.4810-1-ard.biesheuvel@arm.com> <20200526220151.GV1923@vanye> From: "Ard Biesheuvel" Message-ID: Date: Wed, 27 May 2020 07:35:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200526220151.GV1923@vanye> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 5/27/20 12:01 AM, Leif Lindholm via groups.io wrote: > On Tue, May 26, 2020 at 18:13:54 +0200, Ard Biesheuvel wrote: >> Currently, Armpkg's PlatformBootManagerLib connects all controller to >> their drivers recursively, even if the active boot option does not >> require it. There are some historical reasons for this, some of which are >> being addressed in separate patches. >> >> This series addresses the way ArmPkg's PlatformBootManagerLib implementation >> deals with the UEFI Shell and the UiApp: currently, the shell is always >> added as an ordinary boot option, which will be started if no other boot >> options can be started, or if it is the first one in the boot order. >> >> Once we remove the ConnectAll() call from PlatformBootManagerLib, those shells >> will be launched without any block or other devices connected, which may >> confuse novice users. So before doing so, let's make the handling a bit more >> sane: >> - add a 's' hotkey that enters the UEFI shell regardless of its priority >> in the BootOrder - this shell will be entered with no devices connected >> after patch #4 >> - enter the UiApp as a last resort if no boot options can be started >> - make the UEFI Shell boot option hidden, so it is not started by default >> (only by hotkey or BootNext) >> - remove the ConnectAll() call from PlatformBootManagerLib >> - 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. > > I get why this set was sent in isolation, but could we also discuss > somewhat what we would plan to do with the edk2-platforms that make > use of the ArmPkg PlatformBootManagerLib? > > Not attempting a fallback boot onto network is probably an acceptable > change to pick up, but having an undocumented hotkey as the only way > into a shell that now doesn't map devices could be a bit aggravating. > It is not the only way, and it is not even the preferred way. Patch 5/5 adds an option to the UiApp root menu to enter the UEFI Shell, in a way that is independent from boot option handling. Since you enter UiApp first, all handles will be connected and boot options refreshed as usual. In cases where you want to avoid this from happening, you can use the 's' key to drop into a shell directly.