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 !endif
PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLibBhyve/PlatformBootManagerLibBhyve.inf PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLibBhyve/PlatformBootManagerLibBhyve.inf
PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf
QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
!if $(SOURCE_DEBUG_ENABLE) == TRUE !if $(SOURCE_DEBUG_ENABLE) == TRUE

View File

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

View File

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