summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformPei
diff options
context:
space:
mode:
authorMin Xu <min.m.xu@intel.com>2022-03-06 20:09:00 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-04-02 08:15:12 +0000
commit6d2ce5fd5ccdee1de7d28439a348692869011a2d (patch)
treea37e65ef5272a14a43e3967ac65c1d690a4ce472 /OvmfPkg/PlatformPei
parent5a2574a82e983dc6b4da39b61fcfbc699b4d8ee5 (diff)
downloadedk2-6d2ce5fd5ccdee1de7d28439a348692869011a2d.tar.gz
edk2-6d2ce5fd5ccdee1de7d28439a348692869011a2d.tar.bz2
edk2-6d2ce5fd5ccdee1de7d28439a348692869011a2d.zip
OvmfPkg/PlatformPei: Refactor MiscInitialization for CloudHV
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3863 Refactor MiscInitialization for CloudHV to set PCD as other platforms do. Because in the following patch we will split the functions which set PCDs into two, one for PlatformInitLib, one for PlatformPei. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Sebastien Boeuf <sebastien.boeuf@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
Diffstat (limited to 'OvmfPkg/PlatformPei')
-rw-r--r--OvmfPkg/PlatformPei/Platform.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index af9e72cd7a..3e0c56db57 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -380,13 +380,7 @@ MiscInitialization (
AcpiEnBit = ICH9_ACPI_CNTL_ACPI_EN;
break;
case CLOUDHV_DEVICE_ID:
- DEBUG ((DEBUG_INFO, "%a: Cloud Hypervisor host bridge\n", __FUNCTION__));
- PcdStatus = PcdSet16S (
- PcdOvmfHostBridgePciDevId,
- CLOUDHV_DEVICE_ID
- );
- ASSERT_RETURN_ERROR (PcdStatus);
- return;
+ break;
default:
DEBUG ((
DEBUG_ERROR,
@@ -401,6 +395,11 @@ MiscInitialization (
PcdStatus = PcdSet16S (PcdOvmfHostBridgePciDevId, PlatformInfoHob->HostBridgeDevId);
ASSERT_RETURN_ERROR (PcdStatus);
+ if (PlatformInfoHob->HostBridgeDevId == CLOUDHV_DEVICE_ID) {
+ DEBUG ((DEBUG_INFO, "%a: Cloud Hypervisor is done.\n", __FUNCTION__));
+ return;
+ }
+
//
// If the appropriate IOspace enable bit is set, assume the ACPI PMBA has
// been configured and skip the setup here. This matches the logic in