OvmfPkg/BhyvePkg: honor FwCfg when setting the bootorder

Bhyve has added support for the bootorder FwCfg file some time ago
[1][2].  This FwCfg file is currently ignored by the OVMF and has no
effect. Copy the relevant code from Qemu to Bhyve to make it usable.

[1] 6632a0a4e3
[2] 480bef9481

Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com>
This commit is contained in:
Corvin Köhne 2021-08-16 15:54:38 +02:00 committed by mergify[bot]
parent bfda27ddc8
commit ffce430d2b
3 changed files with 13 additions and 6 deletions

View File

@ -358,6 +358,7 @@
!endif
PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLibBhyve/PlatformBootManagerLibBhyve.inf
PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf
QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
!if $(SOURCE_DEBUG_ENABLE) == TRUE

View File

@ -1433,7 +1433,8 @@ PlatformBdsConnectSequence (
VOID
)
{
UINTN Index;
UINTN Index;
RETURN_STATUS Status;
DEBUG ((DEBUG_INFO, "PlatformBdsConnectSequence\n"));
@ -1452,11 +1453,14 @@ PlatformBdsConnectSequence (
Index++;
}
//
// Just use the simple policy to connect all devices
//
DEBUG ((DEBUG_INFO, "EfiBootManagerConnectAll\n"));
EfiBootManagerConnectAll ();
Status = ConnectDevicesFromQemu ();
if (RETURN_ERROR (Status)) {
//
// Just use the simple policy to connect all devices
//
DEBUG ((DEBUG_INFO, "EfiBootManagerConnectAll\n"));
EfiBootManagerConnectAll ();
}
}
/**
@ -1581,6 +1585,7 @@ PlatformBootManagerAfterConsole (
);
RemoveStaleFvFileOptions ();
SetBootOrderFromQemu ();
PlatformBmPrintScRegisterHandler ();
}

View File

@ -46,6 +46,7 @@
BootLogoLib
DevicePathLib
PciLib
QemuBootOrderLib
NvVarsFileLib
ReportStatusCodeLib
UefiLib