public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Zhichao" <zhichao.gao@intel.com>
To: Ard Biesheuvel <ard.biesheuvel@arm.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "jon@solid-run.com" <jon@solid-run.com>,
	Laszlo Ersek <lersek@redhat.com>,
	Leif Lindholm <leif@nuviainc.com>, "Ni, Ray" <ray.ni@intel.com>
Subject: Re: [PATCH v2 3/5] MdeModulePkg/BootManagerUiLib: show inactive boot options
Date: Tue, 2 Jun 2020 09:11:38 +0000	[thread overview]
Message-ID: <DM6PR11MB4425534CD94C1429FBF84164F68B0@DM6PR11MB4425.namprd11.prod.outlook.com> (raw)
In-Reply-To: <bc7c985d-7b02-a864-9376-455e157e9f5c@arm.com>

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.

'''
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.

Thanks,
Zhichao

> -----Original Message-----
> From: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Sent: Tuesday, June 2, 2020 4:26 PM
> To: devel@edk2.groups.io
> Cc: jon@solid-run.com; Laszlo Ersek <lersek@redhat.com>; Leif Lindholm
> <leif@nuviainc.com>; Ni, Ray <ray.ni@intel.com>; Gao, Zhichao
> <zhichao.gao@intel.com>
> Subject: Re: [PATCH v2 3/5] MdeModulePkg/BootManagerUiLib: show
> inactive boot options
> 
> Ray, Zhichao,
> 
> Do you have any comments on this patch?
> 
> 
> On 5/28/20 11:17 AM, Ard Biesheuvel wrote:
> > UEFI boot options may exist but have the LOAD_OPTION_ACTIVE flag
> > cleared. This means that the boot option should not be selected by
> > default, but it does not mean it should be omitted from the boot
> > selection presented by the boot manager: for this purpose, another
> > flag LOAD_OPTION_HIDDEN exists.
> >
> > Given that the latter flag exists solely for the purpose of omitting
> > boot options from the boot selection menu, and LOAD_OPTION_XXX flags
> > can be combined if desired, hiding inactive boot options as well is a
> > mistake, and violates the intent of paragraph 3.1.3 of the UEFI
> > specification (revision 2.8 errata A). Let's fix this by dropping the
> > LOAD_OPTION_ACTIVE check from the code that populates the boot
> > selection menu.
> >
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > ---
> >   MdeModulePkg/Library/BootManagerUiLib/BootManager.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/MdeModulePkg/Library/BootManagerUiLib/BootManager.c
> > b/MdeModulePkg/Library/BootManagerUiLib/BootManager.c
> > index 13b40e11b396..4b2c4c77a124 100644
> > --- a/MdeModulePkg/Library/BootManagerUiLib/BootManager.c
> > +++ b/MdeModulePkg/Library/BootManagerUiLib/BootManager.c
> > @@ -535,9 +535,9 @@ UpdateBootManager (
> >       mKeyInput++;
> >
> >       //
> > -    // Don't display the hidden/inactive boot option
> > +    // Don't display hidden boot options, but retain inactive ones.
> >       //
> > -    if (((BootOption[Index].Attributes & LOAD_OPTION_HIDDEN) != 0) ||
> ((BootOption[Index].Attributes & LOAD_OPTION_ACTIVE) == 0)) {
> > +    if ((BootOption[Index].Attributes & LOAD_OPTION_HIDDEN) != 0) {
> >         continue;
> >       }
> >
> >


  reply	other threads:[~2020-06-02  9:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  9:17 [PATCH v2 0/5] ArmPkg/PlatformBootManagerLib: play nice without ConnectAll() Ard Biesheuvel
2020-05-28  9:17 ` [PATCH v2 1/5] ArmPkg/PlatformBootManagerLib: register 's' as UEFI Shell hotkey Ard Biesheuvel
2020-05-28  9:17 ` [PATCH v2 2/5] ArmPkg/PlatformBootManagerLib: fall back to the UiApp on boot failure Ard Biesheuvel
2020-06-01 11:55   ` Leif Lindholm
2020-05-28  9:17 ` [PATCH v2 3/5] MdeModulePkg/BootManagerUiLib: show inactive boot options Ard Biesheuvel
2020-05-28 19:57   ` Laszlo Ersek
2020-06-01 11:56   ` Leif Lindholm
2020-06-02  8:25   ` Ard Biesheuvel
2020-06-02  9:11     ` Gao, Zhichao [this message]
2020-06-02  9:26       ` Ard Biesheuvel
2020-06-03 12:26         ` Gao, Zhichao
2020-05-28  9:17 ` [PATCH v2 4/5] ArmPkg/PlatformBootManagerLib: hide UEFI Shell as a regular boot option Ard Biesheuvel
2020-05-28 19:58   ` Laszlo Ersek
2020-06-01 12:01   ` Leif Lindholm
2020-06-01 12:08     ` Ard Biesheuvel
2020-06-01 12:36       ` Leif Lindholm
2020-05-28  9:17 ` [PATCH v2 5/5] ArmPkg/PlatformBootManagerLib: don't connect all devices on each boot Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB4425534CD94C1429FBF84164F68B0@DM6PR11MB4425.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox