diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2022-09-25 17:22:04 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-10-26 17:28:39 +0000 |
commit | b6efc505e4d6eb2055a39afd0a1ee67846a1e5f9 (patch) | |
tree | a95125b0da4db8d026952979ae3e0eb79e5cdd8d /ArmVirtPkg/ArmVirtQemu.dsc | |
parent | 7136d5491e225c57f1d73e4a1b7ac27ed656ff72 (diff) | |
download | edk2-b6efc505e4d6eb2055a39afd0a1ee67846a1e5f9.tar.gz |
ArmVirtPkg/ArmVirtQemu: omit PCD PEIM unless TPM support is enabled
The TPM discovery code relies on a dynamic PCD to communicate the TPM
base address to other components. But no other code relies on dynamic
PCDs in the PEI phase so let's drop the PCD PEIM when TPM support is not
enabled.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'ArmVirtPkg/ArmVirtQemu.dsc')
-rw-r--r-- | ArmVirtPkg/ArmVirtQemu.dsc | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index e3686c7ee3..fbd9270db5 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -288,10 +288,15 @@ #
# TPM2 support
#
- gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0
!if $(TPM2_ENABLE) == TRUE
+ gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0
gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|0
+!else
+[PcdsPatchableInModule]
+ # make this PCD patchable instead of dynamic when TPM support is not enabled
+ # this permits setting the PCD in unreachable code without pulling in dynamic PCD support
+ gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0
!endif
[PcdsDynamicHii]
@@ -304,6 +309,13 @@ gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|5
+[LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM]
+!if $(TPM2_ENABLE) == TRUE
+ PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
+!else
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+!endif
+
################################################################################
#
# Components Section - list of all EDK II Modules needed by this Platform
@@ -315,10 +327,6 @@ #
ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
MdeModulePkg/Core/Pei/PeiMain.inf
- MdeModulePkg/Universal/PCD/Pei/Pcd.inf {
- <LibraryClasses>
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- }
ArmPlatformPkg/PlatformPei/PlatformPeim.inf
ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf {
<LibraryClasses>
@@ -329,6 +337,10 @@ ArmPkg/Drivers/CpuPei/CpuPei.inf
!if $(TPM2_ENABLE) == TRUE
+ MdeModulePkg/Universal/PCD/Pei/Pcd.inf {
+ <LibraryClasses>
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+ }
MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.inf {
<LibraryClasses>
ResetSystemLib|ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf
|