From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xu8MT-00053E-W8 for qemu-devel@nongnu.org; Thu, 27 Nov 2014 18:20:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xu8MN-0007X8-RV for qemu-devel@nongnu.org; Thu, 27 Nov 2014 18:20:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xu8MN-0007X1-Ie for qemu-devel@nongnu.org; Thu, 27 Nov 2014 18:20:27 -0500 From: Laszlo Ersek Date: Fri, 28 Nov 2014 00:19:26 +0100 Message-Id: <1417130367-17777-12-git-send-email-lersek@redhat.com> In-Reply-To: <1417130367-17777-1-git-send-email-lersek@redhat.com> References: <5477B0FD.9040806@redhat.com> <1417130367-17777-1-git-send-email-lersek@redhat.com> Subject: [Qemu-devel] [edk2 PATCH 11/12] ArmVirtualizationPkg: PlatformIntelBdsLib: adhere to QEMU's boot order List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, edk2-devel@lists.sourceforge.net, drjones@redhat.com, ard.biesheuvel@linaro.org, peter.maydell@linaro.org, imammedo@redhat.com, mst@redhat.com We have all the required pieces in place. Let's call SetBootOrderFromQemu() in PlatformBdsPolicyBehavior(). We disable OFW-to-UEFI device path fragment translation for virtio-pci, and enable it only virtio-mmio at this time. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf | 2 ++ ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 10 ++++++++++ ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf b/ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf index d635f13..efd50f3 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf +++ b/ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf @@ -40,6 +40,7 @@ MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec + OvmfPkg/OvmfPkg.dec [LibraryClasses] BaseLib @@ -51,6 +52,7 @@ UefiBootServicesTableLib PcdLib GenericBdsLib + QemuBootOrderLib [Guids] gArmGlobalVariableGuid diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c b/ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c index 75b956b..9b91368 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c +++ b/ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "IntelBdsPlatform.h" +#include + /// /// Predefined platform default time out value /// @@ -305,6 +307,14 @@ PlatformBdsPolicyBehavior ( BdsLibConnectAll (); BdsLibEnumerateAllBootOption (BootOptionList); + + SetBootOrderFromQemu (BootOptionList); + // + // The BootOrder variable may have changed, reload the in-memory list with + // it. + // + BdsLibBuildOptionFromVar (BootOptionList, L"BootOrder"); + PlatformBdsEnterFrontPage (gPlatformBootTimeOutDefault, TRUE); } diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc index e16c02e..d2419d2 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc +++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc @@ -54,6 +54,7 @@ GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf PlatformBdsLib|ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf + QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf !endif [LibraryClasses.common.UEFI_DRIVER] @@ -78,6 +79,9 @@ ################################################################################ [PcdsFeatureFlag.common] + gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|FALSE + gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE + ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe. # It could be set FALSE to save size. gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|FALSE -- 1.8.3.1