summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzwei4 <david.wei@intel.com>2016-04-16 09:37:44 +0800
committerzwei4 <david.wei@intel.com>2016-04-16 09:37:44 +0800
commit86f28a8ebb3481e7726401406e38b87165b2708e (patch)
tree18c15f22588459326a1e4b56c89e1c17792df9f1
parentcd1fa3ef3e66618f5ee08f839ab04f49553c89f1 (diff)
downloadedk2-platforms-86f28a8ebb3481e7726401406e38b87165b2708e.tar.xz
Add SMM_DEBUG_ENABLE to control the usage of source level debug of SMM code.
Signed-off-by: Tim He <tim.he@intel.com>
-rw-r--r--Vlv2TbltDevicePkg/PlatformPkg.fdf4
-rw-r--r--Vlv2TbltDevicePkg/PlatformPkgConfig.dsc8
-rw-r--r--Vlv2TbltDevicePkg/PlatformPkgIA32.dsc21
-rw-r--r--Vlv2TbltDevicePkg/PlatformPkgX64.dsc7
4 files changed, 26 insertions, 14 deletions
diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf b/Vlv2TbltDevicePkg/PlatformPkg.fdf
index e40dcd448d..143164a0d6 100644
--- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -545,17 +545,15 @@ INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET
#
INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
-
!if $(SOURCE_DEBUG_ENABLE) == TRUE
!if $(SMM_SOURCE_DEBUG_ENABLE) == FALSE
INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)RELEASE/$(DXE_ARCHITECTURE)/PiSmmCpuDxeSmm.inf
!else
-INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PiSmmCpuDxeSmm.inf
+ INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PiSmmCpuDxeSmm.inf
!endif
!else
INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PiSmmCpuDxeSmm.inf
!endif
-
INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
INF MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
INF RuleOverride = BINARY $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PiSmmCommunicationSmm.inf
diff --git a/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc b/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
index a387235761..0d3d67b743 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
@@ -92,10 +92,10 @@ DEFINE ESRT_ENABLE = TRUE
# Enable source level debug default
#
!if $(TARGET) == RELEASE
-DEFINE SOURCE_DEBUG_ENABLE = FALSE
-DEFINE SMM_SOURCE_DEBUG_ENABLE = FALSE
+ DEFINE SOURCE_DEBUG_ENABLE = FALSE
+ DEFINE SMM_SOURCE_DEBUG_ENABLE = FALSE
!else
-DEFINE SOURCE_DEBUG_ENABLE = TRUE
-DEFINE SMM_SOURCE_DEBUG_ENABLE = FALSE
+ DEFINE SOURCE_DEBUG_ENABLE = TRUE
+ DEFINE SMM_SOURCE_DEBUG_ENABLE = FALSE
!endif
diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index f533a9a84e..cb0aae34af 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -336,8 +336,15 @@
LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
+ PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
+ DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
+ SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
+ DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
+!else
PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
+!endif
!if $(MINNOW2_FSP_BUILD) == TRUE
PlatformFspLib|Vlv2TbltDevicePkg/Library/PlatformFspLib/PlatformFspLib.inf
@@ -1338,15 +1345,15 @@ $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/fTPMInitPeim.inf
#
MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
- !if $(SOURCE_DEBUG_ENABLE) == TRUE
- !if $(SMM_SOURCE_DEBUG_ENABLE) == FALSE
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
+!if $(SMM_SOURCE_DEBUG_ENABLE) == FALSE
$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)RELEASE/$(DXE_ARCHITECTURE)/PiSmmCpuDxeSmm.inf
- !else
- $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PiSmmCpuDxeSmm.inf
- !endif
- !else
+!else
$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PiSmmCpuDxeSmm.inf
- !endif
+!endif
+!else
+ $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PiSmmCpuDxeSmm.inf
+!endif
UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/PiSmmCommunicationSmm.inf
diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 7c9d72cf9c..3432a1356a 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -336,8 +336,15 @@
LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
+ PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
+ DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
+ SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
+ DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
+!else
PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
+!endif
!if $(MINNOW2_FSP_BUILD) == TRUE
PlatformFspLib|Vlv2TbltDevicePkg/Library/PlatformFspLib/PlatformFspLib.inf