From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web09.17717.1645324415382497262 for ; Sat, 19 Feb 2022 18:33:42 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=F7x10evt; spf=pass (domain: intel.com, ip: 192.55.52.151, 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=1645324422; x=1676860422; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Hyp1DuJk148Ibdk64ihNpPB3DE2kyEE9OEGBJwznE28=; b=F7x10evtNtHieuwqrk/vP55K1kbr6XC6y1HIiHwYdZKW8GFp7Yuw1sKz SpneUwKl4Dqq5txEVPcJ3f8AkuSuiWn486fCgGZvsguJJf2Gtg3ZVWqpe 8ax2h67CaBwTUYaESVSNpVWmuB9wYltkSh2ILeHcKjuZM9GAPskVUT7MM atpaQCTM+DZk2EgSBKRK2Y1T6ct00dw4aevsr9zx9gz3CRzwbuOdrBCCk aIOdQrXyBVS6VpTcemRWxtf+tvJ5a12P6Yo671fDI9prLrqx1PStaAvFy 8Sz6VPgF7wImzgoLHBAhxpCpj/MljzVxWWV4LIpFGOeS3AWmaMWWQQdxJ A==; X-IronPort-AV: E=McAfee;i="6200,9189,10263"; a="231961706" X-IronPort-AV: E=Sophos;i="5.88,382,1635231600"; d="scan'208";a="231961706" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2022 18:33:42 -0800 X-IronPort-AV: E=Sophos;i="5.88,382,1635231600"; d="scan'208";a="705818706" Received: from wangz1-mobl.ccr.corp.intel.com (HELO mxu9-mobl1.ccr.corp.intel.com) ([10.255.31.171]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2022 18:33:39 -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 V3 3/8] OvmfPkg: Update EFI_HOB_PLATFORM_INFO with more platform settings Date: Sun, 20 Feb 2022 10:33:14 +0800 Message-Id: <20220220023319.1495-4-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: <20220220023319.1495-1-min.m.xu@intel.com> References: <20220220023319.1495-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 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