From nobody Wed Dec 25 04:53:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1511809457497352.1226510788197; Mon, 27 Nov 2017 11:04:17 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 362C021B00DFC; Mon, 27 Nov 2017 10:59:54 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 86DCE21B00DEC for ; Mon, 27 Nov 2017 10:59:52 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6B64D85545; Mon, 27 Nov 2017 19:04:14 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-232.rdu2.redhat.com [10.10.120.232]) by smtp.corp.redhat.com (Postfix) with ESMTP id E14915EDE8; Mon, 27 Nov 2017 19:04:12 +0000 (UTC) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org From: Laszlo Ersek To: edk2-devel-01 Date: Mon, 27 Nov 2017 20:03:54 +0100 Message-Id: <20171127190354.13699-3-lersek@redhat.com> In-Reply-To: <20171127190354.13699-1-lersek@redhat.com> References: <20171127190354.13699-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 27 Nov 2017 19:04:14 +0000 (UTC) Subject: [edk2] [PATCH 2/2] OvmfPkg/QemuBootOrderLib: let an OFW devpath match multiple UEFI boot opts X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Justen , Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Cc: Jordan Justen Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek Acked-by: Ard Biesheuvel --- 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 =3D 0; Idx < ActiveCount; ++Idx) { if (!ActiveOption[Idx].Appended && Match ( Translated, TranslatedSize, // contains length, not size, in CHAR16's he= re ActiveOption[Idx].BootOption->FilePath ) ) { // // match found, store ID and continue with next OpenFirmware path // Status =3D BootOrderAppend (&BootOrder, &ActiveOption[Idx]); if (Status !=3D RETURN_SUCCESS) { goto ErrorFreeExtraPciRoots; } - break; } } // scanned all active boot options } // translation successful =20 TranslatedSize =3D ARRAY_SIZE (Translated); Status =3D TranslateOfwPath (&FwCfgPtr, ExtraPciRoots, Translated, &TranslatedSize); } // scanning of OpenFirmware paths done =20 if (Status =3D=3D RETURN_NOT_FOUND && BootOrder.Produced > 0) { // // No more OpenFirmware paths, some matches found: rewrite BootOrder N= vVar. // Some of the active boot options that have not been selected over fw= _cfg // should be preserved at the end of the boot order. // --=20 2.14.1.3.gb7cf6e02401b _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel