From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: zailiang.sun@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by groups.io with SMTP; Thu, 11 Jul 2019 19:38:12 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2019 19:38:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,480,1557212400"; d="scan'208";a="168195651" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga007.fm.intel.com with ESMTP; 11 Jul 2019 19:38:12 -0700 Received: from fmsmsx163.amr.corp.intel.com (10.18.125.72) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 11 Jul 2019 19:38:11 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx163.amr.corp.intel.com (10.18.125.72) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 11 Jul 2019 19:38:11 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.240]) with mapi id 14.03.0439.000; Fri, 12 Jul 2019 10:38:09 +0800 From: "Sun, Zailiang" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: Gary Lin , "Qian, Yi" Subject: Re: [edk2-platforms Patch 24/28] Vlv2TbltDevicePkg: Reorganize the libraries Thread-Topic: [edk2-platforms Patch 24/28] Vlv2TbltDevicePkg: Reorganize the libraries Thread-Index: AQHVN1J8/ic4tzZQ80+iAs2IerkF+qbGRwRA Date: Fri, 12 Jul 2019 02:38:09 +0000 Message-ID: <7CB7EF03E15B5D48981329A508747A9850C96409@SHSMSX104.ccr.corp.intel.com> References: <20190710190516.6012-1-michael.d.kinney@intel.com> <20190710190516.6012-25-michael.d.kinney@intel.com> In-Reply-To: <20190710190516.6012-25-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zailiang.sun@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-By: Zailiang Sun -----Original Message----- From: Kinney, Michael D=20 Sent: Thursday, July 11, 2019 3:05 AM To: devel@edk2.groups.io Cc: Gary Lin ; Sun, Zailiang ; Qian,= Yi Subject: [edk2-platforms Patch 24/28] Vlv2TbltDevicePkg: Reorganize the lib= raries From: Gary Lin * 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 Cc: Yi Qian Cc: Michael D Kinney Signed-off-by: Gary Lin --- .../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/Plat= form/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 =20 PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfor= mHookLibNull.inf @@ -215,8 +214,9 @@ [LibraryClasses.common] # CryptLib # !if $(TPM_ENABLED) =3D=3D TRUE - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + =20 +TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasur +ementLib.inf +!else + =20 +TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasure +mentLibNull.inf !endif =20 BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf @@ -224,34 +224,28 @@ [LibraryClasses.common] StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf =20 !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecu= reLibNull.inf - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf - FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf !else - TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf !endif + + =20 + 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) =3D=3D TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf -!endif !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf !endif - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf + Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/D= xeTcg2PhysicalPresenceLib.inf Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibN= ull.inf =20 - - Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf =20 [LibraryClasses.IA32.SEC] @@ -305,18 +299,13 @@ [LibraryClasses.IA32] ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExt= ractGuidedSectionLib.inf =20 + =20 +Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.i +nf +!if $(TPM_ENABLED) =3D=3D TRUE TcgPhysicalPresenceLib|SecurityPkg/Library/DxeTcgPhysicalPresenceLib/Dxe= TcgPhysicalPresenceLib.inf -!if $(TPM_ENABLED) =3D=3D TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif =20 LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf EfiRegTableLib|Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.i= nf - -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf -!endif - HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRou= terDxe.inf =20 [LibraryClasses.IA32.DXE_DRIVER] @@ -370,6 +359,10 @@ [LibraryClasses.IA32.DXE_SMM_DRIVER] !endif CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuE= xceptionHandlerLib.inf =20 +!if $(TPM_ENABLED) =3D=3D TRUE + =20 +TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNul +l.inf +!endif + [LibraryClasses.IA32.SMM_CORE] MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/Pi= SmmCoreMemoryAllocationLib.inf SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/Pi= SmmCoreSmmServicesTableLib.inf @@ -389,10 +382,7 @@ [LibraryClasses.IA32.SMM_CORE] =20 [LibraryClasses.IA32.DXE_RUNTIME_DRIVER] ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/R= untimeDxeReportStatusCodeLib.inf -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf -!endif -!if $(TPM_ENABLED) =3D=3D TRUE +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE || $(TPM_ENABLED) =3D=3D TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf !endif =20 @@ -794,8 +784,6 @@ [Components.IA32] SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf SecurityPkg/Tcg/TcgPei/TcgPei.inf { - 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 { PlatformBootManagerLib|Vlv2TbltDevicePkg/Library/DxePlatformBootMana= gerLib/DxePlatformBootManagerLib.inf - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg= 2.inf } MdeModulePkg/Logo/LogoDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf { @@ -1019,9 +1006,9 @@ [Compon= ents.IA32] Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.in= f =20 !if $(TPM_ENABLED) =3D=3D TRUE - SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf { + SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf { - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } =20 SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf { diff --git a/Platform/In= tel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Platform/Intel/Vlv2TbltDevice= Pkg/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 =20 PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfor= mHookLibNull.inf @@ -217,8 +216,9 @@ [LibraryClasses.common] # CryptLib # !if $(TPM_ENABLED) =3D=3D TRUE - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + =20 +TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasur +ementLib.inf +!else + =20 +TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasure +mentLibNull.inf !endif =20 BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf @@ -226,35 +226,28 @@ [LibraryClasses.common] StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf =20 !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecu= reLibNull.inf - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf - FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf !else - TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf !endif + + =20 + 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) =3D=3D TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf -!endif !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf !endif - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf + Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/D= xeTcg2PhysicalPresenceLib.inf Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibN= ull.inf =20 - - Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf - BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf =20 [LibraryClasses.IA32.SEC] @@ -308,18 +301,13 @@ [LibraryClasses.X64] ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExt= ractGuidedSectionLib.inf =20 + =20 +Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.i +nf +!if $(TPM_ENABLED) =3D=3D TRUE TcgPhysicalPresenceLib|SecurityPkg/Library/DxeTcgPhysicalPresenceLib/Dxe= TcgPhysicalPresenceLib.inf -!if $(TPM_ENABLED) =3D=3D TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif =20 LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf EfiRegTableLib|Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.i= nf - -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf -!endif - HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRou= terDxe.inf =20 [LibraryClasses.X64.DXE_DRIVER] @@ -373,6 +361,10 @@ [LibraryClasses.X64.DXE_SMM_DRIVER] !endif CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuE= xceptionHandlerLib.inf =20 +!if $(TPM_ENABLED) =3D=3D TRUE + =20 +TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNul +l.inf +!endif + [LibraryClasses.X64.SMM_CORE] MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/Pi= SmmCoreMemoryAllocationLib.inf SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/Pi= SmmCoreSmmServicesTableLib.inf @@ -392,10 +384,7 @@ [LibraryClasses.X64.SMM_CORE] =20 [LibraryClasses.X64.DXE_RUNTIME_DRIVER] ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/R= untimeDxeReportStatusCodeLib.inf -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf -!endif -!if $(TPM_ENABLED) =3D=3D TRUE +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE || $(TPM_ENABLED) =3D=3D TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf !endif =20 @@ -797,10 +786,8 @@ [Components.IA32] SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf SecurityPkg/Tcg/TcgPei/TcgPei.inf { - NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf - NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256= .inf PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf -} + } !endif =20 Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf { @@ -941,7 +928,6 = @@ [Components.X64] MdeModulePkg/Universal/BdsDxe/BdsDxe.inf { PlatformBootManagerLib|Vlv2TbltDevicePkg/Library/DxePlatformBootMana= gerLib/DxePlatformBootManagerLib.inf - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg= 2.inf } MdeModulePkg/Logo/LogoDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf { @@ -1035,9 +1021,9 @@ [Compon= ents.X64] Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.in= f =20 !if $(TPM_ENABLED) =3D=3D TRUE - SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf { + SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf { - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } =20 SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf { diff --git a/Platform/In= tel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Platform/Intel/Vlv2TbltDevicePk= g/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 =20 PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfor= mHookLibNull.inf @@ -215,8 +214,9 @@ [LibraryClasses.common] # CryptLib # !if $(TPM_ENABLED) =3D=3D TRUE - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + =20 +TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasur +ementLib.inf +!else + =20 +TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasure +mentLibNull.inf !endif =20 BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf @@ -224,34 +224,28 @@ [LibraryClasses.common] StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf =20 !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecu= reLibNull.inf - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf - FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf !else - TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf !endif + + =20 + 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) =3D=3D TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf -!endif !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf !endif - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf + Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/D= xeTcg2PhysicalPresenceLib.inf Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibN= ull.inf =20 - - Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf =20 [LibraryClasses.IA32.SEC] @@ -305,18 +299,13 @@ [LibraryClasses.IA32] ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExt= ractGuidedSectionLib.inf =20 + =20 +Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.i +nf +!if $(TPM_ENABLED) =3D=3D TRUE TcgPhysicalPresenceLib|SecurityPkg/Library/DxeTcgPhysicalPresenceLib/Dxe= TcgPhysicalPresenceLib.inf -!if $(TPM_ENABLED) =3D=3D TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif =20 LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf EfiRegTableLib|Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.i= nf - -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf -!endif - HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRou= terDxe.inf =20 [LibraryClasses.IA32.DXE_DRIVER] @@ -370,6 +359,10 @@ [LibraryClasses.IA32.DXE_SMM_DRIVER] !endif CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuE= xceptionHandlerLib.inf =20 +!if $(TPM_ENABLED) =3D=3D TRUE + =20 +TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNul +l.inf +!endif + [LibraryClasses.IA32.SMM_CORE] MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/Pi= SmmCoreMemoryAllocationLib.inf SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/Pi= SmmCoreSmmServicesTableLib.inf @@ -389,10 +382,7 @@ [LibraryClasses.IA32.SMM_CORE] =20 [LibraryClasses.IA32.DXE_RUNTIME_DRIVER] ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/R= untimeDxeReportStatusCodeLib.inf -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf -!endif -!if $(TPM_ENABLED) =3D=3D TRUE +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE || $(TPM_ENABLED) =3D=3D TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf !endif =20 @@ -794,8 +784,6 @@ [Components.IA32] SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf SecurityPkg/Tcg/TcgPei/TcgPei.inf { - 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 { PlatformBootManagerLib|Vlv2TbltDevicePkg/Library/DxePlatformBootMana= gerLib/DxePlatformBootManagerLib.inf - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg= 2.inf } MdeModulePkg/Logo/LogoDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf { @@ -1019,9 +1006,9 @@ [Compon= ents.IA32] Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.in= f =20 !if $(TPM_ENABLED) =3D=3D TRUE - SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf { + SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf { - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } =20 SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf { diff --git a/Platform/In= tel/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 =20 PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfor= mHookLibNull.inf @@ -217,8 +216,9 @@ [LibraryClasses.common] # CryptLib # !if $(TPM_ENABLED) =3D=3D TRUE - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + =20 +TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasur +ementLib.inf +!else + =20 +TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasure +mentLibNull.inf !endif =20 BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf @@ -226,34 +226,28 @@ [LibraryClasses.common] StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf =20 !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecu= reLibNull.inf - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf - FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf !else - TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf !endif + + =20 + 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) =3D=3D TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf -!endif !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf !endif - TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf + Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/D= xeTcg2PhysicalPresenceLib.inf Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibN= ull.inf =20 - - Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf =20 [LibraryClasses.IA32.SEC] @@ -307,18 +301,13 @@ [LibraryClasses.X64] ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExt= ractGuidedSectionLib.inf =20 + =20 +Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.i +nf +!if $(TPM_ENABLED) =3D=3D TRUE TcgPhysicalPresenceLib|SecurityPkg/Library/DxeTcgPhysicalPresenceLib/Dxe= TcgPhysicalPresenceLib.inf -!if $(TPM_ENABLED) =3D=3D TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf !endif =20 LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf EfiRegTableLib|Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.i= nf - -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf -!endif - HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRou= terDxe.inf =20 [LibraryClasses.X64.DXE_DRIVER] @@ -372,6 +361,10 @@ [LibraryClasses.X64.DXE_SMM_DRIVER] !endif CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuE= xceptionHandlerLib.inf =20 +!if $(TPM_ENABLED) =3D=3D TRUE + =20 +TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNul +l.inf +!endif + [LibraryClasses.X64.SMM_CORE] MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/Pi= SmmCoreMemoryAllocationLib.inf SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/Pi= SmmCoreSmmServicesTableLib.inf @@ -391,10 +384,7 @@ [LibraryClasses.X64.SMM_CORE] =20 [LibraryClasses.X64.DXE_RUNTIME_DRIVER] ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/R= untimeDxeReportStatusCodeLib.inf -!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf -!endif -!if $(TPM_ENABLED) =3D=3D TRUE +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE || $(TPM_ENABLED) =3D=3D TRUE BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf !endif =20 @@ -796,10 +786,8 @@ [Components.IA32] SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf SecurityPkg/Tcg/TcgPei/TcgPei.inf { - NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf - NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256= .inf PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf -} + } !endif =20 Vlv2TbltDevicePkg/PlatformInitPei/PlatformInitPei.inf { @@ -940,7 +928,6 = @@ [Components.X64] MdeModulePkg/Universal/BdsDxe/BdsDxe.inf { PlatformBootManagerLib|Vlv2TbltDevicePkg/Library/DxePlatformBootMana= gerLib/DxePlatformBootManagerLib.inf - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg= 2.inf } MdeModulePkg/Logo/LogoDxe.inf MdeModulePkg/Application/UiApp/UiApp.inf { @@ -1034,9 +1021,9 @@ [Compon= ents.X64] Vlv2SocBinPkg/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PnpDxe.in= f =20 !if $(TPM_ENABLED) =3D=3D TRUE - SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf { + SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf { - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf + PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } =20 SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf { -- 2.21.0.windows.1