From 4cf5e270e746af032aeef7f3bac2b676952342e3 Mon Sep 17 00:00:00 2001 From: zwei4 Date: Thu, 3 Aug 2017 17:10:08 +0800 Subject: Enable source level debug. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: zwei4 --- .../PlatformDsc/Components.IA32.dsc | 3 +++ .../BroxtonPlatformPkg/PlatformDsc/Components.dsc | 4 ++++ Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc | 5 +++++ .../PlatformDsc/LibraryClasses.DxeCore.dsc | 6 ++++++ .../PlatformDsc/LibraryClasses.DxeRuntimeDriver.dsc | 6 ++++++ .../PlatformDsc/LibraryClasses.DxeSmmDriver.dsc | 2 ++ .../PlatformDsc/LibraryClasses.IA32.PEI.dsc | 6 +++++- .../PlatformDsc/LibraryClasses.SmmCore.dsc | 5 +++++ .../BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc | 19 ++++++------------- .../PlatformDsc/PcdsFixedAtBuild.dsc | 8 +++++++- 10 files changed, 49 insertions(+), 15 deletions(-) (limited to 'Platform/BroxtonPlatformPkg/PlatformDsc') diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc index bfc45ff2ff..1341e082bf 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.IA32.dsc @@ -201,3 +201,6 @@ $(PLATFORM_PACKAGE_COMMON)/FpdtPei/FpdtPei.inf !endif +!if $(SOURCE_DEBUG_ENABLE) == TRUE + SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.inf +!endif \ No newline at end of file diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc index 234c27708d..04f616c367 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/Components.dsc @@ -32,6 +32,10 @@ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf } +!if $(SOURCE_DEBUG_ENABLE) == TRUE + SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxe.inf +!endif + UefiCpuPkg/CpuDxe/CpuDxe.inf { CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc index 842acf3085..69641ced3c 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/Defines.dsc @@ -163,3 +163,8 @@ DEFINE FSP_RAM_CODE_SIZE = $(FSP_IBBM_SIZE) DEFINE CAR_REGION_SIZE = 0x100000 +!if $(TARGET) == DEBUG + DEFINE SOURCE_DEBUG_ENABLE = TRUE +!else + DEFINE SOURCE_DEBUG_ENABLE = FALSE +!endif \ No newline at end of file diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeCore.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeCore.dsc index 5ae62d3dca..d60c900e78 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeCore.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeCore.dsc @@ -30,4 +30,10 @@ TimerLib|$(PLATFORM_PACKAGE_COMMON)/Library/PlatformTscTimerLib/DxeTscTimerLib.inf !endif !endif + +!if $(SOURCE_DEBUG_ENABLE) == TRUE + DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf +!else + DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf +!endif diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeRuntimeDriver.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeRuntimeDriver.dsc index 75c07b1513..9e13b6ff2e 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeRuntimeDriver.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeRuntimeDriver.dsc @@ -19,3 +19,9 @@ BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf !endif + !if $(SOURCE_DEBUG_ENABLE) == TRUE + DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf + !else + DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf + !endif + diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeSmmDriver.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeSmmDriver.dsc index 5a2feaaa38..643cbd0a5c 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeSmmDriver.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.DxeSmmDriver.dsc @@ -23,6 +23,8 @@ !if $(SOURCE_DEBUG_ENABLE) == TRUE DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf + !else + DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf !endif !if $(SECURE_BOOT_ENABLE) == TRUE diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc index 2b004019d0..d4617aa42e 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.IA32.PEI.dsc @@ -43,7 +43,11 @@ BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf SerialPortLib|$(PLATFORM_PACKAGE_COMMON)/Library/BaseSerialPortLib/BaseSerialPortLib.inf !if $(SOURCE_DEBUG_ENABLE) == TRUE - SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf + DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf + +!else + DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf + !endif DebugLib|$(PLATFORM_PACKAGE_COMMON)/Library/PeiDebugLib/PeiDebugLib.inf diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.SmmCore.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.SmmCore.dsc index f04345efdc..e9edfff3df 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.SmmCore.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.SmmCore.dsc @@ -27,3 +27,8 @@ PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf !endif + !if $(SOURCE_DEBUG_ENABLE) == TRUE + DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf + !else + DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf + !endif diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc index b3fb10a81f..a1023764e6 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/LibraryClasses.dsc @@ -22,7 +22,7 @@ UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf DxeSmmDriverEntryPoint|IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DxeSmmDriverEntryPoint.inf - PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf + !if $(SOURCE_DEBUG_ENABLE) == TRUE PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf @@ -30,6 +30,7 @@ !else PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf !endif + DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf # # Common @@ -187,8 +188,6 @@ SerialPortLib|$(PLATFORM_PACKAGE_COMMON)/Library/BaseSerialPortLib/BaseSerialPortLibNoInit.inf !endif - DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf - PchSerialIoUartLib|$(PLATFORM_SI_PACKAGE)/SouthCluster/Library/PeiDxeSmmPchSerialIoUartLib/PeiDxeSmmPchSerialIoUartLib.inf PchSerialIoLib|$(PLATFORM_SI_PACKAGE)/SouthCluster/Library/PeiDxeSmmPchSerialIoLib/PeiDxeSmmPchSerialIoLib.inf SerialPortParameterLib|$(PLATFORM_PACKAGE_COMMON)/Library/BaseSerialPortParameterLibCmos/BaseSerialPortParameterLibCmos.inf @@ -208,12 +207,10 @@ !endif TcgPpVendorLib|SecurityPkg/Library/TcgPpVendorLibNull/TcgPpVendorLibNull.inf - !if ($(FTPM_ENABLE) == TRUE) - Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf - PttPtpLib|$(PLATFORM_SI_PACKAGE)/Txe/Library/PeiDxePttPtpLib/PeiDxePttPtpLib.inf - Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf - !endif + Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf + Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf + PttPtpLib|$(PLATFORM_SI_PACKAGE)/Txe/Library/PeiDxePttPtpLib/PeiDxePttPtpLib.inf + Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -230,10 +227,6 @@ ScDxeRuntimePciLibPciExpress|$(PLATFORM_SI_PACKAGE)/SouthCluster/Library/DxeRuntimePciLibPciExpress/DxeRuntimePciLibPciExpress.inf TcgPhysicalPresenceLib|SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.inf - !if $(SOURCE_DEBUG_ENABLE) == TRUE - SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf - !endif - LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf EfiRegTableLib|$(PLATFORM_PACKAGE_COMMON)/Library/EfiRegTableLib/EfiRegTableLib.inf diff --git a/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc b/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc index de883285d1..793e285ae9 100644 --- a/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc +++ b/Platform/BroxtonPlatformPkg/PlatformDsc/PcdsFixedAtBuild.dsc @@ -1,7 +1,7 @@ ## @file # Platform Fixed At Build Pcd Description. # -# Copyright (c) 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -80,3 +80,9 @@ gClientCommonModuleTokenSpaceGuid.PcdStatusCodeFlagsCmosIndex|0x5C gEfiBxtTokenSpaceGuid.PcdPmcGcrBaseAddress|0xFE043000 + !if $(SOURCE_DEBUG_ENABLE) == TRUE + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17 + gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07 + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALSE + !endif + -- cgit v1.2.3