From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.4209.1646706992182166839 for ; Mon, 07 Mar 2022 18:36:48 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ezYVC3ym; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646707008; x=1678243008; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EfmLByU9L2N1P7G/aojadgLJ273DrYV5J3UKa4zqsG8=; b=ezYVC3ymZ0X0GGMMGLJRTou1/RcIsbS57kAx5AkoTAvKyz0JCaz5b9le SR7mHRy353aDUwtB1hOsSCW1OteGqKHcEaL1PIsGlI6iLfb1QlzKVUjhV 1NyI4rQwENIVzEoDu4Jh4/tNVYoPy2LaWoRIBW/bMvPPZjRNyRvshX1UO DXad95K9SovUeZIB2U48gNfHcq+rC867akVC5YyuxoGPv5llOOycUV/yz ED9VBM//kl4HKNEzSKl1FCZABJKqYcMICC/R7wVDCfbpuBwVvqiwM3geH Fgigi9TOTfw8/ATk/W3NTVF/Dz8Rbv1vs962rygmlucyxHprn8HMedb8D A==; X-IronPort-AV: E=McAfee;i="6200,9189,10279"; a="317801056" X-IronPort-AV: E=Sophos;i="5.90,163,1643702400"; d="scan'208";a="317801056" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2022 18:36:47 -0800 X-IronPort-AV: E=Sophos;i="5.90,163,1643702400"; d="scan'208";a="553432710" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.238.2.184]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2022 18:36:44 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Ard Biesheuvel , Jordan Justen , Brijesh Singh , Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky , Gerd Hoffmann , Sebastien Boeuf Subject: [PATCH 05/14] OvmfPkg/PlatformPei: Refactor MiscInitialization for CloudHV Date: Tue, 8 Mar 2022 10:36:06 +0800 Message-Id: <3e9adaab701ee84a311d8ac712e96702212add48.1646706302.git.min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Jordan Justen Cc: Brijesh Singh Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Cc: Gerd Hoffmann Cc: Sebastien Boeuf Signed-off-by: Min Xu --- OvmfPkg/PlatformPei/Platform.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index af9e72cd7a98..3e0c56db57ed 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 -- 2.29.2.windows.2