[edk2-devel][edk2-platforms][PATCH V1 1/1] BoardModulePkg/Include: Add include files for common debug scenarios
Oram, Isaac W
isaac.w.oram at intel.com
Fri Jul 1 01:11:29 UTC 2022
Add includable DSC files that make it easy for developers to
increase the debug message level to moderately (reasonable speed)
or maximally verbose (very slow).
Cc: Chasel Chiu <chasel.chiu at intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone at intel.com>
Cc: Liming Gao <gaoliming at byosoft.com.cn>
Cc: Eric Dong <eric.dong at intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram at intel.com>
---
.../Dsc/EnableAllDebugMessages.dsc.inc | 57 ++++++++++++++++++
.../Dsc/EnableRichDebugMessages.dsc.inc | 58 +++++++++++++++++++
.../BoardPortTemplate/PlatformPkg.dsc | 4 +-
.../Include/Dsc/EnableRichDebugMessages.dsc | 50 ----------------
4 files changed, 117 insertions(+), 52 deletions(-)
create mode 100644 Platform/Intel/BoardModulePkg/Include/Dsc/EnableAllDebugMessages.dsc.inc
create mode 100644 Platform/Intel/BoardModulePkg/Include/Dsc/EnableRichDebugMessages.dsc.inc
delete mode 100644 Platform/Intel/WhitleyOpenBoardPkg/Include/Dsc/EnableRichDebugMessages.dsc
diff --git a/Platform/Intel/BoardModulePkg/Include/Dsc/EnableAllDebugMessages.dsc.inc b/Platform/Intel/BoardModulePkg/Include/Dsc/EnableAllDebugMessages.dsc.inc
new file mode 100644
index 0000000000..dad4cb5db1
--- /dev/null
+++ b/Platform/Intel/BoardModulePkg/Include/Dsc/EnableAllDebugMessages.dsc.inc
@@ -0,0 +1,57 @@
+## @file EnableAllDebugMessages.dsc.inc
+#
+# This turns on all debug messages
+# This also customizes cores to use BaseDebugLibSerialPort to reduce blackout periods.
+#
+# @copyright
+# Copyright (C) 2020 Intel Corporation
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+#
+# Customize debug messages
+#
+[PcdsFixedAtBuild]
+ ## The mask is used to control DebugLib behavior.
+ # BIT0 - Enable Debug Assert.
+ # BIT1 - Enable Debug Print.
+ # BIT2 - Enable Debug Code.
+ # BIT3 - Enable Clear Memory.
+ # BIT4 - Enable BreakPoint as ASSERT.
+ # BIT5 - Enable DeadLoop as ASSERT.
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F # Enable asserts, prints, code, clear memory, and deadloops on asserts.
+
+ ## This flag is used to control the built in Debug messages.
+ # BIT0 - Initialization message.
+ # BIT1 - Warning message.
+ # BIT2 - Load Event message.
+ # BIT3 - File System message.
+ # BIT4 - Allocate or Free Pool message.
+ # BIT5 - Allocate or Free Page message.
+ # BIT6 - Information message.
+ # BIT7 - Dispatcher message.
+ # BIT8 - Variable message.
+ # BIT10 - Boot Manager message.
+ # BIT12 - BlockIo Driver message.
+ # BIT14 - Network Driver message.
+ # BIT16 - UNDI Driver message
+ # BIT17 - LoadFile message.
+ # BIT19 - Event message.
+ # BIT20 - Global Coherency Database changes message.
+ # BIT21 - Memory range cachability changes message.
+ # BIT22 - Detailed debug message.
+ # BIT31 - Error message.
+ gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0xFFFFFFFF
+
+[PcdsPatchableInModule]
+ #
+ # This flag is used to control the displayed Debug messages.
+ # For simplification, we like to ensure both built in and enabled are in sync
+ # This is a patchable PCD so that it can be modified on a per component basis
+ # while debugging.
+ #
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel
+
+[LibraryClasses.Common.SEC, LibraryClasses.Common.PEI_CORE, LibraryClasses.Common.PEIM, LibraryClasses.Common.DXE_CORE]
+ DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
diff --git a/Platform/Intel/BoardModulePkg/Include/Dsc/EnableRichDebugMessages.dsc.inc b/Platform/Intel/BoardModulePkg/Include/Dsc/EnableRichDebugMessages.dsc.inc
new file mode 100644
index 0000000000..2004ee6339
--- /dev/null
+++ b/Platform/Intel/BoardModulePkg/Include/Dsc/EnableRichDebugMessages.dsc.inc
@@ -0,0 +1,58 @@
+## @file EnableRichDebugMessages.dsc.inc
+#
+# This takes care to turn on a higher level of debug messages that produces a
+# balance between performance and greater levels of detail.
+# This also customizes cores to use BaseDebugLibSerialPort to reduce blackout periods.
+#
+# @copyright
+# Copyright 2020 (C) Intel Corporation
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+#
+# Customize debug messages
+#
+[PcdsFixedAtBuild]
+ ## The mask is used to control DebugLib behavior.
+ # BIT0 - Enable Debug Assert.
+ # BIT1 - Enable Debug Print.
+ # BIT2 - Enable Debug Code.
+ # BIT3 - Enable Clear Memory.
+ # BIT4 - Enable BreakPoint as ASSERT.
+ # BIT5 - Enable DeadLoop as ASSERT.
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F # Enable asserts, prints, code, clear memory, and deadloops on asserts.
+
+ ## This flag is used to control the built in Debug messages.
+ # BIT0 - Initialization message.
+ # BIT1 - Warning message.
+ # BIT2 - Load Event message.
+ # BIT3 - File System message.
+ # BIT4 - Allocate or Free Pool message.
+ # BIT5 - Allocate or Free Page message.
+ # BIT6 - Information message.
+ # BIT7 - Dispatcher message.
+ # BIT8 - Variable message.
+ # BIT10 - Boot Manager message.
+ # BIT12 - BlockIo Driver message.
+ # BIT14 - Network Driver message.
+ # BIT16 - UNDI Driver message
+ # BIT17 - LoadFile message.
+ # BIT19 - Event message.
+ # BIT20 - Global Coherency Database changes message.
+ # BIT21 - Memory range cachability changes message.
+ # BIT22 - Detailed debug message.
+ # BIT31 - Error message.
+ gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0x802A00C7
+
+[PcdsPatchableInModule]
+ #
+ # This flag is used to control the displayed Debug messages.
+ # For simplification, we like to ensure both built in and enabled are in sync
+ # This is a patchable PCD so that it can be modified on a per component basis
+ # while debugging.
+ #
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel
+
+[LibraryClasses.Common.SEC, LibraryClasses.Common.PEI_CORE, LibraryClasses.Common.PEIM, LibraryClasses.Common.DXE_CORE]
+ DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/BoardPortTemplate/PlatformPkg.dsc b/Platform/Intel/WhitleyOpenBoardPkg/BoardPortTemplate/PlatformPkg.dsc
index e3e8ceb7ce..e9a70fe6dd 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/BoardPortTemplate/PlatformPkg.dsc
+++ b/Platform/Intel/WhitleyOpenBoardPkg/BoardPortTemplate/PlatformPkg.dsc
@@ -34,7 +34,7 @@
# Increase debug message levels
# Several options are provided, last uncommented one will take effect
#
-#!include $(RP_PKG)/Include/Dsc/EnableRichDebugMessages.dsc
-#!include $(RP_PKG)/Include/Dsc/EnableAllDebugMessages.dsc
+#!include BoardModulePkg/Include/Dsc/EnableRichDebugMessages.dsc.inc
+#!include BoardModulePkg/Include/Dsc/EnableAllDebugMessages.dsc.inc
!include $(RP_PKG)/$(BOARD_NAME)/Include/Dsc/UbaSingleBoardPei.dsc
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Include/Dsc/EnableRichDebugMessages.dsc b/Platform/Intel/WhitleyOpenBoardPkg/Include/Dsc/EnableRichDebugMessages.dsc
deleted file mode 100644
index 6a66f2ebbb..0000000000
--- a/Platform/Intel/WhitleyOpenBoardPkg/Include/Dsc/EnableRichDebugMessages.dsc
+++ /dev/null
@@ -1,50 +0,0 @@
-## @file EnableRichDebugMessages.dsc
-# This takes care to turn on a higher level of debug messages that produces a
-# balance between performance and greater levels of detail.
-# This also customizes cores to use BaseDebugLibSerialPort for maximum
-# messaging.
-#
-# @copyright
-# Copyright 2020 - 2021 Intel Corporation. <BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-##
-
-#
-# Customize debug messages
-#
-[PcdsFixedAtBuild]
- ## This flag is used to control the built in Debug messages.
- # BIT0 - Initialization message.<BR>
- # BIT1 - Warning message.<BR>
- # BIT2 - Load Event message.<BR>
- # BIT3 - File System message.<BR>
- # BIT4 - Allocate or Free Pool message.<BR>
- # BIT5 - Allocate or Free Page message.<BR>
- # BIT6 - Information message.<BR>
- # BIT7 - Dispatcher message.<BR>
- # BIT8 - Variable message.<BR>
- # BIT10 - Boot Manager message.<BR>
- # BIT12 - BlockIo Driver message.<BR>
- # BIT14 - Network Driver message.<BR>
- # BIT16 - UNDI Driver message
- # BIT17 - LoadFile message.<BR>
- # BIT19 - Event message.<BR>
- # BIT20 - Global Coherency Database changes message.<BR>
- # BIT21 - Memory range cachability changes message.<BR>
- # BIT22 - Detailed debug message.<BR>
- # BIT31 - Error message.<BR>
- gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0x802A00C7
-
-[PcdsPatchableInModule]
- #
- # This flag is used to control the displayed Debug messages.
- # For simplification, we like to ensure both built in and enabled are in sync
- #
- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel
-
-[LibraryClasses.IA32.PEI_CORE]
- DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-
-[LibraryClasses.X64.DXE_CORE]
- DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
--
2.36.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#90966): https://edk2.groups.io/g/devel/message/90966
Mute This Topic: https://groups.io/mt/92099810/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list