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 <michael.d.kin...@intel.com>
Cc: Brijesh Singh <brijesh.si...@amd.com>
Cc: Erdem Aktas <erdemak...@google.com>
Cc: James Bottomley <j...@linux.ibm.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Tom Lendacky <thomas.lenda...@amd.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Signed-off-by: Min Xu <min.m...@intel.com>
---
 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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86806): https://edk2.groups.io/g/devel/message/86806
Mute This Topic: https://groups.io/mt/89266117/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to