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.6898.1591090034744960137 for ; Tue, 02 Jun 2020 02:27:15 -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 9835F55D; Tue, 2 Jun 2020 02:27:13 -0700 (PDT) Received: from [192.168.7.187] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 25CD63F305; Tue, 2 Jun 2020 02:27:12 -0700 (PDT) Subject: Re: [PATCH v2 3/5] MdeModulePkg/BootManagerUiLib: show inactive boot options To: "Gao, Zhichao" , "devel@edk2.groups.io" Cc: "jon@solid-run.com" , Laszlo Ersek , Leif Lindholm , "Ni, Ray" References: <20200528091741.14610-1-ard.biesheuvel@arm.com> <20200528091741.14610-4-ard.biesheuvel@arm.com> From: "Ard Biesheuvel" Message-ID: <585dec50-7a5a-6595-d0b3-d0dc589eaef6@arm.com> Date: Tue, 2 Jun 2020 11:26:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 6/2/20 11:11 AM, Gao, Zhichao wrote: > Hi Ard, > > Form the Uefi 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. > ''' > The ACTIVE flag seems to enable/disable the option. > Sure. But this change does not affect what gets booted automatically, it changes what gets presented as available options in the UiApp boot manager menu. To hide options from this menu, a different flag HIDDEN is provided. The UEFI spec clearly mentions that - the ACTIVE flag defines which boot options may be booted *automatically* - the HIDDEN flag defines which boot options are hidden from the menu which allows options to be booted *manually* So preventing ACTIVE options from being booted manually is incorrect. That is what the patch fixes. > ''' > Boot#### load options with LOAD_OPTION_CATEGORY set to LOAD_OPTION_CATEGORY_APP are > executables which are not part of the normal boot processing but can be optionally chosen for execution > if boot menu is provided, or via Hot Keys. See Section 3.1.6 for details > ''' > There is another flag to implement your function. The option with ACTIVE | CATEGORY | CATEGORY_APP should show in the boot menu but not in the normal boot flow. > But this prevents me from setting BootNext to the Shell option, and boot it automatically on the next boot, right?