@@ -43,4 +43,10 @@
//
#define ACPI_TIMER_OFFSET 0x8
+//
+// When running OVMF on a Xen PVH guest there is no PCI,
+// so -1 is return for the Host Bridge Device ID.
+//
+#define XEN_PVH_PCI_HOST_BRIDGE_DEVICE_ID 0xFFFF
+
#endif
@@ -278,6 +278,13 @@ MiscInitialization (
AcpiEnBit = ICH9_ACPI_CNTL_ACPI_EN;
break;
default:
+ if (XenPvhDetected ()) {
+ //
+ // There is no PCI bus in this case
+ //
+ PcdSet16S (PcdOvmfHostBridgePciDevId, XEN_PVH_PCI_HOST_BRIDGE_DEVICE_ID);
+ return;
+ }
DEBUG ((EFI_D_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n",
__FUNCTION__, mHostBridgeDevId));
ASSERT (FALSE);
When the device ID of the host bridge is unknown, check if we are running as a PVH guest as there is no PCI bus in that case. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> --- Notes: v2: - Use new XEN_PVH_PCI_HOST_BRIDGE_DEVICE_ID macro OvmfPkg/Include/OvmfPlatforms.h | 6 ++++++ OvmfPkg/XenPlatformPei/Platform.c | 7 +++++++ 2 files changed, 13 insertions(+)