From: Gerd Hoffmann Date: Fri, 9 Dec 2022 13:03:46 +0000 (+0800) Subject: OvmfPkg: move dsc and fdf include snippets for TPM support to subdirs X-Git-Tag: edk2-stable202302~277 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=5c25f6c67b12859e9df833aa9027be4ce2a3d942 OvmfPkg: move dsc and fdf include snippets for TPM support to subdirs Signed-off-by: Gerd Hoffmann Reviewed-by: Jiewen Yao --- diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc index 8f7cae787e..e0b04d6734 100644 --- a/OvmfPkg/AmdSev/AmdSevX64.dsc +++ b/OvmfPkg/AmdSev/AmdSevX64.dsc @@ -33,7 +33,7 @@ # DEFINE SOURCE_DEBUG_ENABLE = FALSE -!include OvmfPkg/OvmfTpmDefines.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmDefines.dsc.inc # # Shell can be useful for debugging but should not be enabled for production @@ -200,7 +200,7 @@ SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf -!include OvmfPkg/OvmfTpmLibs.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -527,12 +527,12 @@ # Set ConfidentialComputing defaults gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0 -!include OvmfPkg/OvmfTpmPcds.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc gEfiMdePkgTokenSpaceGuid.PcdFSBClock|1000000000 [PcdsDynamicHii] -!include OvmfPkg/OvmfTpmPcdsHii.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc ################################################################################ # @@ -573,7 +573,7 @@ UefiCpuPkg/CpuMpPei/CpuMpPei.inf OvmfPkg/AmdSev/SecretPei/SecretPei.inf -!include OvmfPkg/OvmfTpmComponentsPei.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmComponentsPei.dsc.inc # # DXE Phase modules @@ -595,7 +595,7 @@ MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf { -!include OvmfPkg/OvmfTpmSecurityStub.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmSecurityStub.dsc.inc } MdeModulePkg/Universal/EbcDxe/EbcDxe.inf @@ -766,4 +766,4 @@ # # TPM support # -!include OvmfPkg/OvmfTpmComponentsDxe.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmComponentsDxe.dsc.inc diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc b/OvmfPkg/CloudHv/CloudHvX64.dsc index ce277cb239..fcc5722a6b 100644 --- a/OvmfPkg/CloudHv/CloudHvX64.dsc +++ b/OvmfPkg/CloudHv/CloudHvX64.dsc @@ -33,7 +33,7 @@ DEFINE SMM_REQUIRE = FALSE DEFINE SOURCE_DEBUG_ENABLE = FALSE -!include OvmfPkg/OvmfTpmDefines.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmDefines.dsc.inc # # Network definition @@ -247,7 +247,7 @@ SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf -!include OvmfPkg/OvmfTpmLibs.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -630,7 +630,7 @@ gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00 -!include OvmfPkg/OvmfTpmPcds.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc # IPv4 and IPv6 PXE Boot support. gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 @@ -640,7 +640,7 @@ gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0 [PcdsDynamicHii] -!include OvmfPkg/OvmfTpmPcdsHii.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc ################################################################################ # @@ -690,7 +690,7 @@ !endif UefiCpuPkg/CpuMpPei/CpuMpPei.inf -!include OvmfPkg/OvmfTpmComponentsPei.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmComponentsPei.dsc.inc # # DXE Phase modules @@ -714,7 +714,7 @@ !if $(SECURE_BOOT_ENABLE) == TRUE NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf -!include OvmfPkg/OvmfTpmSecurityStub.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmSecurityStub.dsc.inc !endif } @@ -945,4 +945,4 @@ # # TPM support # -!include OvmfPkg/OvmfTpmComponentsDxe.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmComponentsDxe.dsc.inc diff --git a/OvmfPkg/Include/Dsc/OvmfTpmComponentsDxe.dsc.inc b/OvmfPkg/Include/Dsc/OvmfTpmComponentsDxe.dsc.inc new file mode 100644 index 0000000000..75ae09571e --- /dev/null +++ b/OvmfPkg/Include/Dsc/OvmfTpmComponentsDxe.dsc.inc @@ -0,0 +1,28 @@ +## +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +!if $(TPM2_ENABLE) == TRUE + SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf { + + Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf + NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf + HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf + NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf + NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf + NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf + NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf + NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf + } + SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf +!if $(TPM1_ENABLE) == TRUE + SecurityPkg/Tcg/TcgDxe/TcgDxe.inf { + + Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf + } +!endif + SecurityPkg/Tcg/Tcg2PlatformDxe/Tcg2PlatformDxe.inf { + + TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.inf + } +!endif diff --git a/OvmfPkg/Include/Dsc/OvmfTpmComponentsPei.dsc.inc b/OvmfPkg/Include/Dsc/OvmfTpmComponentsPei.dsc.inc new file mode 100644 index 0000000000..fa486eed82 --- /dev/null +++ b/OvmfPkg/Include/Dsc/OvmfTpmComponentsPei.dsc.inc @@ -0,0 +1,26 @@ +## +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +!if $(TPM2_ENABLE) == TRUE + OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPei.inf +!if $(TPM1_ENABLE) == TRUE + OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf + SecurityPkg/Tcg/TcgPei/TcgPei.inf +!else + OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf +!endif + SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf { + + HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf + NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf + NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf + NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf + NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf + NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf + } + SecurityPkg/Tcg/Tcg2PlatformPei/Tcg2PlatformPei.inf { + + TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.inf + } +!endif diff --git a/OvmfPkg/Include/Dsc/OvmfTpmDefines.dsc.inc b/OvmfPkg/Include/Dsc/OvmfTpmDefines.dsc.inc new file mode 100644 index 0000000000..a65564d8d9 --- /dev/null +++ b/OvmfPkg/Include/Dsc/OvmfTpmDefines.dsc.inc @@ -0,0 +1,8 @@ +## +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + + DEFINE TPM2_ENABLE = FALSE + + # has no effect unless TPM2_ENABLE == TRUE + DEFINE TPM1_ENABLE = TRUE diff --git a/OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc b/OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc new file mode 100644 index 0000000000..cd1a899d68 --- /dev/null +++ b/OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc @@ -0,0 +1,34 @@ +## +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +[LibraryClasses] +!if $(TPM2_ENABLE) == TRUE +!if $(TPM1_ENABLE) == TRUE + Tpm12CommandLib|SecurityPkg/Library/Tpm12CommandLib/Tpm12CommandLib.inf +!endif + Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf + Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeTcg2PhysicalPresenceLib.inf + Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.inf + TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf +!else + Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLib.inf + TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf +!endif + +[LibraryClasses.common.PEIM] +!if $(TPM2_ENABLE) == TRUE + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf +!if $(TPM1_ENABLE) == TRUE + Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf +!endif + Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf +!endif + +[LibraryClasses.common.DXE_DRIVER] +!if $(TPM2_ENABLE) == TRUE +!if $(TPM1_ENABLE) == TRUE + Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf +!endif + Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf +!endif diff --git a/OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc b/OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc new file mode 100644 index 0000000000..0d55d62737 --- /dev/null +++ b/OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc @@ -0,0 +1,7 @@ +## +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +!if $(TPM2_ENABLE) == TRUE + gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} +!endif diff --git a/OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc b/OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc new file mode 100644 index 0000000000..e842253235 --- /dev/null +++ b/OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc @@ -0,0 +1,8 @@ +## +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +!if $(TPM2_ENABLE) == TRUE + gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer|L"TCG2_VERSION"|gTcg2ConfigFormSetGuid|0x0|"1.3"|NV,BS + gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev|L"TCG2_VERSION"|gTcg2ConfigFormSetGuid|0x8|3|NV,BS +!endif diff --git a/OvmfPkg/Include/Dsc/OvmfTpmSecurityStub.dsc.inc b/OvmfPkg/Include/Dsc/OvmfTpmSecurityStub.dsc.inc new file mode 100644 index 0000000000..e9ab2fca7b --- /dev/null +++ b/OvmfPkg/Include/Dsc/OvmfTpmSecurityStub.dsc.inc @@ -0,0 +1,10 @@ +## +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +!if $(TPM2_ENABLE) == TRUE +!if $(TPM1_ENABLE) == TRUE + NULL|SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.inf +!endif + NULL|SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.inf +!endif diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc index 994a02d301..649005201f 100644 --- a/OvmfPkg/Microvm/MicrovmX64.dsc +++ b/OvmfPkg/Microvm/MicrovmX64.dsc @@ -703,7 +703,7 @@ !if $(SECURE_BOOT_ENABLE) == TRUE NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf -!include OvmfPkg/OvmfTpmSecurityStub.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmSecurityStub.dsc.inc !endif } diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 6f774baf90..5a2214a872 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -34,7 +34,7 @@ DEFINE SOURCE_DEBUG_ENABLE = FALSE DEFINE LOAD_X64_ON_IA32_ENABLE = FALSE -!include OvmfPkg/OvmfTpmDefines.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmDefines.dsc.inc # # Shell can be useful for debugging but should not be enabled for production @@ -252,7 +252,7 @@ SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf -!include OvmfPkg/OvmfTpmLibs.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -657,7 +657,7 @@ gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00 -!include OvmfPkg/OvmfTpmPcds.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc # IPv4 and IPv6 PXE Boot support. gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 @@ -671,7 +671,7 @@ !endif [PcdsDynamicHii] -!include OvmfPkg/OvmfTpmPcdsHii.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc ################################################################################ # @@ -721,7 +721,7 @@ !endif UefiCpuPkg/CpuMpPei/CpuMpPei.inf -!include OvmfPkg/OvmfTpmComponentsPei.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmComponentsPei.dsc.inc # # DXE Phase modules @@ -746,7 +746,7 @@ !if $(SECURE_BOOT_ENABLE) == TRUE NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf !endif -!include OvmfPkg/OvmfTpmSecurityStub.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmSecurityStub.dsc.inc } MdeModulePkg/Universal/EbcDxe/EbcDxe.inf @@ -1014,7 +1014,7 @@ # # TPM support # -!include OvmfPkg/OvmfTpmComponentsDxe.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmComponentsDxe.dsc.inc !if $(LOAD_X64_ON_IA32_ENABLE) == TRUE OvmfPkg/CompatImageLoaderDxe/CompatImageLoaderDxe.inf diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index c851764dec..bac41d7309 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -33,7 +33,7 @@ DEFINE SMM_REQUIRE = FALSE DEFINE SOURCE_DEBUG_ENABLE = FALSE -!include OvmfPkg/OvmfTpmDefines.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmDefines.dsc.inc # # Shell can be useful for debugging but should not be enabled for production @@ -256,7 +256,7 @@ SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf -!include OvmfPkg/OvmfTpmLibs.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -669,7 +669,7 @@ gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00 -!include OvmfPkg/OvmfTpmPcds.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc # Set ConfidentialComputing defaults gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0 @@ -684,7 +684,7 @@ gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01 [PcdsDynamicHii] -!include OvmfPkg/OvmfTpmPcdsHii.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc ################################################################################ # @@ -734,7 +734,7 @@ !endif UefiCpuPkg/CpuMpPei/CpuMpPei.inf -!include OvmfPkg/OvmfTpmComponentsPei.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmComponentsPei.dsc.inc [Components.X64] # @@ -760,7 +760,7 @@ !if $(SECURE_BOOT_ENABLE) == TRUE NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf !endif -!include OvmfPkg/OvmfTpmSecurityStub.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmSecurityStub.dsc.inc } MdeModulePkg/Universal/EbcDxe/EbcDxe.inf @@ -1032,4 +1032,4 @@ # # TPM support # -!include OvmfPkg/OvmfTpmComponentsDxe.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmComponentsDxe.dsc.inc diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 63c3a47aea..9b6257a691 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -33,7 +33,7 @@ DEFINE SMM_REQUIRE = FALSE DEFINE SOURCE_DEBUG_ENABLE = FALSE -!include OvmfPkg/OvmfTpmDefines.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmDefines.dsc.inc # # Shell can be useful for debugging but should not be enabled for production @@ -272,7 +272,7 @@ SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf -!include OvmfPkg/OvmfTpmLibs.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -693,7 +693,7 @@ gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00 -!include OvmfPkg/OvmfTpmPcds.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc # IPv4 and IPv6 PXE Boot support. gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01 @@ -707,7 +707,7 @@ !endif [PcdsDynamicHii] -!include OvmfPkg/OvmfTpmPcdsHii.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc ################################################################################ # @@ -780,7 +780,7 @@ NULL|OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibUpDepLib.inf } -!include OvmfPkg/OvmfTpmComponentsPei.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmComponentsPei.dsc.inc # # DXE Phase modules @@ -804,7 +804,7 @@ !if $(SECURE_BOOT_ENABLE) == TRUE NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf -!include OvmfPkg/OvmfTpmSecurityStub.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmSecurityStub.dsc.inc !endif } @@ -1102,4 +1102,4 @@ # # TPM support # -!include OvmfPkg/OvmfTpmComponentsDxe.dsc.inc +!include OvmfPkg/Include/Dsc/OvmfTpmComponentsDxe.dsc.inc diff --git a/OvmfPkg/OvmfTpmComponentsDxe.dsc.inc b/OvmfPkg/OvmfTpmComponentsDxe.dsc.inc deleted file mode 100644 index 75ae09571e..0000000000 --- a/OvmfPkg/OvmfTpmComponentsDxe.dsc.inc +++ /dev/null @@ -1,28 +0,0 @@ -## -# SPDX-License-Identifier: BSD-2-Clause-Patent -## - -!if $(TPM2_ENABLE) == TRUE - SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf { - - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf - NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf - HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf - NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf - NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf - NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf - NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf - NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf - } - SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf -!if $(TPM1_ENABLE) == TRUE - SecurityPkg/Tcg/TcgDxe/TcgDxe.inf { - - Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf - } -!endif - SecurityPkg/Tcg/Tcg2PlatformDxe/Tcg2PlatformDxe.inf { - - TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.inf - } -!endif diff --git a/OvmfPkg/OvmfTpmComponentsPei.dsc.inc b/OvmfPkg/OvmfTpmComponentsPei.dsc.inc deleted file mode 100644 index fa486eed82..0000000000 --- a/OvmfPkg/OvmfTpmComponentsPei.dsc.inc +++ /dev/null @@ -1,26 +0,0 @@ -## -# SPDX-License-Identifier: BSD-2-Clause-Patent -## - -!if $(TPM2_ENABLE) == TRUE - OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPei.inf -!if $(TPM1_ENABLE) == TRUE - OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf - SecurityPkg/Tcg/TcgPei/TcgPei.inf -!else - OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf -!endif - SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf { - - HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf - NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf - NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf - NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf - NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf - NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf - } - SecurityPkg/Tcg/Tcg2PlatformPei/Tcg2PlatformPei.inf { - - TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.inf - } -!endif diff --git a/OvmfPkg/OvmfTpmDefines.dsc.inc b/OvmfPkg/OvmfTpmDefines.dsc.inc deleted file mode 100644 index a65564d8d9..0000000000 --- a/OvmfPkg/OvmfTpmDefines.dsc.inc +++ /dev/null @@ -1,8 +0,0 @@ -## -# SPDX-License-Identifier: BSD-2-Clause-Patent -## - - DEFINE TPM2_ENABLE = FALSE - - # has no effect unless TPM2_ENABLE == TRUE - DEFINE TPM1_ENABLE = TRUE diff --git a/OvmfPkg/OvmfTpmLibs.dsc.inc b/OvmfPkg/OvmfTpmLibs.dsc.inc deleted file mode 100644 index cd1a899d68..0000000000 --- a/OvmfPkg/OvmfTpmLibs.dsc.inc +++ /dev/null @@ -1,34 +0,0 @@ -## -# SPDX-License-Identifier: BSD-2-Clause-Patent -## - -[LibraryClasses] -!if $(TPM2_ENABLE) == TRUE -!if $(TPM1_ENABLE) == TRUE - Tpm12CommandLib|SecurityPkg/Library/Tpm12CommandLib/Tpm12CommandLib.inf -!endif - Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf - Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeTcg2PhysicalPresenceLib.inf - Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.inf - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf -!else - Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLib.inf - TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf -!endif - -[LibraryClasses.common.PEIM] -!if $(TPM2_ENABLE) == TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf -!if $(TPM1_ENABLE) == TRUE - Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf -!endif - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf -!endif - -[LibraryClasses.common.DXE_DRIVER] -!if $(TPM2_ENABLE) == TRUE -!if $(TPM1_ENABLE) == TRUE - Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf -!endif - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf -!endif diff --git a/OvmfPkg/OvmfTpmPcds.dsc.inc b/OvmfPkg/OvmfTpmPcds.dsc.inc deleted file mode 100644 index 0d55d62737..0000000000 --- a/OvmfPkg/OvmfTpmPcds.dsc.inc +++ /dev/null @@ -1,7 +0,0 @@ -## -# SPDX-License-Identifier: BSD-2-Clause-Patent -## - -!if $(TPM2_ENABLE) == TRUE - gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} -!endif diff --git a/OvmfPkg/OvmfTpmPcdsHii.dsc.inc b/OvmfPkg/OvmfTpmPcdsHii.dsc.inc deleted file mode 100644 index e842253235..0000000000 --- a/OvmfPkg/OvmfTpmPcdsHii.dsc.inc +++ /dev/null @@ -1,8 +0,0 @@ -## -# SPDX-License-Identifier: BSD-2-Clause-Patent -## - -!if $(TPM2_ENABLE) == TRUE - gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer|L"TCG2_VERSION"|gTcg2ConfigFormSetGuid|0x0|"1.3"|NV,BS - gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev|L"TCG2_VERSION"|gTcg2ConfigFormSetGuid|0x8|3|NV,BS -!endif diff --git a/OvmfPkg/OvmfTpmSecurityStub.dsc.inc b/OvmfPkg/OvmfTpmSecurityStub.dsc.inc deleted file mode 100644 index e9ab2fca7b..0000000000 --- a/OvmfPkg/OvmfTpmSecurityStub.dsc.inc +++ /dev/null @@ -1,10 +0,0 @@ -## -# SPDX-License-Identifier: BSD-2-Clause-Patent -## - -!if $(TPM2_ENABLE) == TRUE -!if $(TPM1_ENABLE) == TRUE - NULL|SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.inf -!endif - NULL|SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.inf -!endif