From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from nwk-aaemail-lapp03.apple.com (nwk-aaemail-lapp03.apple.com [17.151.62.68]) by mx.groups.io with SMTP id smtpd.web11.6299.1572972764932635199 for ; Tue, 05 Nov 2019 08:52:45 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=X/yHgdZs; spf=pass (domain: apple.com, ip: 17.151.62.68, mailfrom: afish@apple.com) Received: from pps.filterd (nwk-aaemail-lapp03.apple.com [127.0.0.1]) by nwk-aaemail-lapp03.apple.com (8.16.0.27/8.16.0.27) with SMTP id xA5GqUbc011342; Tue, 5 Nov 2019 08:52:43 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=sender : content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=20180706; bh=SWsGGZrRclUorHFIbG6I+IZscRwRyBDXWxb7o8WhULU=; b=X/yHgdZsjPExSviC1YR+DtybWDqUNQOWrkbzjGySCflYI8ykdsAW6dkxTNAxjuyEha+z fs5divCkGtfp6ELDXsDSl0dps9BTS49OZtnuLSOVmYwe961gFkNwUBUbXbZ24jKjzgVA bFykK9zQPMVjYcBSr4FzywcTcgUK8bmnkEdzcKcza8AZ7liBa2x9qHHWbqfP72vldVqO a6mByzBvoYmdXcPNikLm4BEc5yiAI8PMblV7Nb8XHDosLSjGNbvR0h17Xd7KTgKIDWGr ikN4mjiQMG0P9OG4lPyuttHyiOAWKUvilgPhTN0dUkhKB/5Kgrm6x+/A4//LZmEG3pQI zQ== Received: from ma-mailsvcp-mta-lapp03.corp.apple.com (ma-mailsvcp-mta-lapp03.corp.apple.com [10.226.18.135]) by nwk-aaemail-lapp03.apple.com with ESMTP id 2w1t1mf9hs-6 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 05 Nov 2019 08:52:43 -0800 Received: from ma-mailsvcp-mmp-lapp03.apple.com (ma-mailsvcp-mmp-lapp03.apple.com [17.32.222.16]) by ma-mailsvcp-mta-lapp03.corp.apple.com (Oracle Communications Messaging Server 8.1.0.1.20190704 64bit (built Jul 4 2019)) with ESMTPS id <0Q0I00GM49JKU520@ma-mailsvcp-mta-lapp03.corp.apple.com>; Tue, 05 Nov 2019 08:52:32 -0800 (PST) Received: from process_milters-daemon.ma-mailsvcp-mmp-lapp03.apple.com by ma-mailsvcp-mmp-lapp03.apple.com (Oracle Communications Messaging Server 8.1.0.1.20190704 64bit (built Jul 4 2019)) id <0Q0I00J009GBEM00@ma-mailsvcp-mmp-lapp03.apple.com>; Tue, 05 Nov 2019 08:52:32 -0800 (PST) X-Va-A: X-Va-T-CD: 07a9f7dd315dc6000695a0402a47d12d X-Va-E-CD: be490e393b9a0fc46442780b7330e634 X-Va-R-CD: 080c83ebb59fdc40182a21f863857514 X-Va-CD: 0 X-Va-ID: 45095e03-5ecd-48d9-9574-1f6fe60301aa X-V-A: X-V-T-CD: 07a9f7dd315dc6000695a0402a47d12d X-V-E-CD: be490e393b9a0fc46442780b7330e634 X-V-R-CD: 080c83ebb59fdc40182a21f863857514 X-V-CD: 0 X-V-ID: 8361444d-601f-4ef4-8b51-51e83849bfe4 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-11-05_06:,, signatures=0 Received: from [17.103.47.195] (unknown [17.103.47.195]) by ma-mailsvcp-mmp-lapp03.apple.com (Oracle Communications Messaging Server 8.1.0.1.20190704 64bit (built Jul 4 2019)) with ESMTPSA id <0Q0I00XM49JJSJ80@ma-mailsvcp-mmp-lapp03.apple.com>; Tue, 05 Nov 2019 08:52:32 -0800 (PST) Sender: afish@apple.com MIME-version: 1.0 (Mac OS X Mail 13.0 \(3594.4.17\)) Subject: Re: [edk2-devel] [PATCH] Support skipping automatic BM enumeration From: "Andrew Fish" In-reply-to: Date: Tue, 05 Nov 2019 10:52:30 -0600 Cc: devel@edk2.groups.io, Ashish Singhal , "Ni, Ray" , "Wang, Jian J" , "Wu, Hao A" , "Gao, Zhichao" , Mike Kinney Message-id: <37D801DD-41E8-452E-9F24-ADF52BFDB676@apple.com> References: <1b91c052-f64c-1dca-98ff-a2777afd7f77@redhat.com> <734D49CCEBEEF84792F5B80ED585239D5C34F98A@SHSMSX104.ccr.corp.intel.com> <6766B443-E14A-4F57-984E-5A865FB22CC9@apple.com> To: Laszlo Ersek X-Mailer: Apple Mail (2.3594.4.17) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-11-05_06:,, signatures=0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: quoted-printable > On Nov 5, 2019, at 3:54 AM, Laszlo Ersek wrote: >=20 > On 11/05/19 07:15, Andrew Fish via Groups.Io wrote: >=20 >> You could also edit any existing variables that point to your Load = File to make sure they follow the rules you care about?=20 >>=20 >> It is legal from an UEFI spec point of view for a platform to edit = the nvram boot variables based on platform boot policy.=20 >=20 > Good point; for example OVMF and ArmVirtQemu* do this, with the help = of > QemuBootOrderLib. In essence: >=20 > - connect a particular set of devices ("ConnectDevicesFromQemu") > - if that fails, call EfiBootManagerConnectAll() >=20 > - call EfiBootManagerRefreshAllBootOption() >=20 > - register UEFI Shell boot option manually >=20 > - filter and reorder boot options in a platform specific way > ("RemoveStaleFvFileOptions", "SetBootOrderFromQemu") >=20 > All this happens in PlatformBootManagerAfterConsole(). >=20 The intent of the EFI Boot Variables was generally for the OS Installer = to write the nvram boot variable with the EFI_LOAD_OPTION (BootXXXX = variable name, XXXX is the UINT16 hex value in BootoOrder) info. The = reasons being the EFI code may not know the path to the OS Loader, or = the arguments that should be passed to the OS Loader.=20 I'd also point out EFI_LOAD_OPTION.Attributes has LOAD_OPTION_ACTIVE = and LOAD_OPTION_HIDDEN bits that give you more control of how the Boot = Manager/BDS will deal with the existing nvram boot option.=20 Thanks, Andrew Fish > Thanks, > Laszlo >=20