MdePkg: introduce standalone MM entry point library implementation
[mirror_edk2.git] / SecurityPkg / SecurityPkg.dsc
1 ## @file\r
2 #  Security Module Package for All Architectures.\r
3 #\r
4 # Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>\r
5 # (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
6 # This program and the accompanying materials\r
7 # are licensed and made available under the terms and conditions of the BSD License\r
8 # which accompanies this distribution. The full text of the license may be found at\r
9 # http://opensource.org/licenses/bsd-license.php\r
10 #\r
11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13 #\r
14 ##\r
15 \r
16 [Defines]\r
17   PLATFORM_NAME                  = SecurityPkg\r
18   PLATFORM_GUID                  = B2C4614D-AE76-47ba-B876-5988BFED064F\r
19   PLATFORM_VERSION               = 0.98\r
20   DSC_SPECIFICATION              = 0x00010005\r
21   OUTPUT_DIRECTORY               = Build/SecurityPkg\r
22   SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64\r
23   BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT\r
24   SKUID_IDENTIFIER               = DEFAULT\r
25 \r
26 [LibraryClasses]\r
27   DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r
28   DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf\r
29   BaseLib|MdePkg/Library/BaseLib/BaseLib.inf\r
30   SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf\r
31   TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf\r
32   BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf\r
33   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
34   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf\r
35   UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf\r
36   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf\r
37   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf\r
38   PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf\r
39 \r
40   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf\r
41   UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
42   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
43   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
44   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf\r
45   DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
46   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
47   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf\r
48   ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
49   OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf\r
50   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf\r
51   UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf\r
52   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
53   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
54   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
55   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
56   TpmCommLib|SecurityPkg/Library/TpmCommLib/TpmCommLib.inf\r
57   PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf\r
58   TcgPhysicalPresenceLib|SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf\r
59   TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf\r
60   Tpm12CommandLib|SecurityPkg/Library/Tpm12CommandLib/Tpm12CommandLib.inf\r
61   Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf\r
62   Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf\r
63   TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNull.inf\r
64   Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.inf\r
65   RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf\r
66   PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf\r
67   PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf\r
68   S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf\r
69   SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf\r
70   LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf\r
71   PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf\r
72   TcgStorageCoreLib|SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCoreLib.inf\r
73   TcgStorageOpalLib|SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLib.inf\r
74   ResetSystemLib|MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.inf\r
75 \r
76 [LibraryClasses.common.PEIM]\r
77   PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf\r
78   PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf\r
79   PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf\r
80   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf\r
81   MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf\r
82   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf\r
83   HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf\r
84   ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf\r
85   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf\r
86   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf\r
87   Tcg2PhysicalPresenceLib|SecurityPkg/Library/PeiTcg2PhysicalPresenceLib/PeiTcg2PhysicalPresenceLib.inf\r
88   RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf\r
89 \r
90 [LibraryClasses.common.DXE_DRIVER]\r
91   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
92   ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
93   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
94   HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf\r
95   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf\r
96   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
97   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf\r
98 \r
99 [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_SAL_DRIVER,]\r
100   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
101   DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
102   HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf\r
103   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf\r
104   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
105 \r
106 [LibraryClasses.common.DXE_RUNTIME_DRIVER]\r
107   ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf\r
108   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf\r
109   HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf\r
110   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf\r
111   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
112 \r
113 [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION]\r
114   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
115   HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf\r
116   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf\r
117   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
118 \r
119 [LibraryClasses.common.DXE_SMM_DRIVER]\r
120   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
121   SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf\r
122   MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf\r
123   ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLib.inf\r
124   SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf\r
125   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf\r
126   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf\r
127   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
128   Tcg2PhysicalPresenceLib|SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.inf\r
129   SmmIoLib|MdePkg/Library/SmmIoLib/SmmIoLib.inf\r
130 \r
131 [PcdsDynamicDefault.common.DEFAULT]\r
132   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0xb6, 0xe5, 0x01, 0x8b, 0x19, 0x4f, 0xe8, 0x46, 0xab, 0x93, 0x1c, 0x53, 0x67, 0x1b, 0x90, 0xcc}\r
133   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2InitializationPolicy|1\r
134   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2SelfTestPolicy|1\r
135   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2ScrtmPolicy|1\r
136   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInitializationPolicy|1\r
137   gEfiSecurityPkgTokenSpaceGuid.PcdTpmScrtmPolicy|1\r
138   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|3\r
139   gEfiSecurityPkgTokenSpaceGuid.PcdTcg2HashAlgorithmBitmap|3\r
140 \r
141 [PcdsDynamicHii.common.DEFAULT]\r
142   gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer|L"TCG2_VERSION"|gTcg2ConfigFormSetGuid|0x0|"1.3"|NV,BS\r
143   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev|L"TCG2_VERSION"|gTcg2ConfigFormSetGuid|0x8|3|NV,BS\r
144 \r
145 [Components]\r
146   SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf\r
147   #SecurityPkg/Library/DxeDeferImageLoadLib/DxeDeferImageLoadLib.inf\r
148   SecurityPkg/Library/DxeImageAuthenticationStatusLib/DxeImageAuthenticationStatusLib.inf\r
149 \r
150   #\r
151   # TPM\r
152   #\r
153   SecurityPkg/Library/DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.inf\r
154   SecurityPkg/Library/TpmCommLib/TpmCommLib.inf\r
155   SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf\r
156   SecurityPkg/Library/Tpm12CommandLib/Tpm12CommandLib.inf\r
157   SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf\r
158   SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf\r
159 \r
160   SecurityPkg/Tcg/PhysicalPresencePei/PhysicalPresencePei.inf\r
161   SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf\r
162 \r
163   #\r
164   # TPM2\r
165   #\r
166   SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.inf\r
167   SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf\r
168   SecurityPkg/Library/PeiTcg2PhysicalPresenceLib/PeiTcg2PhysicalPresenceLib.inf\r
169 \r
170   SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf\r
171   SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf\r
172 \r
173   SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf\r
174   SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
175   SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf\r
176   SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf\r
177   SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf\r
178   SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.inf\r
179 \r
180   SecurityPkg/Library/HashLibTpm2/HashLibTpm2.inf\r
181 \r
182   #\r
183   # TCG Storage.\r
184   #\r
185   SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCoreLib.inf\r
186   SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLib.inf\r
187 \r
188   #\r
189   # Other\r
190   #\r
191   SecurityPkg/Library/DxeRsa2048Sha256GuidedSectionExtractLib/DxeRsa2048Sha256GuidedSectionExtractLib.inf\r
192   SecurityPkg/Library/PeiRsa2048Sha256GuidedSectionExtractLib/PeiRsa2048Sha256GuidedSectionExtractLib.inf\r
193 \r
194   SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf\r
195   SecurityPkg/Library/FmpAuthenticationLibRsa2048Sha256/FmpAuthenticationLibRsa2048Sha256.inf\r
196 \r
197 [Components.IA32, Components.X64, Components.ARM, Components.AARCH64]\r
198   SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf\r
199 \r
200 [Components.IA32, Components.X64]\r
201   SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf\r
202 \r
203   #\r
204   # TPM\r
205   #\r
206   SecurityPkg/Tcg/TcgPei/TcgPei.inf\r
207   SecurityPkg/Tcg/TcgDxe/TcgDxe.inf\r
208   SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf {\r
209     <LibraryClasses>\r
210       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
211   }\r
212 \r
213   #\r
214   # TPM2\r
215   #\r
216   SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf\r
217   SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf\r
218   SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf\r
219   SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf\r
220 \r
221   SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf {\r
222     <LibraryClasses>\r
223       Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf\r
224       Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf\r
225   }\r
226   SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf {\r
227     <LibraryClasses>\r
228       Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.inf\r
229       NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf\r
230       NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf\r
231       NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf\r
232       NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf\r
233       NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf\r
234   }\r
235 \r
236   SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf {\r
237     <LibraryClasses>\r
238       Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf\r
239       NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf\r
240       NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf\r
241       NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf\r
242       NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf\r
243       NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf\r
244       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
245   }\r
246   SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf {\r
247     <LibraryClasses>\r
248       Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
249   }\r
250 \r
251   #\r
252   # Hash2\r
253   #\r
254   SecurityPkg/Hash2DxeCrypto/Hash2DxeCrypto.inf\r
255 \r
256   #\r
257   # PKCS7 Verification\r
258   #\r
259   SecurityPkg/Pkcs7Verify/Pkcs7VerifyDxe/Pkcs7VerifyDxe.inf\r
260 \r
261 [Components.IA32, Components.X64]\r
262 \r
263   SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.inf\r
264   SecurityPkg/Tcg/TcgSmm/TcgSmm.inf\r
265   SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf\r
266   SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.inf\r
267 \r
268   #\r
269   # Random Number Generator\r
270   #\r
271   SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf\r
272 \r
273   #\r
274   # Opal Password solution\r
275   #\r
276   SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordDxe.inf\r
277   SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.inf\r
278 \r
279 [BuildOptions]\r
280    MSFT:*_*_IA32_DLINK_FLAGS = /ALIGN:256\r
281   INTEL:*_*_IA32_DLINK_FLAGS = /ALIGN:256\r
282         *_*_*_CC_FLAGS       = -D DISABLE_NEW_DEPRECATED_INTERFACES\r
283 \r