From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mx.groups.io with SMTP id smtpd.web11.35080.1591012579215571910 for ; Mon, 01 Jun 2020 04:56:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=O3qiCkeM; spf=pass (domain: nuviainc.com, ip: 209.85.128.66, mailfrom: leif@nuviainc.com) Received: by mail-wm1-f66.google.com with SMTP id l26so10404791wme.3 for ; Mon, 01 Jun 2020 04:56:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4yZ5cYrhP0B5VC3IJkAZvIZT58g/12XxmDzmUz5DOFI=; b=O3qiCkeMAYYwCG8lRssIJAHZLvCIoJPgYkQryyaObNsKkZn1hRRctoI4LbCfYaMkMK GkaPbaQDgFyPIw4+usgBRC9eGGBCbeuOvWG+0ew8kWsbJCDzrpSveIL2YVdPBUy5THPS 07ysaGqIb2Z2L02xQgam0jKFdB/GTfJUtknZmI55MQvGqyjqDzxnoeIUPTYsLiFkZ+Uc E78HeD7yjkbYUNVAjKzTEwxqK09N6rNP28fKJQy6Pguwr+vVCeTxWOLN4O2z3ke8vuS9 38ZG6TA/SIbsTT5Z4lTfd5j0LMN/60quXuy46I3NSprutKbCt+Ah2kPhebHYGQFj2NWs zOnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4yZ5cYrhP0B5VC3IJkAZvIZT58g/12XxmDzmUz5DOFI=; b=nbkYDVRFJWOqfPPAITkj2oNmmssEZ/TLRh4tRoq7x6cPYR8UURwHhUNyLgJIwJQLj8 6pqLhZetv7ewUQVlAW2g/SqP4X7+45vITFYM4jQOp1hvJLcOB1IMPBHWFKfj4rpJ4EIP jujPCe7KWonL+0wYdnKRJmzEscYbqCEWZQAfhemYFcxwTTPMEbJ3vCdWnCvcyIftZ3Bg JMKYigYuuwwM1hGU0revqsekSXPVfAb9Ju//Gz3TciNUamv7zYnwdfl0SXbcXCC9Sg/y WboMPxPhp2HcRDDLh0Ufb8LO4LLKjuo4qYhEqwsaS8lJ77Lq6ViPX0X+F7qzJsFEaB0g w9Sw== X-Gm-Message-State: AOAM5318RT13uYAjr6bVyUp3sgKAyOoOaOMPwcm2LyRkceUidTNGTnc7 6KooYrX0OaprBccTA4AEtXMgrQ== X-Google-Smtp-Source: ABdhPJxmFQ6c+PUfRpdRHbA02bUCw/fnoNSrOGrSp+9ZO6kxfCNzraR8n9no9d9Y01QZcHtji4TAgA== X-Received: by 2002:a7b:c204:: with SMTP id x4mr18609838wmi.22.1591012577841; Mon, 01 Jun 2020 04:56:17 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id l1sm12638071wrb.31.2020.06.01.04.56.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 04:56:17 -0700 (PDT) Date: Mon, 1 Jun 2020 12:56:15 +0100 From: "Leif Lindholm" To: Ard Biesheuvel Cc: devel@edk2.groups.io, jon@solid-run.com, Laszlo Ersek , Ray Ni , Zhichao Gao Subject: Re: [PATCH v2 3/5] MdeModulePkg/BootManagerUiLib: show inactive boot options Message-ID: <20200601115615.GC28566@vanye> References: <20200528091741.14610-1-ard.biesheuvel@arm.com> <20200528091741.14610-4-ard.biesheuvel@arm.com> MIME-Version: 1.0 In-Reply-To: <20200528091741.14610-4-ard.biesheuvel@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, May 28, 2020 at 11:17:39 +0200, 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 Acked-by: Leif Lindholm > --- > 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; > } > > -- > 2.17.1 >