Browse Source

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>
Min M Xu 1 year ago
parent
commit
3abaa281d3
2 changed files with 3 additions and 0 deletions
  1. 2 0
      OvmfPkg/TdxDxe/TdxDxe.c
  2. 1 0
      OvmfPkg/TdxDxe/TdxDxe.inf

+ 2 - 0
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);

+ 1 - 0
OvmfPkg/TdxDxe/TdxDxe.inf

@@ -68,3 +68,4 @@
   gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr
   gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask
   gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack
+  gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved