]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/OvmfPkgX64.dsc
OvmfPkg: reorganize TPM2 support in DSC/FDF files
[mirror_edk2.git] / OvmfPkg / OvmfPkgX64.dsc
index ba7a75884490e90f2655459a918c227f978f97cc..af40075e34b5d0ddb3ce775dd9a7f0f9e71803b0 100644 (file)
@@ -30,6 +30,7 @@
   #\r
   DEFINE SECURE_BOOT_ENABLE      = FALSE\r
   DEFINE SMM_REQUIRE             = FALSE\r
+  DEFINE SOURCE_DEBUG_ENABLE     = FALSE\r
   DEFINE TPM2_ENABLE             = FALSE\r
   DEFINE TPM2_CONFIG_ENABLE      = FALSE\r
 \r
   GCC:RELEASE_*_*_CC_FLAGS             = -DMDEPKG_NDEBUG\r
   INTEL:RELEASE_*_*_CC_FLAGS           = /D MDEPKG_NDEBUG\r
   MSFT:RELEASE_*_*_CC_FLAGS            = /D MDEPKG_NDEBUG\r
-!if $(TOOL_CHAIN_TAG) != "XCODE5"\r
+!if $(TOOL_CHAIN_TAG) != "XCODE5" && $(TOOL_CHAIN_TAG) != "CLANGPDB"\r
   GCC:*_*_*_CC_FLAGS                   = -mno-mmx -mno-sse\r
 !endif\r
-!ifdef $(SOURCE_DEBUG_ENABLE)\r
+!if $(SOURCE_DEBUG_ENABLE) == TRUE\r
   MSFT:*_*_X64_GENFW_FLAGS  = --keepexceptiontable\r
   GCC:*_*_X64_GENFW_FLAGS   = --keepexceptiontable\r
   INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable\r
 [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]\r
   GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000\r
   XCODE:*_*_*_DLINK_FLAGS =\r
+  CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096\r
 \r
 # Force PE/COFF sections to be aligned at 4KB boundaries to support page level\r
 # protection of DXE_SMM_DRIVER/SMM_CORE modules\r
 [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]\r
   GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000\r
   XCODE:*_*_*_DLINK_FLAGS =\r
+  CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096\r
 \r
 ################################################################################\r
 #\r
   CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf\r
   FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf\r
 \r
-!ifdef $(SOURCE_DEBUG_ENABLE)\r
+!if $(SOURCE_DEBUG_ENABLE) == TRUE\r
   PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf\r
   DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf\r
 !else\r
 !endif\r
   ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf\r
   ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf\r
-!ifdef $(SOURCE_DEBUG_ENABLE)\r
+!if $(SOURCE_DEBUG_ENABLE) == TRUE\r
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf\r
 !endif\r
   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf\r
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf\r
   ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf\r
   ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf\r
-!ifdef $(SOURCE_DEBUG_ENABLE)\r
+!if $(SOURCE_DEBUG_ENABLE) == TRUE\r
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf\r
 !endif\r
   CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf\r
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
 !endif\r
   ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf\r
-!ifdef $(SOURCE_DEBUG_ENABLE)\r
+!if $(SOURCE_DEBUG_ENABLE) == TRUE\r
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf\r
 !endif\r
   CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf\r
 !else\r
   LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf\r
 !endif\r
-!ifdef $(SOURCE_DEBUG_ENABLE)\r
+!if $(SOURCE_DEBUG_ENABLE) == TRUE\r
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf\r
 !endif\r
   PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf\r
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
 !endif\r
   CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf\r
-!ifdef $(SOURCE_DEBUG_ENABLE)\r
+!if $(SOURCE_DEBUG_ENABLE) == TRUE\r
   DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf\r
 !endif\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf\r
 !if $(SMM_REQUIRE) == TRUE\r
   gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|TRUE\r
   gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdEnableVariableRuntimeCache|FALSE\r
 !endif\r
 \r
 [PcdsFixedAtBuild]\r
   # DEBUG_ERROR     0x80000000  // Error\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F\r
 \r
-!ifdef $(SOURCE_DEBUG_ENABLE)\r
+!if $(SOURCE_DEBUG_ENABLE) == TRUE\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17\r
 !else\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F\r
   # never lets the RAM below 4 GB exceed 2816 MB.\r
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000\r
 \r
-!ifdef $(SOURCE_DEBUG_ENABLE)\r
+!if $(SOURCE_DEBUG_ENABLE) == TRUE\r
   gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2\r
 !endif\r
 \r
       NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf\r
       NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf\r
   }\r
-!if $(TPM2_CONFIG_ENABLE) == TRUE\r
-  SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf\r
-!endif\r
 !endif\r
 \r
   #\r
   }\r
 !endif\r
 \r
+  #\r
+  # TPM2 support\r
+  #\r
 !if $(TPM2_ENABLE) == TRUE\r
   SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf {\r
     <LibraryClasses>\r
       NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf\r
       NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf\r
   }\r
+!if $(TPM2_CONFIG_ENABLE) == TRUE\r
+  SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf\r
+!endif\r
 !endif\r