From nobody Sun Apr 28 04:52:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+51965+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+51965+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1575642698; cv=none; d=zohomail.com; s=zohoarc; b=iWJEfIElxn5zCGCevUI4uck+jKLMHq5ZOqx1FrsOuu9+PwrhR2J2gnJGcK9J6bVwx7flPa9UQvT1PevMfXuk4fAI2tkVMnGhR6QI9b+Nc6A0tVyyRxv5/i3l6WwE3b+Na+O7aC9rovHwZk9huLIEp634m0Tx7K6nPvc/MbyCgww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575642698; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=5mvOWZ7dBSFKKWzWwMwBmMnsCmWCGkRZ8n8geGsru9g=; b=gIhSNwZl5ZIwF0LL3AoOC5LWZCosOH4UE+pEKQPy8Gc+pWbm9sjL6BCA864p0yMTsAPn/coeU7Z16NgFLfSDab3bbHR9LYQc40fDbAq11VJVQPqVoMkWwo9yKCi4l2pU6eMDwGTS0pr4VjV22HqVdxHrm5zbBaK29gqEDmLNUAs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+51965+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1575642698368245.7779686027077; Fri, 6 Dec 2019 06:31:38 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id ZMn5YY1788612xHyYHfMwLuf; Fri, 06 Dec 2019 06:31:37 -0800 X-Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.web11.4443.1575642696799395415 for ; Fri, 06 Dec 2019 06:31:37 -0800 X-Received: by mail-wm1-f49.google.com with SMTP id f129so7555067wmf.2 for ; Fri, 06 Dec 2019 06:31:36 -0800 (PST) X-Gm-Message-State: dYskNYmK5kaU6fxC0rIczPM9x1787277AA= X-Google-Smtp-Source: APXvYqz3NwoEtnAPDiTXQx+IDBGpB5mzrai4hSUl/9t7Rn0cqyaH2OB6wn3xcPwcA5/imQhI04UxoA== X-Received: by 2002:a1c:7e13:: with SMTP id z19mr1698148wmc.67.1575642694968; Fri, 06 Dec 2019 06:31:34 -0800 (PST) X-Received: from sudo.home ([2a01:cb1d:112:6f00:488a:43c8:1cd8:def8]) by smtp.gmail.com with ESMTPSA id b63sm3281032wmb.40.2019.12.06.06.31.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Dec 2019 06:31:34 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Laszlo Ersek , Zhichao Gao , Ray Ni , Maurice Ma , Guo Dong , Benjamin You Subject: [edk2-devel] [RFC PATCH 1/2] MdeModulePkg/PlatformBootManagerLib: document change of Driver#### handling Date: Fri, 6 Dec 2019 15:31:27 +0100 Message-Id: <20191206143128.19371-2-ard.biesheuvel@linaro.org> In-Reply-To: <20191206143128.19371-1-ard.biesheuvel@linaro.org> References: <20191206143128.19371-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ard.biesheuvel@linaro.org Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1575642697; bh=xiyHCod98yAQjnzYyVIEAc0GmcN2nFg+xo2e03cO5FY=; h=Cc:Date:From:Reply-To:Subject:To; b=NhB3Z9WdVQxUe8PuoRZHajHxJXm81oiEorl3seP16gaxRDvNCYrEN1sntPspwa6Dfta DEHgC/dSC9hj/oQ0xRK0l8/6qCkBOaoOv5SgIPUhMI8wRPoH0XYYER6k7nyyFYlR6d1Xo 6k/N5/47gMkkpt5I5alpp3gcyAcpnrFiqyU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" A future patch will change the order in which Driver#### options are processed, removing the possibility to create such options in PlatformBootManagerBeforeConsole(). Update the code comments duplicated across the tree to reflect this upcoming change, and replace Driver#### with SysPrep####, which can be used for the same purpose instead. Signed-off-by: Ard Biesheuvel --- ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 2 = +- ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c | 2 = +- MdeModulePkg/Include/Library/PlatformBootManagerLib.h | 2 = +- MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManager.c | 2 = +- MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 2 = +- OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 2 = +- UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c | 2 = +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Li= brary/PlatformBootManagerLib/PlatformBm.c index e6e788e0f107..d436eacd3494 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -532,7 +532,7 @@ PlatformRegisterOptionsAndKeys ( Possible things that can be done in PlatformBootManagerBeforeConsole: > Update console variable: 1. include hot-plug devices; > 2. Clear ConIn and add SOL for AMT - > Register new Driver#### or Boot#### + > Register new SysPrep#### or Boot#### > Register new Key####: e.g.: F12 > Signal ReadyToLock event > Authentication action: 1. connect Auth devices; diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVi= rtPkg/Library/PlatformBootManagerLib/PlatformBm.c index 5f6cfe64daca..2df874a0dedd 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -674,7 +674,7 @@ PlatformRegisterOptionsAndKeys ( Possible things that can be done in PlatformBootManagerBeforeConsole: > Update console variable: 1. include hot-plug devices; > 2. Clear ConIn and add SOL for AMT - > Register new Driver#### or Boot#### + > Register new SysPrep#### or Boot#### > Register new Key####: e.g.: F12 > Signal ReadyToLock event > Authentication action: 1. connect Auth devices; diff --git a/MdeModulePkg/Include/Library/PlatformBootManagerLib.h b/MdeMod= ulePkg/Include/Library/PlatformBootManagerLib.h index 5d3062e9ddea..0b296b55bcab 100644 --- a/MdeModulePkg/Include/Library/PlatformBootManagerLib.h +++ b/MdeModulePkg/Include/Library/PlatformBootManagerLib.h @@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 Such as: Update console variable; - Register new Driver#### or Boot####; + Register new SysPrep#### or Boot####; Signal ReadyToLock event. **/ VOID diff --git a/MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootMa= nager.c b/MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManag= er.c index 43560bf2aa6c..45cf81c1226b 100644 --- a/MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManager.c +++ b/MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManager.c @@ -15,7 +15,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 Such as: Update console variable; - Register new Driver#### or Boot####; + Register new SysPrep#### or Boot####; Signal ReadyToLock event. **/ VOID diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Univer= sal/BdsDxe/BdsEntry.c index d387dbe7ac12..1fb04dcbbcda 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c @@ -854,7 +854,7 @@ BdsEntry ( // Do the platform init, can be customized by OEM/IBV // Possible things that can be done in PlatformBootManagerBeforeConsole: // > Update console variable: 1. include hot-plug devices; 2. Clear ConI= n and add SOL for AMT - // > Register new Driver#### or Boot#### + // > Register new SysPrep#### or Boot#### // > Register new Key####: e.g.: F12 // > Signal ReadyToLock event // > Authentication action: 1. connect Auth devices; 2. Identify auto lo= gon user. diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg= /Library/PlatformBootManagerLib/BdsPlatform.c index 8af9b71f18a3..b7dc9a1fefdc 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -339,7 +339,7 @@ SaveS3BootScript ( =20 > Update console variable: 1. include hot-plug devices; > 2. Clear ConIn and add SOL for AMT - > Register new Driver#### or Boot#### + > Register new SysPrep#### or Boot#### > Register new Key####: e.g.: F12 > Signal ReadyToLock event > Authentication action: 1. connect Auth devices; diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootMana= ger.c b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c index c5c6af0abcb2..2833d2b03019 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c @@ -143,7 +143,7 @@ PlatformRegisterFvBootOption ( =20 Such as: Update console variable; - Register new Driver#### or Boot####; + Register new SysPrep#### or Boot####; Signal ReadyToLock event. **/ VOID --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#51965): https://edk2.groups.io/g/devel/message/51965 Mute This Topic: https://groups.io/mt/67470371/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun Apr 28 04:52:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+51966+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+51966+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1575642700; cv=none; d=zohomail.com; s=zohoarc; b=OyQve90/DPKzXdB1Bpdg5VTMOqsMkDZocMhUuoJk1h6c87THNsNW5VA5IEPtwHT8/YN0GUbH+pJ46HgWm9YsNP3+NrefeFkMzV2y71K1V9HqJmbzY44r0SI+0VSmBFrQ0Hz0Wmq1rQOJrk519vXsWSxdpmSJi2lOwuYiETaXq3w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575642700; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=qdI2RbRyIxEIUOhS05/D6dR0aBpNPbY/LA4ZOBDXqhE=; b=dlFpjhTKSuMZOJlelNOVVWmc+JQ9U5cqSbgzDrT3IicsfDWwpuuTv1VvU2gMLrlTDq4w8+a6sW+jE3YnROy/Stka4JnSglUm5/dMl+xmzpkULfcUuDxxXBhryO8ji4yBChylppDVzSDq4IWv6RqRn1T6PgH6AnbmQR70j/5ftRE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+51966+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1575642700102793.8476719717767; Fri, 6 Dec 2019 06:31:40 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id G3CsYY1788612xnEDKJaQNgq; Fri, 06 Dec 2019 06:31:38 -0800 X-Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mx.groups.io with SMTP id smtpd.web12.4377.1575642698064257447 for ; Fri, 06 Dec 2019 06:31:38 -0800 X-Received: by mail-wr1-f68.google.com with SMTP id g17so8026651wro.2 for ; Fri, 06 Dec 2019 06:31:37 -0800 (PST) X-Gm-Message-State: yg8jW1AQHREpsNo5jZTzkiYmx1787277AA= X-Google-Smtp-Source: APXvYqz0KRHi/NNR1UR5XfRGhu7JK5guRZJ9mNP/9l4NYJQ5WHYJx2g8h4mzhrfhEoN7qo1ezNnV+w== X-Received: by 2002:adf:f88c:: with SMTP id u12mr16922426wrp.323.1575642696461; Fri, 06 Dec 2019 06:31:36 -0800 (PST) X-Received: from sudo.home ([2a01:cb1d:112:6f00:488a:43c8:1cd8:def8]) by smtp.gmail.com with ESMTPSA id b63sm3281032wmb.40.2019.12.06.06.31.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Dec 2019 06:31:35 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Laszlo Ersek , Zhichao Gao , Ray Ni , Maurice Ma , Guo Dong , Benjamin You Subject: [edk2-devel] [RFC PATCH 2/2] MdeModulePkg/BdsDxe: allow consoles on drivers loaded via Driver#### Date: Fri, 6 Dec 2019 15:31:28 +0100 Message-Id: <20191206143128.19371-3-ard.biesheuvel@linaro.org> In-Reply-To: <20191206143128.19371-1-ard.biesheuvel@linaro.org> References: <20191206143128.19371-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ard.biesheuvel@linaro.org Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1575642698; bh=33ExmnAYY7aSvGpbum/ECtZPJO+7XYUz4VZR5UAA0co=; h=Cc:Date:From:Reply-To:Subject:To; b=u6r+K4+thpwfeutEEDZJo1BX3DCU4dwGwM9aMEH2rQIc24fL8dB+WNOTH+cn+GMGixP /DN1plAj464d8JzNOJVx+/VmyClqCP2dgLpBRFcLHn3rhKQErRXsbyrqyAPbxVRt8A0q0 jaZMRuCXdP33yHVF6qyZ1qNWFOYbaXUFWok= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Currently, we dispatch drivers specified via Driver#### entries after calling PlatformBootManagerBeforeConsole(), which prevents us from loading drivers that provide consoles via Driver#### entries. This is particularly annoying on AArch64 systems, given that it prevents us from loading AArch64 drivers from the ESP for PCIe graphics cards that shipped with x86 drivers in the option ROM, which is the common case today. So let's reorder the handling of the Driver#### entries with the invocation of PlatformBootManagerBeforeConsole(), which results in Driver#### entries being dispatched in the same way as option ROM images. Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Univer= sal/BdsDxe/BdsEntry.c index 1fb04dcbbcda..ad4c4c0406f6 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c @@ -850,6 +850,14 @@ BdsEntry ( } } =20 + // + // Execute Driver Options. Images will be loaded but dispatch will be + // deferred for 3rd party images until EndOfDxe is signalled. + // + LoadOptions =3D EfiBootManagerGetLoadOptions (&LoadOptionCount, LoadOpti= onTypeDriver); + ProcessLoadOptions (LoadOptions, LoadOptionCount); + EfiBootManagerFreeLoadOptions (LoadOptions, LoadOptionCount); + // // Do the platform init, can be customized by OEM/IBV // Possible things that can be done in PlatformBootManagerBeforeConsole: @@ -868,13 +876,6 @@ BdsEntry ( // EfiBootManagerStartHotkeyService (&HotkeyTriggered); =20 - // - // Execute Driver Options - // - LoadOptions =3D EfiBootManagerGetLoadOptions (&LoadOptionCount, LoadOpti= onTypeDriver); - ProcessLoadOptions (LoadOptions, LoadOptionCount); - EfiBootManagerFreeLoadOptions (LoadOptions, LoadOptionCount); - // // Connect consoles // --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#51966): https://edk2.groups.io/g/devel/message/51966 Mute This Topic: https://groups.io/mt/67470372/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-