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.web11.8385.1681476310043844748 for ; Fri, 14 Apr 2023 05:45:10 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@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 B02172F4; Fri, 14 Apr 2023 05:45:53 -0700 (PDT) Received: from [10.57.19.162] (unknown [10.57.19.162]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EAD933F587; Fri, 14 Apr 2023 05:45:07 -0700 (PDT) Message-ID: Date: Fri, 14 Apr 2023 14:45:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 1/1] ArmPkg/PlatformBootManagerLib: Add path to boot UEFI Shell over UiApp To: Ard Biesheuvel Cc: devel@edk2.groups.io, leif@nuviainc.com, sami.mujawar@arm.com, patrik.berglund@arm.com, Pierre Gondois References: <20230207090653.395992-1-pierre.gondois@arm.com> From: "PierreGondois" In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello Ard, On 2/9/23 17:57, Ard Biesheuvel wrote: > On Tue, 7 Feb 2023 at 10:07, wrote: >> >> From: Pierre Gondois >> >> The UEFI Shell is a non-active boot option, at the opposite of UiApp. >> If no valid boot option is found, UiApp is selected. UiApp requires a >> human interaction. When installing a new EDKII image in CIs or when >> scripting is required, this is problematic. >> >> If no valid boot option is discovered, add a path to directly go to >> the UEFI Shell where the startup.nsh script is automatically executed. >> The UEFI Shell is launched after connecting possible devices, but >> before the reset that is meant to automatically make them visible. >> >> The new PcdUefiShellDefaultBootEnable must be set to TRUE to enable >> this behaviour. The Pcd is set to false by default. >> > > Is this similar to how we implemented this on RPi4? IIRC, a similar > issue came up there as well. KvmTool, Qemu, Xen and CloudHv use the following implementation: PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf Testing: - using kvmtool - not pressing any key during the process I end-up in the boot menu (so not the UEFI shell). When trying with a zero-ed flash.img, kvmtool exits with the following: 'PlatformBootManagerUnableToBoot: rebooting after refreshing all boot options' Then the flash is populated and the second attempt reaches the boot menu. With the new PcdUefiShellDefaultBootEnable set to TRUE, we directly reach the UEFI shell. Regards, Pierre