summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/TdxDxe
diff options
context:
space:
mode:
authorMin M Xu <min.m.xu@intel.com>2022-06-22 09:11:03 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-09-06 07:21:42 +0000
commit3abaa281d35857cd83f9ba3fe2c5638d26388b95 (patch)
treeca5ed89d9492a95b64bd73217a0183fd604b6220 /OvmfPkg/TdxDxe
parent70165fa6e2820e4a5d33737bc490b6241b9ac018 (diff)
downloadedk2-3abaa281d35857cd83f9ba3fe2c5638d26388b95.tar.gz
edk2-3abaa281d35857cd83f9ba3fe2c5638d26388b95.tar.bz2
edk2-3abaa281d35857cd83f9ba3fe2c5638d26388b95.zip
OvmfPkg/TdxDxe: Set PcdEmuVariableNvStoreReserved
Set PcdEmuVariableNvStoreReserved with the value in PlatformInfoHob. It is the address of the EmuVariableNvStore reserved in Pei-less startup. Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Min Xu <min.m.xu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'OvmfPkg/TdxDxe')
-rw-r--r--OvmfPkg/TdxDxe/TdxDxe.c2
-rw-r--r--OvmfPkg/TdxDxe/TdxDxe.inf1
2 files changed, 3 insertions, 0 deletions
diff --git a/OvmfPkg/TdxDxe/TdxDxe.c b/OvmfPkg/TdxDxe/TdxDxe.c
index bfdaef59dd..05cfb597dc 100644
--- a/OvmfPkg/TdxDxe/TdxDxe.c
+++ b/OvmfPkg/TdxDxe/TdxDxe.c
@@ -64,6 +64,8 @@ SetPcdSettings (
PlatformInfoHob->PcdCpuBootLogicalProcessorNumber
));
+ PcdSet64S (PcdEmuVariableNvStoreReserved, PlatformInfoHob->PcdEmuVariableNvStoreReserved);
+
if (TdIsEnabled ()) {
PcdStatus = PcdSet64S (PcdTdxSharedBitMask, TdSharedPageMask ());
ASSERT_RETURN_ERROR (PcdStatus);
diff --git a/OvmfPkg/TdxDxe/TdxDxe.inf b/OvmfPkg/TdxDxe/TdxDxe.inf
index a7e0abda15..3ce8a5c32c 100644
--- a/OvmfPkg/TdxDxe/TdxDxe.inf
+++ b/OvmfPkg/TdxDxe/TdxDxe.inf
@@ -68,3 +68,4 @@
gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr
gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask
gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack
+ gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved