From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web09.4779.1648080680578717265 for ; Wed, 23 Mar 2022 17:11:51 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ks0l6iJr; spf=pass (domain: intel.com, ip: 134.134.136.65, 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=1648080711; x=1679616711; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+NQdkE1RPc3vvwhR8QlXvEgqvyOEpXpcO/WhcXB8Yy0=; b=ks0l6iJrH1fVZCcEVt6AyRA2LDSjS6sk6IeEZoQbpI7RhEdOyrvIGKKv RDR8JxkGWgYxmifwZyZSE/dlus0hhMKbaBcZFxIs0iZhSYZj5RIZi0OQd Qe5PDZJwdmMPSQfWOLR/RfhHS9rMeFymurx7ycoBZAj/03D/F06zuWoK6 /8sqf1B9lhYC4lKXZfXCtUdntP6NEeVtm9zT3D7eey+ysrcqArQBLGMEC kiEFTQxv+5OsOW9cU13F1wZfZ9SHRoI/7hIlspZEYJCRx9INEQcB0xD7o hL2KGcd39SaePVSehO9rQZtuss8b9WcdPVnf5YdO00O1h3OS88ofUkk8o w==; X-IronPort-AV: E=McAfee;i="6200,9189,10295"; a="258207373" X-IronPort-AV: E=Sophos;i="5.90,205,1643702400"; d="scan'208";a="258207373" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2022 17:11:51 -0700 X-IronPort-AV: E=Sophos;i="5.90,205,1643702400"; d="scan'208";a="649651252" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.255.31.90]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2022 17:11:48 -0700 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 V10 21/47] OvmfPkg/PlatformPei: Refactor MiscInitialization for CloudHV Date: Thu, 24 Mar 2022 08:10:07 +0800 Message-Id: <20220324001033.1169-22-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: <20220324001033.1169-1-min.m.xu@intel.com> References: <20220324001033.1169-1-min.m.xu@intel.com> 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 Acked-by: Gerd Hoffmann 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