Reviewed-By: Zailiang Sun <zailiang....@intel.com> -----Original Message----- From: Kinney, Michael D Sent: Thursday, July 11, 2019 3:05 AM To: devel@edk2.groups.io Cc: Gary Lin <g...@suse.com>; Sun, Zailiang <zailiang....@intel.com>; Qian, Yi <yi.q...@intel.com> Subject: [edk2-platforms Patch 24/28] Vlv2TbltDevicePkg: Reorganize the libraries
From: Gary Lin <g...@suse.com> * Simplify the logic of importing TpmMeasurementLib * Import BaseCryptLib, OpensslLib, and IntrinsicLib unconditionally since FmpDxe needs them * Import FileExplorerLib unconditionally since UiApp needs it * Update the import of TPM/TCG libraries Cc: Zailiang Sun <zailiang....@intel.com> Cc: Yi Qian <yi.q...@intel.com> Cc: Michael D Kinney <michael.d.kin...@intel.com> Signed-off-by: Gary Lin <g...@suse.com> --- .../Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc | 45 +++++++---------- .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 48 +++++++------------ .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 45 +++++++---------- .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 47 +++++++----------- 4 files changed, 66 insertions(+), 119 deletions(-) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc index e4e86cbb07..eb7ae46505 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccIA32.dsc @@ -197,7 +197,6 @@ [LibraryClasses.common] TpmCommLib|SecurityPkg/Library/TpmCommLib/TpmCommLib.inf Tpm12CommandLib|SecurityPkg/Library/Tpm12CommandLib/Tpm12CommandLib.inf Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf - !endif PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf @@ -215,8 +214,9 @@ [LibraryClasses.common] # CryptLib # !if $(TPM_ENABLED) == TRUE - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + +TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasur +ementLib.inf +!else + +TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasure +mentLibNull.inf !endif BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf @@ -224,34 +224,28 @@ [LibraryClasses.common] StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf !if $(SECURE_BOOT_ENABLE) == TRUE - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf - FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf !else - TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf !endif + + + FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.i + nf + VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf -!if $(NETWORK_ISCSI_ENABLE) == TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf -!endif !if $(NETWORK_TLS_ENABLE) == TRUE TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf !endif - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf + Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.inf - - Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf [LibraryClasses.IA32.SEC] @@ -305,18 +299,13 @@ [LibraryClasses.IA32] ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf + +Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.i +nf +!if $(TPM_ENABLED) == TRUE TcgPhysicalPresenceLib|SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf -!if $(TPM_ENABLED) == TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf EfiRegTableLib|Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.inf - -!if $(SECURE_BOOT_ENABLE) == TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf -!endif - HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf [LibraryClasses.IA32.DXE_DRIVER] @@ -370,6 +359,10 @@ [LibraryClasses.IA32.DXE_SMM_DRIVER] !endif CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf +!if $(TPM_ENABLED) == TRUE + +TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNul +l.inf +!endif + [LibraryClasses.IA32.SMM_CORE] MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf @@ -389,10 +382,7 @@ [LibraryClasses.IA32.SMM_CORE] [LibraryClasses.IA32.DXE_RUNTIME_DRIVER] ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf -!if $(SECURE_BOOT_ENABLE) == TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf -!endif -!if $(TPM_ENABLED) == TRUE +!if $(SECURE_BOOT_ENABLE) == TRUE || $(TPM_ENABLED) == TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf !endif @@ -794,8 +784,6 @@ [Components.IA32] SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf SecurityPkg/Tcg/TcgPei/TcgPei.inf { <LibraryClasses> - NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf - NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf } !endif @@ -925,7 +913,6 @@ [Components.IA32] MdeModulePkg/Universal/BdsDxe/BdsDxe.inf { <LibraryClasses> PlatformBootManagerLib|Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf } MdeModulePkg/Logo/LogoDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf { @@ -1019,9 +1006,9 @@ [Components.IA32] Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.inf !if $(TPM_ENABLED) == TRUE - SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf { + SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf { <LibraryClasses> - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf { diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc index bc986eae78..69f2b22aff 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc @@ -199,7 +199,6 @@ [LibraryClasses.common] TpmCommLib|SecurityPkg/Library/TpmCommLib/TpmCommLib.inf Tpm12CommandLib|SecurityPkg/Library/Tpm12CommandLib/Tpm12CommandLib.inf Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf - !endif PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf @@ -217,8 +216,9 @@ [LibraryClasses.common] # CryptLib # !if $(TPM_ENABLED) == TRUE - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + +TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasur +ementLib.inf +!else + +TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasure +mentLibNull.inf !endif BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf @@ -226,35 +226,28 @@ [LibraryClasses.common] StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf !if $(SECURE_BOOT_ENABLE) == TRUE - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf - FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf !else - TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf !endif + + + FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.i + nf + VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf -!if $(NETWORK_ISCSI_ENABLE) == TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf -!endif !if $(NETWORK_TLS_ENABLE) == TRUE TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf !endif - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf + Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.inf - - Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf - BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf [LibraryClasses.IA32.SEC] @@ -308,18 +301,13 @@ [LibraryClasses.X64] ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf + +Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.i +nf +!if $(TPM_ENABLED) == TRUE TcgPhysicalPresenceLib|SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf -!if $(TPM_ENABLED) == TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf EfiRegTableLib|Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.inf - -!if $(SECURE_BOOT_ENABLE) == TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf -!endif - HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf [LibraryClasses.X64.DXE_DRIVER] @@ -373,6 +361,10 @@ [LibraryClasses.X64.DXE_SMM_DRIVER] !endif CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf +!if $(TPM_ENABLED) == TRUE + +TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNul +l.inf +!endif + [LibraryClasses.X64.SMM_CORE] MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf @@ -392,10 +384,7 @@ [LibraryClasses.X64.SMM_CORE] [LibraryClasses.X64.DXE_RUNTIME_DRIVER] ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf -!if $(SECURE_BOOT_ENABLE) == TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf -!endif -!if $(TPM_ENABLED) == TRUE +!if $(SECURE_BOOT_ENABLE) == TRUE || $(TPM_ENABLED) == TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf !endif @@ -797,10 +786,8 @@ [Components.IA32] SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf SecurityPkg/Tcg/TcgPei/TcgPei.inf { <LibraryClasses> - NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf - NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf -} + } !endif Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf { @@ -941,7 +928,6 @@ [Components.X64] MdeModulePkg/Universal/BdsDxe/BdsDxe.inf { <LibraryClasses> PlatformBootManagerLib|Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf } MdeModulePkg/Logo/LogoDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf { @@ -1035,9 +1021,9 @@ [Components.X64] Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.inf !if $(TPM_ENABLED) == TRUE - SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf { + SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf { <LibraryClasses> - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf { diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc index f2f02e5f76..7092ab6e6b 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc @@ -197,7 +197,6 @@ [LibraryClasses.common] TpmCommLib|SecurityPkg/Library/TpmCommLib/TpmCommLib.inf Tpm12CommandLib|SecurityPkg/Library/Tpm12CommandLib/Tpm12CommandLib.inf Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf - !endif PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf @@ -215,8 +214,9 @@ [LibraryClasses.common] # CryptLib # !if $(TPM_ENABLED) == TRUE - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + +TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasur +ementLib.inf +!else + +TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasure +mentLibNull.inf !endif BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf @@ -224,34 +224,28 @@ [LibraryClasses.common] StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf !if $(SECURE_BOOT_ENABLE) == TRUE - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf - FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf !else - TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf !endif + + + FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.i + nf + VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf -!if $(NETWORK_ISCSI_ENABLE) == TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf -!endif !if $(NETWORK_TLS_ENABLE) == TRUE TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf !endif - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf + Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.inf - - Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf [LibraryClasses.IA32.SEC] @@ -305,18 +299,13 @@ [LibraryClasses.IA32] ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf + +Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.i +nf +!if $(TPM_ENABLED) == TRUE TcgPhysicalPresenceLib|SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf -!if $(TPM_ENABLED) == TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf EfiRegTableLib|Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.inf - -!if $(SECURE_BOOT_ENABLE) == TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf -!endif - HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf [LibraryClasses.IA32.DXE_DRIVER] @@ -370,6 +359,10 @@ [LibraryClasses.IA32.DXE_SMM_DRIVER] !endif CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf +!if $(TPM_ENABLED) == TRUE + +TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNul +l.inf +!endif + [LibraryClasses.IA32.SMM_CORE] MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf @@ -389,10 +382,7 @@ [LibraryClasses.IA32.SMM_CORE] [LibraryClasses.IA32.DXE_RUNTIME_DRIVER] ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf -!if $(SECURE_BOOT_ENABLE) == TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf -!endif -!if $(TPM_ENABLED) == TRUE +!if $(SECURE_BOOT_ENABLE) == TRUE || $(TPM_ENABLED) == TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf !endif @@ -794,8 +784,6 @@ [Components.IA32] SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf SecurityPkg/Tcg/TcgPei/TcgPei.inf { <LibraryClasses> - NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf - NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf } !endif @@ -925,7 +913,6 @@ [Components.IA32] MdeModulePkg/Universal/BdsDxe/BdsDxe.inf { <LibraryClasses> PlatformBootManagerLib|Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf } MdeModulePkg/Logo/LogoDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf { @@ -1019,9 +1006,9 @@ [Components.IA32] Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.inf !if $(TPM_ENABLED) == TRUE - SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf { + SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf { <LibraryClasses> - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf { diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc index 4184c946a6..238561191f 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc @@ -199,7 +199,6 @@ [LibraryClasses.common] TpmCommLib|SecurityPkg/Library/TpmCommLib/TpmCommLib.inf Tpm12CommandLib|SecurityPkg/Library/Tpm12CommandLib/Tpm12CommandLib.inf Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf - !endif PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf @@ -217,8 +216,9 @@ [LibraryClasses.common] # CryptLib # !if $(TPM_ENABLED) == TRUE - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + +TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasur +ementLib.inf +!else + +TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasure +mentLibNull.inf !endif BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf @@ -226,34 +226,28 @@ [LibraryClasses.common] StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf !if $(SECURE_BOOT_ENABLE) == TRUE - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf - FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf !else - TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf !endif + + + FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.i + nf + VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf -!if $(NETWORK_ISCSI_ENABLE) == TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf -!endif !if $(NETWORK_TLS_ENABLE) == TRUE TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf !endif - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf + Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.inf - - Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf [LibraryClasses.IA32.SEC] @@ -307,18 +301,13 @@ [LibraryClasses.X64] ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf + +Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.i +nf +!if $(TPM_ENABLED) == TRUE TcgPhysicalPresenceLib|SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf -!if $(TPM_ENABLED) == TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf EfiRegTableLib|Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.inf - -!if $(SECURE_BOOT_ENABLE) == TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf -!endif - HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf [LibraryClasses.X64.DXE_DRIVER] @@ -372,6 +361,10 @@ [LibraryClasses.X64.DXE_SMM_DRIVER] !endif CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf +!if $(TPM_ENABLED) == TRUE + +TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNul +l.inf +!endif + [LibraryClasses.X64.SMM_CORE] MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf @@ -391,10 +384,7 @@ [LibraryClasses.X64.SMM_CORE] [LibraryClasses.X64.DXE_RUNTIME_DRIVER] ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf -!if $(SECURE_BOOT_ENABLE) == TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf -!endif -!if $(TPM_ENABLED) == TRUE +!if $(SECURE_BOOT_ENABLE) == TRUE || $(TPM_ENABLED) == TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf !endif @@ -796,10 +786,8 @@ [Components.IA32] SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf SecurityPkg/Tcg/TcgPei/TcgPei.inf { <LibraryClasses> - NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf - NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf -} + } !endif Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf { @@ -940,7 +928,6 @@ [Components.X64] MdeModulePkg/Universal/BdsDxe/BdsDxe.inf { <LibraryClasses> PlatformBootManagerLib|Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf } MdeModulePkg/Logo/LogoDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf { @@ -1034,9 +1021,9 @@ [Components.X64] Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.inf !if $(TPM_ENABLED) == TRUE - SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf { + SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf { <LibraryClasses> - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf { -- 2.21.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43631): https://edk2.groups.io/g/devel/message/43631 Mute This Topic: https://groups.io/mt/32419752/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-