OvmfPkg: get boot order from QEMU

Set the boot order based on configuration retrieved from QEMU.

Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate the
OpenFirmware device paths therein to UEFI device path fragments. Match the
translated fragments against the enumerated BootOptionList, and rewrite
the BootOrder NvVar so that it corresponds to the order described in
fw_cfg.

The user is expected to configure working boot options first.

Tested via virt-manager's boot order widget.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13683 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jljusten
2012-08-27 23:28:30 +00:00
parent 67fe5bed94
commit 2cd086a675
4 changed files with 1028 additions and 0 deletions

View File

@@ -29,7 +29,9 @@
[Sources]
BdsPlatform.c
PlatformData.c
QemuBootOrder.c
BdsPlatform.h
QemuBootOrder.h
[Packages]
MdePkg/MdePkg.dec
@@ -47,6 +49,7 @@
GenericBdsLib
PciLib
NvVarsFileLib
QemuFwCfgLib
[Pcd]
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut