summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformPei/Platform.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2021-09-08 11:01:13 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-10-05 10:55:39 +0000
commitbf02d73e74ec2825551126c780df726cc543cfb0 (patch)
treef06d7adfa5bcfb942fb5bfa29d79db2ccf9bab18 /OvmfPkg/PlatformPei/Platform.c
parent8583b57c5cb3a7e752a25250b3f7406235802f05 (diff)
downloadedk2-bf02d73e74ec2825551126c780df726cc543cfb0.tar.gz
edk2-bf02d73e74ec2825551126c780df726cc543cfb0.tar.bz2
edk2-bf02d73e74ec2825551126c780df726cc543cfb0.zip
OvmfPkg/Microvm: PlatformPei/Platform: add id.
Add + set microvm id for PcdOvmfHostBridgePciDevId. 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>
Diffstat (limited to 'OvmfPkg/PlatformPei/Platform.c')
-rw-r--r--OvmfPkg/PlatformPei/Platform.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index d425a5c429..aeb39595aa 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -31,6 +31,7 @@
#include <Library/ResourcePublicationLib.h>
#include <Ppi/MasterBootMode.h>
#include <IndustryStandard/I440FxPiix4.h>
+#include <IndustryStandard/Microvm.h>
#include <IndustryStandard/Pci22.h>
#include <IndustryStandard/Q35MchIch9.h>
#include <IndustryStandard/QemuCpuHotplug.h>
@@ -364,6 +365,12 @@ MiscInitialization (
AcpiCtlReg = POWER_MGMT_REGISTER_Q35 (ICH9_ACPI_CNTL);
AcpiEnBit = ICH9_ACPI_CNTL_ACPI_EN;
break;
+ case 0xffff: /* microvm */
+ 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));