]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/ArmVirtualizationPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
ArmVirtualizationPkg: PlatformIntelBdsLib: adhere to QEMU's boot order
[mirror_edk2.git] / ArmPlatformPkg / ArmVirtualizationPkg / Library / PlatformIntelBdsLib / IntelBdsPlatform.c
index 90e6e2dd45fa0b1a81c192f7a8983ec981bac2e7..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
@@ -302,6 +304,18 @@ PlatformBdsPolicyBehavior (
 \r
   Status = PlatformBdsConnectConsole ();\r
   ASSERT_EFI_ERROR (Status);\r
+\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
 /**\r