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.web11.17833.1646036234429896336 for ; Mon, 28 Feb 2022 00:17:15 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=acAmjqHD; 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=1646036234; x=1677572234; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ph3Ubnn/bN9xZDmFGF7p3/fSbJf9NO3RjtxgX2pejos=; b=acAmjqHDUiFyCKdsO6hQltGZeGGH5QuujH7dLslpwxadNNKdY8Vq5CuX XCvUG2NyaECKU2Yur3F0gB9L0zMOrl4aTQY2iFPkCcypadtHp44qoinHo x2TG2cEw5JP5SGrcswHfMtvr8wjuA6n0WqqiWROtRV6mzL27+3LtXFrlz rb5f69aGr+M4owy4tRJQsnPJlXpuuatclE0wqYMFYzUt3S8McHxjcm3Cr 3ygT88Vpgz3rGqEEbQGzEoR2x2F4vusQPJh+oSBSqAcLeOjrwW+z8pyJL xPqzNJfV+lfQsNCBfgPw7rA5dLxGYPRtD6jEVdsM2UldxojsXOdxj+yHa Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10271"; a="252758109" X-IronPort-AV: E=Sophos;i="5.90,142,1643702400"; d="scan'208";a="252758109" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2022 00:17:10 -0800 X-IronPort-AV: E=Sophos;i="5.90,142,1643702400"; d="scan'208";a="550140075" 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; 28 Feb 2022 00:17:08 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Michael D Kinney , Brijesh Singh , Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky , Gerd Hoffmann Subject: [PATCH V4 03/10] OvmfPkg: Update EFI_HOB_PLATFORM_INFO with more platform settings Date: Mon, 28 Feb 2022 16:16:24 +0800 Message-Id: <20220228081631.681-4-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: <20220228081631.681-1-min.m.xu@intel.com> References: <20220228081631.681-1-min.m.xu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 This patch-sets is to bring up Legacy guest and Tdx guest without PEI phase. So platform initialization has to be done in SEC phase. It is similar to the work of OvmfPkg/PlatformPei. In OvmfPkg/PlatformPei some PCDs are set during platform initialization, such as PcdPciMmio64Base. But in PEI-less boot, PCDs cannot be set. So these values are saved in EFI_HOB_PLATFORM_INFO. Then in the early stage of DXE phase this hob will be parsed and PCDs are set accordingly. Cc: Michael D Kinney Cc: Brijesh Singh Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Cc: Gerd Hoffmann Acked-by: Gerd Hoffmann Signed-off-by: Min Xu --- OvmfPkg/Include/Library/PlatformInitLib.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/OvmfPkg/Include/Library/PlatformInitLib.h b/OvmfPkg/Include/Library/PlatformInitLib.h index 6a88a9b4a69c..52d62f21c29e 100644 --- a/OvmfPkg/Include/Library/PlatformInitLib.h +++ b/OvmfPkg/Include/Library/PlatformInitLib.h @@ -15,6 +15,22 @@ typedef struct { EFI_HOB_GUID_TYPE GuidHeader; UINT16 HostBridgePciDevId; + BOOLEAN PcdSetNxForStack; + + UINT64 PcdConfidentialComputingGuestAttr; + BOOLEAN PcdIa32EferChangeAllowed; + UINT64 PcdTdxSharedBitMask; + + UINT64 PcdPciMmio64Base; + UINT64 PcdPciMmio64Size; + UINT32 PcdPciMmio32Base; + UINT32 PcdPciMmio32Size; + UINT64 PcdPciIoBase; + UINT64 PcdPciIoSize; + + UINT64 PcdEmuVariableNvStoreReserved; + UINT32 PcdCpuBootLogicalProcessorNumber; + UINT32 PcdCpuMaxLogicalProcessorNumber; } EFI_HOB_PLATFORM_INFO; #pragma pack() -- 2.29.2.windows.2