OvmfPkg/PlatformBootManagerLib: Use EfiBootManagerRefreshAllBootOption()

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>
This commit is contained in:
Ruiyu Ni 2016-04-20 18:09:21 +08:00
parent fed691a6f9
commit 04fe914ba5
2 changed files with 4 additions and 8 deletions

View File

@ -14,7 +14,6 @@
#include "BdsPlatform.h" #include "BdsPlatform.h"
#include <Guid/RootBridgesConnectedEventGroup.h> #include <Guid/RootBridgesConnectedEventGroup.h>
#include <Library/QemuBootOrderLib.h>
// //
@ -1389,14 +1388,10 @@ Routine Description:
// Process QEMU's -kernel command line option // Process QEMU's -kernel command line option
// //
TryRunningQemuKernel (); TryRunningQemuKernel ();
BdsLibEnumerateAllBootOption (BootOptionList);
SetBootOrderFromQemu (BootOptionList); EfiBootManagerRefreshAllBootOption ();
//
// The BootOrder variable may have changed, reload the in-memory list with SetBootOrderFromQemu (NULL);
// it.
//
BdsLibBuildOptionFromVar (BootOptionList, L"BootOrder");
} }
/** /**

View File

@ -47,6 +47,7 @@ Abstract:
#include <Library/IoLib.h> #include <Library/IoLib.h>
#include <Library/NvVarsFileLib.h> #include <Library/NvVarsFileLib.h>
#include <Library/QemuFwCfgLib.h> #include <Library/QemuFwCfgLib.h>
#include <Library/QemuBootOrderLib.h>
#include <Protocol/Decompress.h> #include <Protocol/Decompress.h>
#include <Protocol/PciIo.h> #include <Protocol/PciIo.h>