]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtualizationPkg: PlatformIntelBdsLib: adhere to QEMU's boot order
authorLaszlo Ersek <lersek@redhat.com>
Fri, 2 Jan 2015 12:08:24 +0000 (12:08 +0000)
committerlersek <lersek@Edk2>
Fri, 2 Jan 2015 12:08:24 +0000 (12:08 +0000)
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 <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16576 6f19259b-4bc3-4df7-8a09-765794883524

ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc
ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf

index 8ef59471c0653db12b35e090ada4f107133ddc2e..ed88c9d32caeba670011ab78e73913b45fc53d86 100644 (file)
@@ -54,6 +54,7 @@
   GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf\r
   PlatformBdsLib|ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf\r
   CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf\r
+  QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf\r
 !endif\r
 \r
 [LibraryClasses.common.UEFI_DRIVER]\r
@@ -78,6 +79,9 @@
 ################################################################################\r
 \r
 [PcdsFeatureFlag.common]\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|FALSE\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE\r
+\r
   ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe.\r
   #  It could be set FALSE to save size.\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|FALSE\r
index a603ba7f3ec86658404fdd222d6e3e922430192b..f5d82edfffe149cd557df560132dd97af5f44de7 100644 (file)
@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "IntelBdsPlatform.h"\r
 \r
+#include <Library/QemuBootOrderLib.h>\r
+\r
 ///\r
 /// Predefined platform default time out value\r
 ///\r
@@ -305,6 +307,14 @@ PlatformBdsPolicyBehavior (
 \r
   BdsLibConnectAll ();\r
   BdsLibEnumerateAllBootOption (BootOptionList);\r
+\r
+  SetBootOrderFromQemu (BootOptionList);\r
+  //\r
+  // The BootOrder variable may have changed, reload the in-memory list with\r
+  // it.\r
+  //\r
+  BdsLibBuildOptionFromVar (BootOptionList, L"BootOrder");\r
+\r
   PlatformBdsEnterFrontPage (gPlatformBootTimeOutDefault, TRUE);\r
 }\r
 \r
index d635f133d090107523f4595fc6154e46bcefbaee..efd50f38160669c4a84878055a95af5c7f8302a2 100644 (file)
@@ -40,6 +40,7 @@
   MdePkg/MdePkg.dec\r
   MdeModulePkg/MdeModulePkg.dec\r
   IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
+  OvmfPkg/OvmfPkg.dec\r
 \r
 [LibraryClasses]\r
   BaseLib\r
@@ -51,6 +52,7 @@
   UefiBootServicesTableLib\r
   PcdLib\r
   GenericBdsLib\r
+  QemuBootOrderLib\r
 \r
 [Guids]\r
   gArmGlobalVariableGuid\r