]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/ArmVirtQemu.dsc
ArmVirtPkg/ArmVirtQemu: omit PCD PEIM unless TPM support is enabled
[mirror_edk2.git] / ArmVirtPkg / ArmVirtQemu.dsc
index e3686c7ee35414c68e9ac41462df99e8889b06fd..fbd9270db516b9770f32274ee5e1b8f242eb1e4f 100644 (file)
   #\r
   # TPM2 support\r
   #\r
-  gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0\r
 !if $(TPM2_ENABLE) == TRUE\r
+  gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|0\r
+!else\r
+[PcdsPatchableInModule]\r
+  # make this PCD patchable instead of dynamic when TPM support is not enabled\r
+  # this permits setting the PCD in unreachable code without pulling in dynamic PCD support\r
+  gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0\r
 !endif\r
 \r
 [PcdsDynamicHii]\r
 \r
   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|5\r
 \r
+[LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM]\r
+!if $(TPM2_ENABLE) == TRUE\r
+  PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf\r
+!else\r
+  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+!endif\r
+\r
 ################################################################################\r
 #\r
 # Components Section - list of all EDK II Modules needed by this Platform\r
   #\r
   ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf\r
   MdeModulePkg/Core/Pei/PeiMain.inf\r
-  MdeModulePkg/Universal/PCD/Pei/Pcd.inf {\r
-    <LibraryClasses>\r
-      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
-  }\r
   ArmPlatformPkg/PlatformPei/PlatformPeim.inf\r
   ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf {\r
     <LibraryClasses>\r
   ArmPkg/Drivers/CpuPei/CpuPei.inf\r
 \r
 !if $(TPM2_ENABLE) == TRUE\r
+  MdeModulePkg/Universal/PCD/Pei/Pcd.inf {\r
+    <LibraryClasses>\r
+      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
+  }\r
   MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.inf {\r
     <LibraryClasses>\r
       ResetSystemLib|ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf\r