[PATCH v4 14/20] OvmfPkg/Microvm: PlatformPei/Platform: set id.


Gerd Hoffmann
 

Set PcdOvmfHostBridgePciDevId to MICROVM_PSEUDO_DEVICE_ID.
Return and skip i440fx/q35 chipset tweaks.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
---
OvmfPkg/PlatformPei/Platform.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index dedd7ff1a8e5..039b19dfb187 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -365,6 +365,12 @@ MiscInitialization (
AcpiCtlReg = POWER_MGMT_REGISTER_Q35 (ICH9_ACPI_CNTL);
AcpiEnBit = ICH9_ACPI_CNTL_ACPI_EN;
break;
+ case MICROVM_PSEUDO_DEVICE_ID:
+ DEBUG ((DEBUG_INFO, "%a: microvm\n", __FUNCTION__));
+ PcdStatus = PcdSet16S (PcdOvmfHostBridgePciDevId,
+ MICROVM_PSEUDO_DEVICE_ID);
+ ASSERT_RETURN_ERROR (PcdStatus);
+ return;
default:
DEBUG ((DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n",
__FUNCTION__, mHostBridgeDevId));
--
2.31.1