]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PlatformBootManagerLib: Use EfiBootManagerRefreshAllBootOption()
authorRuiyu Ni <ruiyu.ni@intel.com>
Wed, 20 Apr 2016 10:09:21 +0000 (18:09 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 4 May 2016 00:47:41 +0000 (08:47 +0800)
The patch uses EfiBootManagerRefreshAllBootOption() to collect
all boot options and uses SetBootOrderFromQemu exposed by
QemuNewBootOrderLib to adjust the boot option order.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h

index 722776b2b538e750c53ae5eb5aabefe2872035c5..c13e8f8bfc4380c33fae028e099b4ba4bab35f0e 100644 (file)
@@ -14,7 +14,6 @@
 \r
 #include "BdsPlatform.h"\r
 #include <Guid/RootBridgesConnectedEventGroup.h>\r
-#include <Library/QemuBootOrderLib.h>\r
 \r
 \r
 //\r
@@ -1389,14 +1388,10 @@ Routine Description:
   // Process QEMU's -kernel command line option\r
   //\r
   TryRunningQemuKernel ();\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
+  EfiBootManagerRefreshAllBootOption ();\r
+\r
+  SetBootOrderFromQemu (NULL);\r
 }\r
 \r
 /**\r
index b14410cc31b6c48fff7051f93d657d4808245d96..4950d3ae111f384d660ed69edda8c707d0a1d1d4 100644 (file)
@@ -47,6 +47,7 @@ Abstract:
 #include <Library/IoLib.h>\r
 #include <Library/NvVarsFileLib.h>\r
 #include <Library/QemuFwCfgLib.h>\r
+#include <Library/QemuBootOrderLib.h>\r
 \r
 #include <Protocol/Decompress.h>\r
 #include <Protocol/PciIo.h>\r