From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web08.919.1647050070631942533 for ; Fri, 11 Mar 2022 17:55:29 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=mLSaokvW; spf=pass (domain: intel.com, ip: 192.55.52.115, 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=1647050129; x=1678586129; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EfmLByU9L2N1P7G/aojadgLJ273DrYV5J3UKa4zqsG8=; b=mLSaokvW9bycI2qSLo4RzTiYQ5YLrkAB/lxQA5uD7fkF37wuTNn0zR9l d/62cS4p2zptZQKmD4hVxNKosWBqlS09bu0OIB+vm58S4r55YqbPiXyRt A0hN0uhtxlroVvF5KJGkKOD6QKfjBgEnAWcfzKTYyhjlb02ygVd9xQyJh LcGRTFAkoL7aAg0zR/FjgeyXkCzXKrEptS8gw40zi3yu/BQL+CKhMd5TX KyaKDe+tHejyZZ0gdJljRULBmJSiw8q3qJep/bUXOL9q7U8sRdV08Kd2b 2EdlzCaZAXzRN2blzJAV0GZX1d4YQ/eTOqtpzPkKPSQN6eDfc+ks/6+x6 g==; X-IronPort-AV: E=McAfee;i="6200,9189,10283"; a="255894503" X-IronPort-AV: E=Sophos;i="5.90,175,1643702400"; d="scan'208";a="255894503" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2022 17:55:29 -0800 X-IronPort-AV: E=Sophos;i="5.90,175,1643702400"; d="scan'208";a="555564708" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.255.29.254]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2022 17:55:26 -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 V8 20/47] OvmfPkg/PlatformPei: Refactor MiscInitialization for CloudHV Date: Sat, 12 Mar 2022 09:53:45 +0800 Message-Id: <051a7df10d44ec7217782aef82e33491c7957ed5.1647047482.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