From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Laszlo Ersek <lersek@redhat.com>
Cc: edk2-devel-01 <edk2-devel@lists.01.org>,
Jordan Justen <jordan.l.justen@intel.com>
Subject: Re: [PATCH 2/2] OvmfPkg/QemuBootOrderLib: let an OFW devpath match multiple UEFI boot opts
Date: Tue, 28 Nov 2017 07:56:46 +0000 [thread overview]
Message-ID: <CAKv+Gu97QkYnSenNa4eH8WdPSCUGbhLR_UHpbZV7WdDv0QZwkw@mail.gmail.com> (raw)
In-Reply-To: <20171127190354.13699-3-lersek@redhat.com>
On 27 November 2017 at 19:03, Laszlo Ersek <lersek@redhat.com> wrote:
> This means that SetBootOrderFromQemu() will preserve all UEFI boot options
> matched by any given OFW devpath, such as PXEv4, HTTPv4, PXEv6 and HTTPv6
> boot options for the same NIC. Currently we stop the matching / appending
> for the OFW devpath coming from the outer loop whenever we find the first
> UEFI boot option match in the inner loop.
>
> (The previous patch was about multiple OFW devpaths matching a single UEFI
> boot option (which should never happen). This patch is about a single OFW
> devpath matching multiple UEFI boot options. With the "break" statement
> removed here, the small optimization from the last patch becomes a bit
> more relevant, because now the inner loop always counts up to
> ActiveCount.)
>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c b/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c
> index a9a62e9d4007..366104adf535 100644
> --- a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c
> +++ b/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c
> @@ -1863,31 +1863,30 @@ SetBootOrderFromQemu (
> for (Idx = 0; Idx < ActiveCount; ++Idx) {
> if (!ActiveOption[Idx].Appended &&
> Match (
> Translated,
> TranslatedSize, // contains length, not size, in CHAR16's here
> ActiveOption[Idx].BootOption->FilePath
> )
> ) {
> //
> // match found, store ID and continue with next OpenFirmware path
> //
> Status = BootOrderAppend (&BootOrder, &ActiveOption[Idx]);
> if (Status != RETURN_SUCCESS) {
> goto ErrorFreeExtraPciRoots;
> }
> - break;
> }
> } // scanned all active boot options
> } // translation successful
>
> TranslatedSize = ARRAY_SIZE (Translated);
> Status = TranslateOfwPath (&FwCfgPtr, ExtraPciRoots, Translated,
> &TranslatedSize);
> } // scanning of OpenFirmware paths done
>
> if (Status == RETURN_NOT_FOUND && BootOrder.Produced > 0) {
> //
> // No more OpenFirmware paths, some matches found: rewrite BootOrder NvVar.
> // Some of the active boot options that have not been selected over fw_cfg
> // should be preserved at the end of the boot order.
> //
> --
> 2.14.1.3.gb7cf6e02401b
>
next prev parent reply other threads:[~2017-11-28 7:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 19:03 [PATCH 0/2] OvmfPkg/QemuBootOrderLib: multiplicity update for OFW <-> UEFI matching Laszlo Ersek
2017-11-27 19:03 ` [PATCH 1/2] OvmfPkg/QemuBootOrderLib: skip already matched / appended UEFI boot opts Laszlo Ersek
2017-11-28 7:55 ` Ard Biesheuvel
2017-11-27 19:03 ` [PATCH 2/2] OvmfPkg/QemuBootOrderLib: let an OFW devpath match multiple " Laszlo Ersek
2017-11-28 7:56 ` Ard Biesheuvel [this message]
2017-11-28 20:39 ` Laszlo Ersek
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=CAKv+Gu97QkYnSenNa4eH8WdPSCUGbhLR_UHpbZV7WdDv0QZwkw@mail.gmail.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