* [PATCH v2] OvmfPkg: Make SOURCE_DEBUG_ENABLE actually need to be set to TRUE
@ 2019-10-21 20:13 Laszlo Ersek
2019-10-22 0:59 ` Jordan Justen
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Laszlo Ersek @ 2019-10-21 20:13 UTC (permalink / raw)
To: edk2-devel-groups-io
Cc: Andrew Fish, Anthony Perard, Ard Biesheuvel, Jordan Justen,
Julien Grall, Leif Lindholm, Michael Kinney, Peter Jones
From: Peter Jones <pjones@redhat.com>
Currently some tests check the value of SOURCE_DEBUG_ENABLE, and some
tests check if it's defined or not. Additionally, in UefiPayloadPkg as
well as some other trees, we define it as FALSE in the .dsc file.
This patch changes all of the Ovmf platforms to explicitly define it as
FALSE by default, and changes all of the checks to test if the value is
TRUE.
Signed-off-by: Peter Jones <pjones@redhat.com>
Message-Id: <20190920184507.909884-1-pjones@redhat.com>
[lersek@redhat.com: drop Contributed-under line, per TianoCore BZ#1373]
[lersek@redhat.com: replace "!= TRUE" with more idiomatic "== FALSE"]
Cc: Andrew Fish <afish@apple.com>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Julien Grall <julien.grall@arm.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Peter Jones <pjones@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
Notes:
v2:
- repo: https://github.com/lersek/edk2.git
branch: src_dbg_true_v2
- repost the patch in Peter's stead, with the updates requested at
<http://mid.mail-archive.com/9c6d70b5-fcd6-373f-973f-044d1338e47b@redhat.com>
- per discussion with the other stewards, it's OK to explicitly resubmit
the patch (noting the original authorship) with the Contributed-under
line removed
OvmfPkg/OvmfPkgIa32.dsc | 17 +++++++++--------
OvmfPkg/OvmfPkgIa32X64.dsc | 19 ++++++++++---------
OvmfPkg/OvmfPkgX64.dsc | 19 ++++++++++---------
OvmfPkg/OvmfXen.dsc | 17 +++++++++--------
OvmfPkg/OvmfPkgIa32.fdf | 2 +-
OvmfPkg/OvmfPkgIa32X64.fdf | 2 +-
OvmfPkg/OvmfPkgX64.fdf | 2 +-
OvmfPkg/OvmfXen.fdf | 2 +-
8 files changed, 42 insertions(+), 38 deletions(-)
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 66e944436a69..4301e7821902 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -30,6 +30,7 @@ [Defines]
#
DEFINE SECURE_BOOT_ENABLE = FALSE
DEFINE SMM_REQUIRE = FALSE
+ DEFINE SOURCE_DEBUG_ENABLE = FALSE
DEFINE TPM2_ENABLE = FALSE
DEFINE TPM2_CONFIG_ENABLE = FALSE
@@ -157,7 +158,7 @@ [LibraryClasses]
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
!else
@@ -225,7 +226,7 @@ [LibraryClasses.common.SEC]
!endif
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
!endif
HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
@@ -267,7 +268,7 @@ [LibraryClasses.common.PEIM]
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
!endif
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
@@ -292,7 +293,7 @@ [LibraryClasses.common.DXE_CORE]
DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
!endif
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
!endif
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
@@ -351,7 +352,7 @@ [LibraryClasses.common.DXE_DRIVER]
!else
LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
!endif
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
!endif
PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
@@ -389,7 +390,7 @@ [LibraryClasses.common.DXE_SMM_DRIVER]
DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
!endif
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
!endif
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
@@ -481,7 +482,7 @@ [PcdsFixedAtBuild]
# DEBUG_ERROR 0x80000000 // Error
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
!else
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
@@ -495,7 +496,7 @@ [PcdsFixedAtBuild]
# never lets the RAM below 4 GB exceed 2816 MB.
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
!endif
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index 51c2bfb44f14..803fd74ae8e4 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -30,6 +30,7 @@ [Defines]
#
DEFINE SECURE_BOOT_ENABLE = FALSE
DEFINE SMM_REQUIRE = FALSE
+ DEFINE SOURCE_DEBUG_ENABLE = FALSE
DEFINE TPM2_ENABLE = FALSE
DEFINE TPM2_CONFIG_ENABLE = FALSE
@@ -69,7 +70,7 @@ [BuildOptions]
!if $(TOOL_CHAIN_TAG) != "XCODE5"
GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse
!endif
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
MSFT:*_*_X64_GENFW_FLAGS = --keepexceptiontable
GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
@@ -162,7 +163,7 @@ [LibraryClasses]
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
!else
@@ -230,7 +231,7 @@ [LibraryClasses.common.SEC]
!endif
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
!endif
HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
@@ -272,7 +273,7 @@ [LibraryClasses.common.PEIM]
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
!endif
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
@@ -297,7 +298,7 @@ [LibraryClasses.common.DXE_CORE]
DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
!endif
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
!endif
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
@@ -356,7 +357,7 @@ [LibraryClasses.common.DXE_DRIVER]
!else
LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
!endif
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
!endif
PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
@@ -394,7 +395,7 @@ [LibraryClasses.common.DXE_SMM_DRIVER]
DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
!endif
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
!endif
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
@@ -486,7 +487,7 @@ [PcdsFixedAtBuild]
# DEBUG_ERROR 0x80000000 // Error
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
!else
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
@@ -500,7 +501,7 @@ [PcdsFixedAtBuild]
# never lets the RAM below 4 GB exceed 2816 MB.
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
!endif
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index ba7a75884490..5dbd1b793a90 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -30,6 +30,7 @@ [Defines]
#
DEFINE SECURE_BOOT_ENABLE = FALSE
DEFINE SMM_REQUIRE = FALSE
+ DEFINE SOURCE_DEBUG_ENABLE = FALSE
DEFINE TPM2_ENABLE = FALSE
DEFINE TPM2_CONFIG_ENABLE = FALSE
@@ -69,7 +70,7 @@ [BuildOptions]
!if $(TOOL_CHAIN_TAG) != "XCODE5"
GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse
!endif
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
MSFT:*_*_X64_GENFW_FLAGS = --keepexceptiontable
GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
@@ -162,7 +163,7 @@ [LibraryClasses]
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
!else
@@ -230,7 +231,7 @@ [LibraryClasses.common.SEC]
!endif
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
!endif
HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
@@ -272,7 +273,7 @@ [LibraryClasses.common.PEIM]
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
!endif
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
@@ -297,7 +298,7 @@ [LibraryClasses.common.DXE_CORE]
DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
!endif
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
!endif
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
@@ -356,7 +357,7 @@ [LibraryClasses.common.DXE_DRIVER]
!else
LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
!endif
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
!endif
PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
@@ -394,7 +395,7 @@ [LibraryClasses.common.DXE_SMM_DRIVER]
DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
!endif
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
!endif
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
@@ -486,7 +487,7 @@ [PcdsFixedAtBuild]
# DEBUG_ERROR 0x80000000 // Error
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
!else
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
@@ -500,7 +501,7 @@ [PcdsFixedAtBuild]
# never lets the RAM below 4 GB exceed 2816 MB.
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
!endif
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
index 5a31f75f05d0..8c11efe9b709 100644
--- a/OvmfPkg/OvmfXen.dsc
+++ b/OvmfPkg/OvmfXen.dsc
@@ -29,6 +29,7 @@ [Defines]
# Defines for default states. These can be changed on the command line.
# -D FLAG=VALUE
#
+ DEFINE SOURCE_DEBUG_ENABLE = FALSE
#
# Network definition
@@ -66,7 +67,7 @@ [BuildOptions]
!if $(TOOL_CHAIN_TAG) != "XCODE5"
GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse
!endif
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
MSFT:*_*_X64_GENFW_FLAGS = --keepexceptiontable
GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
@@ -156,7 +157,7 @@ [LibraryClasses]
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
!else
@@ -213,7 +214,7 @@ [LibraryClasses.common.SEC]
!endif
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
!endif
HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
@@ -255,7 +256,7 @@ [LibraryClasses.common.PEIM]
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
!endif
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
@@ -275,7 +276,7 @@ [LibraryClasses.common.DXE_CORE]
DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
!endif
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
!endif
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
@@ -327,7 +328,7 @@ [LibraryClasses.common.DXE_DRIVER]
QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
!endif
PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
@@ -412,7 +413,7 @@ [PcdsFixedAtBuild]
# DEBUG_ERROR 0x80000000 // Error
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
!else
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
@@ -426,7 +427,7 @@ [PcdsFixedAtBuild]
# never lets the RAM below 4 GB exceed 2816 MB.
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000
-!ifdef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == TRUE
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
!endif
diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
index 785affeb90c8..586bbff08585 100644
--- a/OvmfPkg/OvmfPkgIa32.fdf
+++ b/OvmfPkg/OvmfPkgIa32.fdf
@@ -260,7 +260,7 @@ [FV.DXEFV]
INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
INF OvmfPkg/SioBusDxe/SioBusDxe.inf
-!ifndef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == FALSE
INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
!endif
INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
index 74407072563b..e49adc425fce 100644
--- a/OvmfPkg/OvmfPkgIa32X64.fdf
+++ b/OvmfPkg/OvmfPkgIa32X64.fdf
@@ -261,7 +261,7 @@ [FV.DXEFV]
INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
INF OvmfPkg/SioBusDxe/SioBusDxe.inf
-!ifndef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == FALSE
INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
!endif
INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
index 74407072563b..e49adc425fce 100644
--- a/OvmfPkg/OvmfPkgX64.fdf
+++ b/OvmfPkg/OvmfPkgX64.fdf
@@ -261,7 +261,7 @@ [FV.DXEFV]
INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
INF OvmfPkg/SioBusDxe/SioBusDxe.inf
-!ifndef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == FALSE
INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
!endif
INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
diff --git a/OvmfPkg/OvmfXen.fdf b/OvmfPkg/OvmfXen.fdf
index e6e9e184ef04..05138ffc5b4f 100644
--- a/OvmfPkg/OvmfXen.fdf
+++ b/OvmfPkg/OvmfXen.fdf
@@ -343,7 +343,7 @@ [FV.DXEFV]
INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
INF OvmfPkg/SioBusDxe/SioBusDxe.inf
-!ifndef $(SOURCE_DEBUG_ENABLE)
+!if $(SOURCE_DEBUG_ENABLE) == FALSE
INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
!endif
INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
--
2.19.1.3.g30247aa5d201
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] OvmfPkg: Make SOURCE_DEBUG_ENABLE actually need to be set to TRUE
2019-10-21 20:13 [PATCH v2] OvmfPkg: Make SOURCE_DEBUG_ENABLE actually need to be set to TRUE Laszlo Ersek
@ 2019-10-22 0:59 ` Jordan Justen
2019-10-22 9:50 ` Anthony PERARD
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jordan Justen @ 2019-10-22 0:59 UTC (permalink / raw)
To: Laszlo Ersek, edk2-devel-groups-io
Cc: Andrew Fish, Anthony Perard, Ard Biesheuvel, Julien Grall,
Leif Lindholm, Michael Kinney, Peter Jones
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
On 2019-10-21 13:13:20, Laszlo Ersek wrote:
> From: Peter Jones <pjones@redhat.com>
>
> Currently some tests check the value of SOURCE_DEBUG_ENABLE, and some
> tests check if it's defined or not. Additionally, in UefiPayloadPkg as
> well as some other trees, we define it as FALSE in the .dsc file.
>
> This patch changes all of the Ovmf platforms to explicitly define it as
> FALSE by default, and changes all of the checks to test if the value is
> TRUE.
>
> Signed-off-by: Peter Jones <pjones@redhat.com>
> Message-Id: <20190920184507.909884-1-pjones@redhat.com>
> [lersek@redhat.com: drop Contributed-under line, per TianoCore BZ#1373]
> [lersek@redhat.com: replace "!= TRUE" with more idiomatic "== FALSE"]
> Cc: Andrew Fish <afish@apple.com>
> Cc: Anthony Perard <anthony.perard@citrix.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Julien Grall <julien.grall@arm.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Michael Kinney <michael.d.kinney@intel.com>
> Cc: Peter Jones <pjones@redhat.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>
> Notes:
> v2:
>
> - repo: https://github.com/lersek/edk2.git
> branch: src_dbg_true_v2
>
> - repost the patch in Peter's stead, with the updates requested at
> <http://mid.mail-archive.com/9c6d70b5-fcd6-373f-973f-044d1338e47b@redhat.com>
>
> - per discussion with the other stewards, it's OK to explicitly resubmit
> the patch (noting the original authorship) with the Contributed-under
> line removed
>
> OvmfPkg/OvmfPkgIa32.dsc | 17 +++++++++--------
> OvmfPkg/OvmfPkgIa32X64.dsc | 19 ++++++++++---------
> OvmfPkg/OvmfPkgX64.dsc | 19 ++++++++++---------
> OvmfPkg/OvmfXen.dsc | 17 +++++++++--------
> OvmfPkg/OvmfPkgIa32.fdf | 2 +-
> OvmfPkg/OvmfPkgIa32X64.fdf | 2 +-
> OvmfPkg/OvmfPkgX64.fdf | 2 +-
> OvmfPkg/OvmfXen.fdf | 2 +-
> 8 files changed, 42 insertions(+), 38 deletions(-)
>
> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> index 66e944436a69..4301e7821902 100644
> --- a/OvmfPkg/OvmfPkgIa32.dsc
> +++ b/OvmfPkg/OvmfPkgIa32.dsc
> @@ -30,6 +30,7 @@ [Defines]
> #
> DEFINE SECURE_BOOT_ENABLE = FALSE
> DEFINE SMM_REQUIRE = FALSE
> + DEFINE SOURCE_DEBUG_ENABLE = FALSE
> DEFINE TPM2_ENABLE = FALSE
> DEFINE TPM2_CONFIG_ENABLE = FALSE
>
> @@ -157,7 +158,7 @@ [LibraryClasses]
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
> DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
> !else
> @@ -225,7 +226,7 @@ [LibraryClasses.common.SEC]
> !endif
> ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> @@ -267,7 +268,7 @@ [LibraryClasses.common.PEIM]
> PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
> @@ -292,7 +293,7 @@ [LibraryClasses.common.DXE_CORE]
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> !endif
> ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
> @@ -351,7 +352,7 @@ [LibraryClasses.common.DXE_DRIVER]
> !else
> LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
> !endif
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
> @@ -389,7 +390,7 @@ [LibraryClasses.common.DXE_SMM_DRIVER]
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
> !endif
> BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
> @@ -481,7 +482,7 @@ [PcdsFixedAtBuild]
> # DEBUG_ERROR 0x80000000 // Error
> gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
> !else
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
> @@ -495,7 +496,7 @@ [PcdsFixedAtBuild]
> # never lets the RAM below 4 GB exceed 2816 MB.
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
> !endif
>
> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
> index 51c2bfb44f14..803fd74ae8e4 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.dsc
> +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
> @@ -30,6 +30,7 @@ [Defines]
> #
> DEFINE SECURE_BOOT_ENABLE = FALSE
> DEFINE SMM_REQUIRE = FALSE
> + DEFINE SOURCE_DEBUG_ENABLE = FALSE
> DEFINE TPM2_ENABLE = FALSE
> DEFINE TPM2_CONFIG_ENABLE = FALSE
>
> @@ -69,7 +70,7 @@ [BuildOptions]
> !if $(TOOL_CHAIN_TAG) != "XCODE5"
> GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse
> !endif
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> MSFT:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> @@ -162,7 +163,7 @@ [LibraryClasses]
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
> DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
> !else
> @@ -230,7 +231,7 @@ [LibraryClasses.common.SEC]
> !endif
> ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> @@ -272,7 +273,7 @@ [LibraryClasses.common.PEIM]
> PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
> @@ -297,7 +298,7 @@ [LibraryClasses.common.DXE_CORE]
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> !endif
> ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
> @@ -356,7 +357,7 @@ [LibraryClasses.common.DXE_DRIVER]
> !else
> LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
> !endif
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
> @@ -394,7 +395,7 @@ [LibraryClasses.common.DXE_SMM_DRIVER]
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
> !endif
> BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
> @@ -486,7 +487,7 @@ [PcdsFixedAtBuild]
> # DEBUG_ERROR 0x80000000 // Error
> gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
> !else
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
> @@ -500,7 +501,7 @@ [PcdsFixedAtBuild]
> # never lets the RAM below 4 GB exceed 2816 MB.
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
> !endif
>
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index ba7a75884490..5dbd1b793a90 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -30,6 +30,7 @@ [Defines]
> #
> DEFINE SECURE_BOOT_ENABLE = FALSE
> DEFINE SMM_REQUIRE = FALSE
> + DEFINE SOURCE_DEBUG_ENABLE = FALSE
> DEFINE TPM2_ENABLE = FALSE
> DEFINE TPM2_CONFIG_ENABLE = FALSE
>
> @@ -69,7 +70,7 @@ [BuildOptions]
> !if $(TOOL_CHAIN_TAG) != "XCODE5"
> GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse
> !endif
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> MSFT:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> @@ -162,7 +163,7 @@ [LibraryClasses]
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
> DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
> !else
> @@ -230,7 +231,7 @@ [LibraryClasses.common.SEC]
> !endif
> ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> @@ -272,7 +273,7 @@ [LibraryClasses.common.PEIM]
> PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
> @@ -297,7 +298,7 @@ [LibraryClasses.common.DXE_CORE]
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> !endif
> ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
> @@ -356,7 +357,7 @@ [LibraryClasses.common.DXE_DRIVER]
> !else
> LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
> !endif
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
> @@ -394,7 +395,7 @@ [LibraryClasses.common.DXE_SMM_DRIVER]
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
> !endif
> BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
> @@ -486,7 +487,7 @@ [PcdsFixedAtBuild]
> # DEBUG_ERROR 0x80000000 // Error
> gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
> !else
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
> @@ -500,7 +501,7 @@ [PcdsFixedAtBuild]
> # never lets the RAM below 4 GB exceed 2816 MB.
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
> !endif
>
> diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
> index 5a31f75f05d0..8c11efe9b709 100644
> --- a/OvmfPkg/OvmfXen.dsc
> +++ b/OvmfPkg/OvmfXen.dsc
> @@ -29,6 +29,7 @@ [Defines]
> # Defines for default states. These can be changed on the command line.
> # -D FLAG=VALUE
> #
> + DEFINE SOURCE_DEBUG_ENABLE = FALSE
>
> #
> # Network definition
> @@ -66,7 +67,7 @@ [BuildOptions]
> !if $(TOOL_CHAIN_TAG) != "XCODE5"
> GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse
> !endif
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> MSFT:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> @@ -156,7 +157,7 @@ [LibraryClasses]
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
> DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
> !else
> @@ -213,7 +214,7 @@ [LibraryClasses.common.SEC]
> !endif
> ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> @@ -255,7 +256,7 @@ [LibraryClasses.common.PEIM]
> PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
> @@ -275,7 +276,7 @@ [LibraryClasses.common.DXE_CORE]
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> !endif
> ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
> @@ -327,7 +328,7 @@ [LibraryClasses.common.DXE_DRIVER]
> QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
> LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
> @@ -412,7 +413,7 @@ [PcdsFixedAtBuild]
> # DEBUG_ERROR 0x80000000 // Error
> gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
> !else
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
> @@ -426,7 +427,7 @@ [PcdsFixedAtBuild]
> # never lets the RAM below 4 GB exceed 2816 MB.
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
> !endif
>
> diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
> index 785affeb90c8..586bbff08585 100644
> --- a/OvmfPkg/OvmfPkgIa32.fdf
> +++ b/OvmfPkg/OvmfPkgIa32.fdf
> @@ -260,7 +260,7 @@ [FV.DXEFV]
> INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
>
> INF OvmfPkg/SioBusDxe/SioBusDxe.inf
> -!ifndef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == FALSE
> INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
> !endif
> INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
> diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
> index 74407072563b..e49adc425fce 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.fdf
> +++ b/OvmfPkg/OvmfPkgIa32X64.fdf
> @@ -261,7 +261,7 @@ [FV.DXEFV]
> INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
>
> INF OvmfPkg/SioBusDxe/SioBusDxe.inf
> -!ifndef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == FALSE
> INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
> !endif
> INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
> diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
> index 74407072563b..e49adc425fce 100644
> --- a/OvmfPkg/OvmfPkgX64.fdf
> +++ b/OvmfPkg/OvmfPkgX64.fdf
> @@ -261,7 +261,7 @@ [FV.DXEFV]
> INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
>
> INF OvmfPkg/SioBusDxe/SioBusDxe.inf
> -!ifndef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == FALSE
> INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
> !endif
> INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
> diff --git a/OvmfPkg/OvmfXen.fdf b/OvmfPkg/OvmfXen.fdf
> index e6e9e184ef04..05138ffc5b4f 100644
> --- a/OvmfPkg/OvmfXen.fdf
> +++ b/OvmfPkg/OvmfXen.fdf
> @@ -343,7 +343,7 @@ [FV.DXEFV]
> INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
>
> INF OvmfPkg/SioBusDxe/SioBusDxe.inf
> -!ifndef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == FALSE
> INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
> !endif
> INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
> --
> 2.19.1.3.g30247aa5d201
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] OvmfPkg: Make SOURCE_DEBUG_ENABLE actually need to be set to TRUE
2019-10-21 20:13 [PATCH v2] OvmfPkg: Make SOURCE_DEBUG_ENABLE actually need to be set to TRUE Laszlo Ersek
2019-10-22 0:59 ` Jordan Justen
@ 2019-10-22 9:50 ` Anthony PERARD
2019-10-22 10:03 ` [edk2-devel] " Philippe Mathieu-Daudé
2019-10-22 18:32 ` Laszlo Ersek
3 siblings, 0 replies; 5+ messages in thread
From: Anthony PERARD @ 2019-10-22 9:50 UTC (permalink / raw)
To: Laszlo Ersek
Cc: edk2-devel-groups-io, Andrew Fish, Ard Biesheuvel, Jordan Justen,
Julien Grall, Leif Lindholm, Michael Kinney, Peter Jones
On Mon, Oct 21, 2019 at 10:13:20PM +0200, Laszlo Ersek wrote:
> From: Peter Jones <pjones@redhat.com>
>
> Currently some tests check the value of SOURCE_DEBUG_ENABLE, and some
> tests check if it's defined or not. Additionally, in UefiPayloadPkg as
> well as some other trees, we define it as FALSE in the .dsc file.
>
> This patch changes all of the Ovmf platforms to explicitly define it as
> FALSE by default, and changes all of the checks to test if the value is
> TRUE.
>
> Signed-off-by: Peter Jones <pjones@redhat.com>
> Message-Id: <20190920184507.909884-1-pjones@redhat.com>
> [lersek@redhat.com: drop Contributed-under line, per TianoCore BZ#1373]
> [lersek@redhat.com: replace "!= TRUE" with more idiomatic "== FALSE"]
> Cc: Andrew Fish <afish@apple.com>
> Cc: Anthony Perard <anthony.perard@citrix.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Julien Grall <julien.grall@arm.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Michael Kinney <michael.d.kinney@intel.com>
> Cc: Peter Jones <pjones@redhat.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH v2] OvmfPkg: Make SOURCE_DEBUG_ENABLE actually need to be set to TRUE
2019-10-21 20:13 [PATCH v2] OvmfPkg: Make SOURCE_DEBUG_ENABLE actually need to be set to TRUE Laszlo Ersek
2019-10-22 0:59 ` Jordan Justen
2019-10-22 9:50 ` Anthony PERARD
@ 2019-10-22 10:03 ` Philippe Mathieu-Daudé
2019-10-22 18:32 ` Laszlo Ersek
3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-10-22 10:03 UTC (permalink / raw)
To: devel, lersek
Cc: Andrew Fish, Anthony Perard, Ard Biesheuvel, Jordan Justen,
Julien Grall, Leif Lindholm, Michael Kinney, Peter Jones
On 10/21/19 10:13 PM, Laszlo Ersek wrote:
> From: Peter Jones <pjones@redhat.com>
>
> Currently some tests check the value of SOURCE_DEBUG_ENABLE, and some
> tests check if it's defined or not. Additionally, in UefiPayloadPkg as
> well as some other trees, we define it as FALSE in the .dsc file.
>
> This patch changes all of the Ovmf platforms to explicitly define it as
> FALSE by default, and changes all of the checks to test if the value is
> TRUE.
>
> Signed-off-by: Peter Jones <pjones@redhat.com>
> Message-Id: <20190920184507.909884-1-pjones@redhat.com>
> [lersek@redhat.com: drop Contributed-under line, per TianoCore BZ#1373]
> [lersek@redhat.com: replace "!= TRUE" with more idiomatic "== FALSE"]
> Cc: Andrew Fish <afish@apple.com>
> Cc: Anthony Perard <anthony.perard@citrix.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Julien Grall <julien.grall@arm.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Michael Kinney <michael.d.kinney@intel.com>
> Cc: Peter Jones <pjones@redhat.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>
> Notes:
> v2:
>
> - repo: https://github.com/lersek/edk2.git
> branch: src_dbg_true_v2
>
> - repost the patch in Peter's stead, with the updates requested at
> <http://mid.mail-archive.com/9c6d70b5-fcd6-373f-973f-044d1338e47b@redhat.com>
>
> - per discussion with the other stewards, it's OK to explicitly resubmit
> the patch (noting the original authorship) with the Contributed-under
> line removed
>
> OvmfPkg/OvmfPkgIa32.dsc | 17 +++++++++--------
> OvmfPkg/OvmfPkgIa32X64.dsc | 19 ++++++++++---------
> OvmfPkg/OvmfPkgX64.dsc | 19 ++++++++++---------
> OvmfPkg/OvmfXen.dsc | 17 +++++++++--------
> OvmfPkg/OvmfPkgIa32.fdf | 2 +-
> OvmfPkg/OvmfPkgIa32X64.fdf | 2 +-
> OvmfPkg/OvmfPkgX64.fdf | 2 +-
> OvmfPkg/OvmfXen.fdf | 2 +-
> 8 files changed, 42 insertions(+), 38 deletions(-)
>
> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> index 66e944436a69..4301e7821902 100644
> --- a/OvmfPkg/OvmfPkgIa32.dsc
> +++ b/OvmfPkg/OvmfPkgIa32.dsc
> @@ -30,6 +30,7 @@ [Defines]
> #
> DEFINE SECURE_BOOT_ENABLE = FALSE
> DEFINE SMM_REQUIRE = FALSE
> + DEFINE SOURCE_DEBUG_ENABLE = FALSE
> DEFINE TPM2_ENABLE = FALSE
> DEFINE TPM2_CONFIG_ENABLE = FALSE
>
> @@ -157,7 +158,7 @@ [LibraryClasses]
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
> DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
> !else
> @@ -225,7 +226,7 @@ [LibraryClasses.common.SEC]
> !endif
> ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> @@ -267,7 +268,7 @@ [LibraryClasses.common.PEIM]
> PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
> @@ -292,7 +293,7 @@ [LibraryClasses.common.DXE_CORE]
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> !endif
> ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
> @@ -351,7 +352,7 @@ [LibraryClasses.common.DXE_DRIVER]
> !else
> LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
> !endif
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
> @@ -389,7 +390,7 @@ [LibraryClasses.common.DXE_SMM_DRIVER]
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
> !endif
> BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
> @@ -481,7 +482,7 @@ [PcdsFixedAtBuild]
> # DEBUG_ERROR 0x80000000 // Error
> gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
> !else
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
> @@ -495,7 +496,7 @@ [PcdsFixedAtBuild]
> # never lets the RAM below 4 GB exceed 2816 MB.
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
> !endif
>
> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
> index 51c2bfb44f14..803fd74ae8e4 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.dsc
> +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
> @@ -30,6 +30,7 @@ [Defines]
> #
> DEFINE SECURE_BOOT_ENABLE = FALSE
> DEFINE SMM_REQUIRE = FALSE
> + DEFINE SOURCE_DEBUG_ENABLE = FALSE
> DEFINE TPM2_ENABLE = FALSE
> DEFINE TPM2_CONFIG_ENABLE = FALSE
>
> @@ -69,7 +70,7 @@ [BuildOptions]
> !if $(TOOL_CHAIN_TAG) != "XCODE5"
> GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse
> !endif
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> MSFT:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> @@ -162,7 +163,7 @@ [LibraryClasses]
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
> DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
> !else
> @@ -230,7 +231,7 @@ [LibraryClasses.common.SEC]
> !endif
> ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> @@ -272,7 +273,7 @@ [LibraryClasses.common.PEIM]
> PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
> @@ -297,7 +298,7 @@ [LibraryClasses.common.DXE_CORE]
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> !endif
> ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
> @@ -356,7 +357,7 @@ [LibraryClasses.common.DXE_DRIVER]
> !else
> LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
> !endif
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
> @@ -394,7 +395,7 @@ [LibraryClasses.common.DXE_SMM_DRIVER]
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
> !endif
> BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
> @@ -486,7 +487,7 @@ [PcdsFixedAtBuild]
> # DEBUG_ERROR 0x80000000 // Error
> gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
> !else
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
> @@ -500,7 +501,7 @@ [PcdsFixedAtBuild]
> # never lets the RAM below 4 GB exceed 2816 MB.
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
> !endif
>
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index ba7a75884490..5dbd1b793a90 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -30,6 +30,7 @@ [Defines]
> #
> DEFINE SECURE_BOOT_ENABLE = FALSE
> DEFINE SMM_REQUIRE = FALSE
> + DEFINE SOURCE_DEBUG_ENABLE = FALSE
> DEFINE TPM2_ENABLE = FALSE
> DEFINE TPM2_CONFIG_ENABLE = FALSE
>
> @@ -69,7 +70,7 @@ [BuildOptions]
> !if $(TOOL_CHAIN_TAG) != "XCODE5"
> GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse
> !endif
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> MSFT:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> @@ -162,7 +163,7 @@ [LibraryClasses]
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
> DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
> !else
> @@ -230,7 +231,7 @@ [LibraryClasses.common.SEC]
> !endif
> ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> @@ -272,7 +273,7 @@ [LibraryClasses.common.PEIM]
> PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
> @@ -297,7 +298,7 @@ [LibraryClasses.common.DXE_CORE]
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> !endif
> ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
> @@ -356,7 +357,7 @@ [LibraryClasses.common.DXE_DRIVER]
> !else
> LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
> !endif
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
> @@ -394,7 +395,7 @@ [LibraryClasses.common.DXE_SMM_DRIVER]
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
> !endif
> BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
> @@ -486,7 +487,7 @@ [PcdsFixedAtBuild]
> # DEBUG_ERROR 0x80000000 // Error
> gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
> !else
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
> @@ -500,7 +501,7 @@ [PcdsFixedAtBuild]
> # never lets the RAM below 4 GB exceed 2816 MB.
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
> !endif
>
> diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
> index 5a31f75f05d0..8c11efe9b709 100644
> --- a/OvmfPkg/OvmfXen.dsc
> +++ b/OvmfPkg/OvmfXen.dsc
> @@ -29,6 +29,7 @@ [Defines]
> # Defines for default states. These can be changed on the command line.
> # -D FLAG=VALUE
> #
> + DEFINE SOURCE_DEBUG_ENABLE = FALSE
>
> #
> # Network definition
> @@ -66,7 +67,7 @@ [BuildOptions]
> !if $(TOOL_CHAIN_TAG) != "XCODE5"
> GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse
> !endif
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> MSFT:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> GCC:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
> @@ -156,7 +157,7 @@ [LibraryClasses]
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
> FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
> DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
> !else
> @@ -213,7 +214,7 @@ [LibraryClasses.common.SEC]
> !endif
> ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> @@ -255,7 +256,7 @@ [LibraryClasses.common.PEIM]
> PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
> ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
> @@ -275,7 +276,7 @@ [LibraryClasses.common.DXE_CORE]
> DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
> !endif
> ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
> @@ -327,7 +328,7 @@ [LibraryClasses.common.DXE_DRIVER]
> QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
> LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
> !endif
> PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
> @@ -412,7 +413,7 @@ [PcdsFixedAtBuild]
> # DEBUG_ERROR 0x80000000 // Error
> gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17
> !else
> gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
> @@ -426,7 +427,7 @@ [PcdsFixedAtBuild]
> # never lets the RAM below 4 GB exceed 2816 MB.
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xB0000000
>
> -!ifdef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == TRUE
> gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
> !endif
>
> diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
> index 785affeb90c8..586bbff08585 100644
> --- a/OvmfPkg/OvmfPkgIa32.fdf
> +++ b/OvmfPkg/OvmfPkgIa32.fdf
> @@ -260,7 +260,7 @@ [FV.DXEFV]
> INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
>
> INF OvmfPkg/SioBusDxe/SioBusDxe.inf
> -!ifndef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == FALSE
> INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
> !endif
> INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
> diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
> index 74407072563b..e49adc425fce 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.fdf
> +++ b/OvmfPkg/OvmfPkgIa32X64.fdf
> @@ -261,7 +261,7 @@ [FV.DXEFV]
> INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
>
> INF OvmfPkg/SioBusDxe/SioBusDxe.inf
> -!ifndef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == FALSE
> INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
> !endif
> INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
> diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
> index 74407072563b..e49adc425fce 100644
> --- a/OvmfPkg/OvmfPkgX64.fdf
> +++ b/OvmfPkg/OvmfPkgX64.fdf
> @@ -261,7 +261,7 @@ [FV.DXEFV]
> INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
>
> INF OvmfPkg/SioBusDxe/SioBusDxe.inf
> -!ifndef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == FALSE
> INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
> !endif
> INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
> diff --git a/OvmfPkg/OvmfXen.fdf b/OvmfPkg/OvmfXen.fdf
> index e6e9e184ef04..05138ffc5b4f 100644
> --- a/OvmfPkg/OvmfXen.fdf
> +++ b/OvmfPkg/OvmfXen.fdf
> @@ -343,7 +343,7 @@ [FV.DXEFV]
> INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
>
> INF OvmfPkg/SioBusDxe/SioBusDxe.inf
> -!ifndef $(SOURCE_DEBUG_ENABLE)
> +!if $(SOURCE_DEBUG_ENABLE) == FALSE
> INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
> !endif
> INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH v2] OvmfPkg: Make SOURCE_DEBUG_ENABLE actually need to be set to TRUE
2019-10-21 20:13 [PATCH v2] OvmfPkg: Make SOURCE_DEBUG_ENABLE actually need to be set to TRUE Laszlo Ersek
` (2 preceding siblings ...)
2019-10-22 10:03 ` [edk2-devel] " Philippe Mathieu-Daudé
@ 2019-10-22 18:32 ` Laszlo Ersek
3 siblings, 0 replies; 5+ messages in thread
From: Laszlo Ersek @ 2019-10-22 18:32 UTC (permalink / raw)
To: edk2-devel-groups-io
Cc: Andrew Fish, Anthony Perard, Ard Biesheuvel, Jordan Justen,
Julien Grall, Leif Lindholm, Michael Kinney, Peter Jones
On 10/21/19 22:13, Laszlo Ersek wrote:
> From: Peter Jones <pjones@redhat.com>
>
> Currently some tests check the value of SOURCE_DEBUG_ENABLE, and some
> tests check if it's defined or not. Additionally, in UefiPayloadPkg as
> well as some other trees, we define it as FALSE in the .dsc file.
>
> This patch changes all of the Ovmf platforms to explicitly define it as
> FALSE by default, and changes all of the checks to test if the value is
> TRUE.
>
> Signed-off-by: Peter Jones <pjones@redhat.com>
> Message-Id: <20190920184507.909884-1-pjones@redhat.com>
> [lersek@redhat.com: drop Contributed-under line, per TianoCore BZ#1373]
> [lersek@redhat.com: replace "!= TRUE" with more idiomatic "== FALSE"]
> Cc: Andrew Fish <afish@apple.com>
> Cc: Anthony Perard <anthony.perard@citrix.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Julien Grall <julien.grall@arm.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Michael Kinney <michael.d.kinney@intel.com>
> Cc: Peter Jones <pjones@redhat.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>
> Notes:
> v2:
>
> - repo: https://github.com/lersek/edk2.git
> branch: src_dbg_true_v2
>
> - repost the patch in Peter's stead, with the updates requested at
> <http://mid.mail-archive.com/9c6d70b5-fcd6-373f-973f-044d1338e47b@redhat.com>
>
> - per discussion with the other stewards, it's OK to explicitly resubmit
> the patch (noting the original authorship) with the Contributed-under
> line removed
>
> OvmfPkg/OvmfPkgIa32.dsc | 17 +++++++++--------
> OvmfPkg/OvmfPkgIa32X64.dsc | 19 ++++++++++---------
> OvmfPkg/OvmfPkgX64.dsc | 19 ++++++++++---------
> OvmfPkg/OvmfXen.dsc | 17 +++++++++--------
> OvmfPkg/OvmfPkgIa32.fdf | 2 +-
> OvmfPkg/OvmfPkgIa32X64.fdf | 2 +-
> OvmfPkg/OvmfPkgX64.fdf | 2 +-
> OvmfPkg/OvmfXen.fdf | 2 +-
> 8 files changed, 42 insertions(+), 38 deletions(-)
Commit 46bb81200742.
Thanks all,
Laszlo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-10-22 18:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-21 20:13 [PATCH v2] OvmfPkg: Make SOURCE_DEBUG_ENABLE actually need to be set to TRUE Laszlo Ersek
2019-10-22 0:59 ` Jordan Justen
2019-10-22 9:50 ` Anthony PERARD
2019-10-22 10:03 ` [edk2-devel] " Philippe Mathieu-Daudé
2019-10-22 18:32 ` Laszlo Ersek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox