]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/SecurityPkg.dsc
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / SecurityPkg / SecurityPkg.dsc
index 7933ea6f24f319aa6dd97845aebd198869fd074b..3bad5375c01afe89a582aeab391411ff5f9ff816 100644 (file)
@@ -1,8 +1,10 @@
 ## @file\r
 #  Security Module Package for All Architectures.\r
 #\r
-# Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>\r
-# (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
+# Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.<BR>\r
+# (C) Copyright 2015-2020 Hewlett Packard Enterprise Development LP<BR>\r
+# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>\r
+# Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.<BR>\r
 # SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
 ##\r
   PLATFORM_VERSION               = 0.98\r
   DSC_SPECIFICATION              = 0x00010005\r
   OUTPUT_DIRECTORY               = Build/SecurityPkg\r
-  SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64\r
+  SUPPORTED_ARCHITECTURES        = IA32|X64|EBC|ARM|AARCH64|RISCV64|LOONGARCH64\r
   BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT\r
   SKUID_IDENTIFIER               = DEFAULT\r
 \r
+!include MdePkg/MdeLibs.dsc.inc\r
+\r
 [LibraryClasses]\r
   DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r
   DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf\r
@@ -44,8 +48,6 @@
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf\r
   UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf\r
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
-  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
-  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
   TpmCommLib|SecurityPkg/Library/TpmCommLib/TpmCommLib.inf\r
   PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf\r
   TcgStorageCoreLib|SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCoreLib.inf\r
   TcgStorageOpalLib|SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLib.inf\r
   ResetSystemLib|MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.inf\r
-\r
-[LibraryClasses.ARM]\r
+  TcgEventLogRecordLib|SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLogRecordLib.inf\r
+  MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf\r
+  SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.inf\r
+  PlatformPKProtectionLib|SecurityPkg/Library/PlatformPKProtectionLibVarPolicy/PlatformPKProtectionLibVarPolicy.inf\r
+  SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.inf\r
+  TdxLib|MdePkg/Library/TdxLib/TdxLib.inf\r
+\r
+[LibraryClasses.ARM, LibraryClasses.AARCH64]\r
   #\r
   # It is not possible to prevent the ARM compiler for generic intrinsic functions.\r
-  # This library provides the instrinsic functions generate by a given compiler.\r
+  # This library provides the intrinsic functions generate by a given compiler.\r
   # And NULL mean link this library into all ARM images.\r
   #\r
   NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf\r
   # Add support for GCC stack protector\r
   NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf\r
 \r
+  ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf\r
+\r
+  ArmTrngLib|MdePkg/Library/BaseArmTrngLibNull/BaseArmTrngLibNull.inf\r
+\r
+[LibraryClasses.ARM]\r
+  RngLib|MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf\r
+\r
+[LibraryClasses.RISCV64]\r
+  RngLib|MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf\r
+\r
+[LibraryClasses.X64.SEC]\r
+  HashLib|SecurityPkg/Library/HashLibTdx/HashLibTdx.inf\r
+  TpmMeasurementLib|SecurityPkg/Library/SecTpmMeasurementLib/SecTpmMeasurementLibTdx.inf\r
+\r
+[LibraryClasses.X64.DXE_DRIVER]\r
+  HashLib|SecurityPkg/Library/HashLibTdx/HashLibTdx.inf\r
+\r
 [LibraryClasses.common.PEIM]\r
   PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf\r
   PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf\r
   PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf\r
   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf\r
   MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf\r
+!ifdef CONTINUOUS_INTEGRATION\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf\r
+!else\r
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf\r
+!endif\r
   HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf\r
   ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf\r
   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf\r
   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf\r
   Tcg2PhysicalPresenceLib|SecurityPkg/Library/PeiTcg2PhysicalPresenceLib/PeiTcg2PhysicalPresenceLib.inf\r
+  TpmMeasurementLib|SecurityPkg/Library/PeiTpmMeasurementLib/PeiTpmMeasurementLib.inf\r
   RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf\r
 \r
 [LibraryClasses.common.DXE_DRIVER]\r
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
+!ifdef CONTINUOUS_INTEGRATION\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf\r
+!else\r
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
+!endif\r
   HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf\r
   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf\r
   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
 \r
 [LibraryClasses.common.DXE_RUNTIME_DRIVER]\r
   ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf\r
+!ifdef CONTINUOUS_INTEGRATION\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf\r
+!else\r
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf\r
+!endif\r
   HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf\r
   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf\r
   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
 \r
 [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION]\r
+!ifdef CONTINUOUS_INTEGRATION\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf\r
+!else\r
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
+!endif\r
   HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf\r
+  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf\r
   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
 \r
 [LibraryClasses.common.DXE_SMM_DRIVER]\r
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf\r
+  MmServicesTableLib|MdePkg/Library/MmServicesTableLib/MmServicesTableLib.inf\r
   MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf\r
   ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLib.inf\r
   SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf\r
+!ifdef CONTINUOUS_INTEGRATION\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf\r
+!else\r
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf\r
+!endif\r
   Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.inf\r
   Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
   Tcg2PhysicalPresenceLib|SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.inf\r
   SmmIoLib|MdePkg/Library/SmmIoLib/SmmIoLib.inf\r
 \r
+[LibraryClasses.common.MM_STANDALONE]\r
+  StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf\r
+  MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.inf\r
+  Tcg2PhysicalPresenceLib|SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/StandaloneMmTcg2PhysicalPresenceLib.inf\r
+  MemLib|StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf\r
+  HobLib|StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.inf\r
+  MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAllocationLib/StandaloneMmMemoryAllocationLib.inf\r
+\r
 [PcdsDynamicDefault.common.DEFAULT]\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0xb6, 0xe5, 0x01, 0x8b, 0x19, 0x4f, 0xe8, 0x46, 0xab, 0x93, 0x1c, 0x53, 0x67, 0x1b, 0x90, 0xcc}\r
   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2InitializationPolicy|1\r
   SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
   SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf\r
   SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf\r
+  SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmStandaloneMm.inf\r
   SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf\r
   SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.inf\r
 \r
   SecurityPkg/Library/HashLibTpm2/HashLibTpm2.inf\r
 \r
+  SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.inf\r
+  SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.inf\r
+\r
   #\r
   # TCG Storage.\r
   #\r
   SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCoreLib.inf\r
   SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLib.inf\r
 \r
+  #\r
+  # Variable Confidentiality & Integrity\r
+  #\r
+  SecurityPkg/Library/PlatformPKProtectionLibVarPolicy/PlatformPKProtectionLibVarPolicy.inf\r
+\r
   #\r
   # Other\r
   #\r
   SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf\r
   SecurityPkg/Library/FmpAuthenticationLibRsa2048Sha256/FmpAuthenticationLibRsa2048Sha256.inf\r
 \r
-  SecurityPkg/Library/DxeDeferImageLoadLib/DxeDeferImageLoadLib.inf\r
+  SecurityPkg/Library/PeiTpmMeasurementLib/PeiTpmMeasurementLib.inf\r
   SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf\r
   SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf\r
   SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.inf\r
   SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNull.inf\r
+  SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLogRecordLib.inf\r
 \r
 [Components.IA32, Components.X64, Components.ARM, Components.AARCH64]\r
   SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf\r
+  SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.inf\r
+  SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.inf\r
+  SecurityPkg/EnrollFromDefaultKeysApp/EnrollFromDefaultKeysApp.inf\r
+  SecurityPkg/VariableAuthenticated/SecureBootDefaultKeysDxe/SecureBootDefaultKeysDxe.inf\r
+\r
+[Components.IA32, Components.X64, Components.AARCH64, Components.ARM]\r
+  #\r
+  # Random Number Generator\r
+  #\r
+  SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf\r
+\r
+[Components.X64]\r
+  SecurityPkg/Library/HashLibTdx/HashLibTdx.inf\r
+  SecurityPkg/Library/SecTpmMeasurementLib/SecTpmMeasurementLibTdx.inf\r
+  SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.inf {\r
+    <LibraryClasses>\r
+      HashLib|SecurityPkg/Library/HashLibTdx/HashLibTdx.inf\r
+      NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf\r
+  }\r
 \r
 [Components.IA32, Components.X64]\r
   SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf\r
   SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf\r
   SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf\r
   SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf\r
+  SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf\r
 \r
   SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf {\r
     <LibraryClasses>\r
       NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf\r
       NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf\r
       NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf\r
+      NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf\r
+  }\r
+\r
+  SecurityPkg/Tcg/Tcg2PlatformPei/Tcg2PlatformPei.inf {\r
+    <LibraryClasses>\r
+      TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.inf\r
   }\r
 \r
   SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf {\r
       NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf\r
       NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf\r
       NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf\r
+      NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf\r
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
   }\r
   SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf {\r
       Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
   }\r
 \r
+  SecurityPkg/Tcg/Tcg2PlatformDxe/Tcg2PlatformDxe.inf {\r
+    <LibraryClasses>\r
+      TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.inf\r
+  }\r
+\r
   #\r
   # Hash2\r
   #\r
   SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLockSmm.inf\r
   SecurityPkg/Tcg/TcgSmm/TcgSmm.inf\r
   SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf\r
+  SecurityPkg/Tcg/Tcg2Smm/Tcg2StandaloneMm.inf\r
+  SecurityPkg/Tcg/Tcg2Smm/Tcg2MmDependencyDxe.inf\r
+  SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.inf\r
   SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.inf\r
-\r
-  #\r
-  # Random Number Generator\r
-  #\r
-  SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf\r
+  SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/StandaloneMmTcg2PhysicalPresenceLib.inf\r
 \r
   #\r
   # Opal Password solution\r
    MSFT:*_*_IA32_DLINK_FLAGS = /ALIGN:256\r
   INTEL:*_*_IA32_DLINK_FLAGS = /ALIGN:256\r
         *_*_*_CC_FLAGS       = -D DISABLE_NEW_DEPRECATED_INTERFACES\r
-\r