public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level
@ 2023-04-18  9:04 Chang, Abner
  2023-04-18 17:55 ` Michael D Kinney
  0 siblings, 1 reply; 6+ messages in thread
From: Chang, Abner @ 2023-04-18  9:04 UTC (permalink / raw)
  To: devel
  Cc: Michael D Kinney, Liming Gao, Zhiguang Liu, Nickle Wang,
	Igor Kulchytskyy, Isaac Oram, Abdul Lateef Attar, Tinh Nguyen

From: Abner Chang <abner.chang@amd.com>

Bug #4414

Add DEBUG_MANAGEABILITY print error lever to
output debug message of detailed manageability
related module information, such as
- RedfishPkg:
  - HTTP header/request/response
  - JSON plain text
  - Refish resource
  - Redfish Host interface information
  - Redfish credential information
  - Platform configuration to Redfish mapping
  - etc.
- ManageabilityPKg
  - Protocol payload of MCTP/PLDM/IPMI
  - Payload of transport interface transfers
  - IPMI BLOB transfer
  - etc.
- RedfishClinetPkg
  - Redfish feature driver dispatcher
  - Redfish BIOS attributes
  - Platform configuration (HII) to
    Redfish property information
  - Redfish C structure information
  - etc.

Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
Cc: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
---
 MdePkg/MdePkg.dec                 |  1 +
 MdePkg/Include/Library/DebugLib.h | 42 ++++++++++++++++---------------
 2 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index e70182bf7fb..a7566b688d3 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -2282,6 +2282,7 @@
   #  BIT20 - Global Coherency Database changes message.<BR>
   #  BIT21 - Memory range cachability changes message.<BR>
   #  BIT22 - Detailed debug message.<BR>
+  #  BIT23 - Manageability messages. BR>
   #  BIT31 - Error message.<BR>
   # @Prompt Debug Message Print Level.
   # @Expression  0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel & 0x7F84AA00) == 0
diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/DebugLib.h
index 9110be2f41b..12de1584c41 100644
--- a/MdePkg/Include/Library/DebugLib.h
+++ b/MdePkg/Include/Library/DebugLib.h
@@ -29,26 +29,28 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 //
 // Declare bits for PcdDebugPrintErrorLevel and the ErrorLevel parameter of DebugPrint()
 //
-#define DEBUG_INIT      0x00000001  // Initialization
-#define DEBUG_WARN      0x00000002  // Warnings
-#define DEBUG_LOAD      0x00000004  // Load events
-#define DEBUG_FS        0x00000008  // EFI File system
-#define DEBUG_POOL      0x00000010  // Alloc & Free (pool)
-#define DEBUG_PAGE      0x00000020  // Alloc & Free (page)
-#define DEBUG_INFO      0x00000040  // Informational debug messages
-#define DEBUG_DISPATCH  0x00000080  // PEI/DXE/SMM Dispatchers
-#define DEBUG_VARIABLE  0x00000100  // Variable
-#define DEBUG_BM        0x00000400  // Boot Manager
-#define DEBUG_BLKIO     0x00001000  // BlkIo Driver
-#define DEBUG_NET       0x00004000  // Network Io Driver
-#define DEBUG_UNDI      0x00010000  // UNDI Driver
-#define DEBUG_LOADFILE  0x00020000  // LoadFile
-#define DEBUG_EVENT     0x00080000  // Event messages
-#define DEBUG_GCD       0x00100000  // Global Coherency Database changes
-#define DEBUG_CACHE     0x00200000  // Memory range cachability changes
-#define DEBUG_VERBOSE   0x00400000  // Detailed debug messages that may
-                                    // significantly impact boot performance
-#define DEBUG_ERROR  0x80000000     // Error
+#define DEBUG_INIT           0x00000001  // Initialization
+#define DEBUG_WARN           0x00000002  // Warnings
+#define DEBUG_LOAD           0x00000004  // Load events
+#define DEBUG_FS             0x00000008  // EFI File system
+#define DEBUG_POOL           0x00000010  // Alloc & Free (pool)
+#define DEBUG_PAGE           0x00000020  // Alloc & Free (page)
+#define DEBUG_INFO           0x00000040  // Informational debug messages
+#define DEBUG_DISPATCH       0x00000080  // PEI/DXE/SMM Dispatchers
+#define DEBUG_VARIABLE       0x00000100  // Variable
+#define DEBUG_BM             0x00000400  // Boot Manager
+#define DEBUG_BLKIO          0x00001000  // BlkIo Driver
+#define DEBUG_NET            0x00004000  // Network Io Driver
+#define DEBUG_UNDI           0x00010000  // UNDI Driver
+#define DEBUG_LOADFILE       0x00020000  // LoadFile
+#define DEBUG_EVENT          0x00080000  // Event messages
+#define DEBUG_GCD            0x00100000  // Global Coherency Database changes
+#define DEBUG_CACHE          0x00200000  // Memory range cachability changes
+#define DEBUG_VERBOSE        0x00400000  // Detailed debug messages that may
+                                         // significantly impact boot performance
+#define DEBUG_MANAGEABILITY  0x00800000  // Detailed debug and payload message of manageability
+                                         // related modules, such Redfish, IPMI, MCTP and etc.
+#define DEBUG_ERROR          0x80000000  // Error
 
 //
 // Aliases of debug message mask bits
-- 
2.37.1.windows.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level
  2023-04-18  9:04 [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level Chang, Abner
@ 2023-04-18 17:55 ` Michael D Kinney
  2023-04-19  2:06   ` Chang, Abner
  0 siblings, 1 reply; 6+ messages in thread
From: Michael D Kinney @ 2023-04-18 17:55 UTC (permalink / raw)
  To: abner.chang@amd.com, devel@edk2.groups.io
  Cc: Gao, Liming, Liu, Zhiguang, Nickle Wang, Igor Kulchytskyy,
	Oram, Isaac W, Abdul Lateef Attar, Tinh Nguyen, Kinney, Michael D

Do we really need a new debug level?

The DEBUG_INIT/WARN/INFO/VERBOSE levels can be enabled/disabled in individual modules.

I imagine even within the set of manageability components you will want to use those
different levels to adjust verbosity of the debug log.

Mike

> -----Original Message-----
> From: abner.chang@amd.com <abner.chang@amd.com>
> Sent: Tuesday, April 18, 2023 2:04 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>; Oram, Isaac W
> <isaac.w.oram@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Tinh Nguyen
> <tinhnguyen@os.amperecomputing.com>
> Subject: [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level
> 
> From: Abner Chang <abner.chang@amd.com>
> 
> Bug #4414
> 
> Add DEBUG_MANAGEABILITY print error lever to
> output debug message of detailed manageability
> related module information, such as
> - RedfishPkg:
>   - HTTP header/request/response
>   - JSON plain text
>   - Refish resource
>   - Redfish Host interface information
>   - Redfish credential information
>   - Platform configuration to Redfish mapping
>   - etc.
> - ManageabilityPKg
>   - Protocol payload of MCTP/PLDM/IPMI
>   - Payload of transport interface transfers
>   - IPMI BLOB transfer
>   - etc.
> - RedfishClinetPkg
>   - Redfish feature driver dispatcher
>   - Redfish BIOS attributes
>   - Platform configuration (HII) to
>     Redfish property information
>   - Redfish C structure information
>   - etc.
> 
> Signed-off-by: Abner Chang <abner.chang@amd.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> Cc: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
> ---
>  MdePkg/MdePkg.dec                 |  1 +
>  MdePkg/Include/Library/DebugLib.h | 42 ++++++++++++++++---------------
>  2 files changed, 23 insertions(+), 20 deletions(-)
> 
> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
> index e70182bf7fb..a7566b688d3 100644
> --- a/MdePkg/MdePkg.dec
> +++ b/MdePkg/MdePkg.dec
> @@ -2282,6 +2282,7 @@
>    #  BIT20 - Global Coherency Database changes message.<BR>
>    #  BIT21 - Memory range cachability changes message.<BR>
>    #  BIT22 - Detailed debug message.<BR>
> +  #  BIT23 - Manageability messages. BR>
>    #  BIT31 - Error message.<BR>
>    # @Prompt Debug Message Print Level.
>    # @Expression  0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel & 0x7F84AA00) == 0
> diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/DebugLib.h
> index 9110be2f41b..12de1584c41 100644
> --- a/MdePkg/Include/Library/DebugLib.h
> +++ b/MdePkg/Include/Library/DebugLib.h
> @@ -29,26 +29,28 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>  //
>  // Declare bits for PcdDebugPrintErrorLevel and the ErrorLevel parameter of DebugPrint()
>  //
> -#define DEBUG_INIT      0x00000001  // Initialization
> -#define DEBUG_WARN      0x00000002  // Warnings
> -#define DEBUG_LOAD      0x00000004  // Load events
> -#define DEBUG_FS        0x00000008  // EFI File system
> -#define DEBUG_POOL      0x00000010  // Alloc & Free (pool)
> -#define DEBUG_PAGE      0x00000020  // Alloc & Free (page)
> -#define DEBUG_INFO      0x00000040  // Informational debug messages
> -#define DEBUG_DISPATCH  0x00000080  // PEI/DXE/SMM Dispatchers
> -#define DEBUG_VARIABLE  0x00000100  // Variable
> -#define DEBUG_BM        0x00000400  // Boot Manager
> -#define DEBUG_BLKIO     0x00001000  // BlkIo Driver
> -#define DEBUG_NET       0x00004000  // Network Io Driver
> -#define DEBUG_UNDI      0x00010000  // UNDI Driver
> -#define DEBUG_LOADFILE  0x00020000  // LoadFile
> -#define DEBUG_EVENT     0x00080000  // Event messages
> -#define DEBUG_GCD       0x00100000  // Global Coherency Database changes
> -#define DEBUG_CACHE     0x00200000  // Memory range cachability changes
> -#define DEBUG_VERBOSE   0x00400000  // Detailed debug messages that may
> -                                    // significantly impact boot performance
> -#define DEBUG_ERROR  0x80000000     // Error
> +#define DEBUG_INIT           0x00000001  // Initialization
> +#define DEBUG_WARN           0x00000002  // Warnings
> +#define DEBUG_LOAD           0x00000004  // Load events
> +#define DEBUG_FS             0x00000008  // EFI File system
> +#define DEBUG_POOL           0x00000010  // Alloc & Free (pool)
> +#define DEBUG_PAGE           0x00000020  // Alloc & Free (page)
> +#define DEBUG_INFO           0x00000040  // Informational debug messages
> +#define DEBUG_DISPATCH       0x00000080  // PEI/DXE/SMM Dispatchers
> +#define DEBUG_VARIABLE       0x00000100  // Variable
> +#define DEBUG_BM             0x00000400  // Boot Manager
> +#define DEBUG_BLKIO          0x00001000  // BlkIo Driver
> +#define DEBUG_NET            0x00004000  // Network Io Driver
> +#define DEBUG_UNDI           0x00010000  // UNDI Driver
> +#define DEBUG_LOADFILE       0x00020000  // LoadFile
> +#define DEBUG_EVENT          0x00080000  // Event messages
> +#define DEBUG_GCD            0x00100000  // Global Coherency Database changes
> +#define DEBUG_CACHE          0x00200000  // Memory range cachability changes
> +#define DEBUG_VERBOSE        0x00400000  // Detailed debug messages that may
> +                                         // significantly impact boot performance
> +#define DEBUG_MANAGEABILITY  0x00800000  // Detailed debug and payload message of manageability
> +                                         // related modules, such Redfish, IPMI, MCTP and etc.
> +#define DEBUG_ERROR          0x80000000  // Error
> 
>  //
>  // Aliases of debug message mask bits
> --
> 2.37.1.windows.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level
  2023-04-18 17:55 ` Michael D Kinney
@ 2023-04-19  2:06   ` Chang, Abner
  2023-04-20 21:08     ` [edk2-devel] " Michael D Kinney
  0 siblings, 1 reply; 6+ messages in thread
From: Chang, Abner @ 2023-04-19  2:06 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io
  Cc: Gao, Liming, Liu, Zhiguang, Nickle Wang, Igor Kulchytskyy,
	Oram, Isaac W, Attar, AbdulLateef (Abdul Lateef), Tinh Nguyen

[AMD Official Use Only - General]

I was hesitated having a new debug level for just RedfishPkg, until I realized not only RedfishPkg but also ManageabilityPKg and edk2-redfish-client need a specific debug level. The scope look to me big enough to create a new individual debug level due to lot of debug information for those modules and people don’t want to see VERBOSE is enabled on all modules just because PcdDebugPrintErrorLevel is overwritten in platform DSC in most of platform development practices. There are many modules and multiple layers of driver stack in the above packages, especially to the upcoming package under edk2-redfish-client repo. It seems to me it would be pesky to developers for turning on VERBOSE on certain modules one by one.

Abner

> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Wednesday, April 19, 2023 1:55 AM
> To: Chang, Abner <Abner.Chang@amd.com>; devel@edk2.groups.io
> Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>;
> Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Tinh
> Nguyen <tinhnguyen@os.amperecomputing.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>
> Subject: RE: [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> Do we really need a new debug level?
> 
> The DEBUG_INIT/WARN/INFO/VERBOSE levels can be enabled/disabled in
> individual modules.
> 
> I imagine even within the set of manageability components you will want to
> use those different levels to adjust verbosity of the debug log.
> 
> Mike
> 
> > -----Original Message-----
> > From: abner.chang@amd.com <abner.chang@amd.com>
> > Sent: Tuesday, April 18, 2023 2:04 AM
> > To: devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
> > <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>;
> > Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>;
> > Oram, Isaac W <isaac.w.oram@intel.com>; Abdul Lateef Attar
> > <AbdulLateef.Attar@amd.com>; Tinh Nguyen
> > <tinhnguyen@os.amperecomputing.com>
> > Subject: [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level
> >
> > From: Abner Chang <abner.chang@amd.com>
> >
> > Bug #4414
> >
> > Add DEBUG_MANAGEABILITY print error lever to output debug message of
> > detailed manageability related module information, such as
> > - RedfishPkg:
> >   - HTTP header/request/response
> >   - JSON plain text
> >   - Refish resource
> >   - Redfish Host interface information
> >   - Redfish credential information
> >   - Platform configuration to Redfish mapping
> >   - etc.
> > - ManageabilityPKg
> >   - Protocol payload of MCTP/PLDM/IPMI
> >   - Payload of transport interface transfers
> >   - IPMI BLOB transfer
> >   - etc.
> > - RedfishClinetPkg
> >   - Redfish feature driver dispatcher
> >   - Redfish BIOS attributes
> >   - Platform configuration (HII) to
> >     Redfish property information
> >   - Redfish C structure information
> >   - etc.
> >
> > Signed-off-by: Abner Chang <abner.chang@amd.com>
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > Cc: Nickle Wang <nicklew@nvidia.com>
> > Cc: Igor Kulchytskyy <igork@ami.com>
> > Cc: Isaac Oram <isaac.w.oram@intel.com>
> > Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> > Cc: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
> > ---
> >  MdePkg/MdePkg.dec                 |  1 +
> >  MdePkg/Include/Library/DebugLib.h | 42
> > ++++++++++++++++---------------
> >  2 files changed, 23 insertions(+), 20 deletions(-)
> >
> > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
> > e70182bf7fb..a7566b688d3 100644
> > --- a/MdePkg/MdePkg.dec
> > +++ b/MdePkg/MdePkg.dec
> > @@ -2282,6 +2282,7 @@
> >    #  BIT20 - Global Coherency Database changes message.<BR>
> >    #  BIT21 - Memory range cachability changes message.<BR>
> >    #  BIT22 - Detailed debug message.<BR>
> > +  #  BIT23 - Manageability messages. BR>
> >    #  BIT31 - Error message.<BR>
> >    # @Prompt Debug Message Print Level.
> >    # @Expression  0x80000002 |
> > (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel & 0x7F84AA00) ==
> 0
> > diff --git a/MdePkg/Include/Library/DebugLib.h
> > b/MdePkg/Include/Library/DebugLib.h
> > index 9110be2f41b..12de1584c41 100644
> > --- a/MdePkg/Include/Library/DebugLib.h
> > +++ b/MdePkg/Include/Library/DebugLib.h
> > @@ -29,26 +29,28 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  //
> > // Declare bits for PcdDebugPrintErrorLevel and the ErrorLevel
> > parameter of DebugPrint()  //
> > -#define DEBUG_INIT      0x00000001  // Initialization
> > -#define DEBUG_WARN      0x00000002  // Warnings
> > -#define DEBUG_LOAD      0x00000004  // Load events
> > -#define DEBUG_FS        0x00000008  // EFI File system
> > -#define DEBUG_POOL      0x00000010  // Alloc & Free (pool)
> > -#define DEBUG_PAGE      0x00000020  // Alloc & Free (page)
> > -#define DEBUG_INFO      0x00000040  // Informational debug messages
> > -#define DEBUG_DISPATCH  0x00000080  // PEI/DXE/SMM Dispatchers
> > -#define DEBUG_VARIABLE  0x00000100  // Variable
> > -#define DEBUG_BM        0x00000400  // Boot Manager
> > -#define DEBUG_BLKIO     0x00001000  // BlkIo Driver
> > -#define DEBUG_NET       0x00004000  // Network Io Driver
> > -#define DEBUG_UNDI      0x00010000  // UNDI Driver
> > -#define DEBUG_LOADFILE  0x00020000  // LoadFile
> > -#define DEBUG_EVENT     0x00080000  // Event messages
> > -#define DEBUG_GCD       0x00100000  // Global Coherency Database
> changes
> > -#define DEBUG_CACHE     0x00200000  // Memory range cachability
> changes
> > -#define DEBUG_VERBOSE   0x00400000  // Detailed debug messages that
> may
> > -                                    // significantly impact boot performance
> > -#define DEBUG_ERROR  0x80000000     // Error
> > +#define DEBUG_INIT           0x00000001  // Initialization
> > +#define DEBUG_WARN           0x00000002  // Warnings
> > +#define DEBUG_LOAD           0x00000004  // Load events
> > +#define DEBUG_FS             0x00000008  // EFI File system
> > +#define DEBUG_POOL           0x00000010  // Alloc & Free (pool)
> > +#define DEBUG_PAGE           0x00000020  // Alloc & Free (page)
> > +#define DEBUG_INFO           0x00000040  // Informational debug messages
> > +#define DEBUG_DISPATCH       0x00000080  // PEI/DXE/SMM Dispatchers
> > +#define DEBUG_VARIABLE       0x00000100  // Variable
> > +#define DEBUG_BM             0x00000400  // Boot Manager
> > +#define DEBUG_BLKIO          0x00001000  // BlkIo Driver
> > +#define DEBUG_NET            0x00004000  // Network Io Driver
> > +#define DEBUG_UNDI           0x00010000  // UNDI Driver
> > +#define DEBUG_LOADFILE       0x00020000  // LoadFile
> > +#define DEBUG_EVENT          0x00080000  // Event messages
> > +#define DEBUG_GCD            0x00100000  // Global Coherency Database
> changes
> > +#define DEBUG_CACHE          0x00200000  // Memory range cachability
> changes
> > +#define DEBUG_VERBOSE        0x00400000  // Detailed debug messages
> that may
> > +                                         // significantly impact boot
> > +performance #define DEBUG_MANAGEABILITY  0x00800000  // Detailed
> debug and payload message of manageability
> > +                                         // related modules, such Redfish, IPMI, MCTP and etc.
> > +#define DEBUG_ERROR          0x80000000  // Error
> >
> >  //
> >  // Aliases of debug message mask bits
> > --
> > 2.37.1.windows.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level
  2023-04-19  2:06   ` Chang, Abner
@ 2023-04-20 21:08     ` Michael D Kinney
  2023-04-21  8:09       ` Chang, Abner
  0 siblings, 1 reply; 6+ messages in thread
From: Michael D Kinney @ 2023-04-20 21:08 UTC (permalink / raw)
  To: devel@edk2.groups.io, abner.chang@amd.com
  Cc: Gao, Liming, Liu, Zhiguang, Nickle Wang, Igor Kulchytskyy,
	Oram, Isaac W, Attar, AbdulLateef (Abdul Lateef), Tinh Nguyen,
	Kinney, Michael D

Hi Abner,

This seems like a reasonable additional to the debug levels.

Do you intend to mix this debug level with DEBUG_ERROR, DEBUG_WARN, DEBUG_INFO, DEBUG_VERBOSE.
DEBUG_INFO | DEBUG_LOAD example:

	https://github.com/tianocore/edk2/blob/9bf79303ae5cb4d0e14ed7a219107b53e2ecdcd0/StandaloneMmPkg/Core/Dispatcher.c#L279

There may be challenges defining what is a manageability related component and what is not, but that can be handled through code reviews.

Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>

Mike

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chang, Abner via groups.io
> Sent: Tuesday, April 18, 2023 7:06 PM
> To: Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io
> Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Attar, AbdulLateef (Abdul Lateef)
> <AbdulLateef.Attar@amd.com>; Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
> Subject: Re: [edk2-devel] [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level
> 
> [AMD Official Use Only - General]
> 
> I was hesitated having a new debug level for just RedfishPkg, until I realized not only RedfishPkg but also
> ManageabilityPKg and edk2-redfish-client need a specific debug level. The scope look to me big enough to create a new
> individual debug level due to lot of debug information for those modules and people don’t want to see VERBOSE is enabled
> on all modules just because PcdDebugPrintErrorLevel is overwritten in platform DSC in most of platform development
> practices. There are many modules and multiple layers of driver stack in the above packages, especially to the upcoming
> package under edk2-redfish-client repo. It seems to me it would be pesky to developers for turning on VERBOSE on certain
> modules one by one.
> 
> Abner
> 
> > -----Original Message-----
> > From: Kinney, Michael D <michael.d.kinney@intel.com>
> > Sent: Wednesday, April 19, 2023 1:55 AM
> > To: Chang, Abner <Abner.Chang@amd.com>; devel@edk2.groups.io
> > Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>;
> > Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Tinh
> > Nguyen <tinhnguyen@os.amperecomputing.com>; Kinney, Michael D
> > <michael.d.kinney@intel.com>
> > Subject: RE: [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level
> >
> > Caution: This message originated from an External Source. Use proper
> > caution when opening attachments, clicking links, or responding.
> >
> >
> > Do we really need a new debug level?
> >
> > The DEBUG_INIT/WARN/INFO/VERBOSE levels can be enabled/disabled in
> > individual modules.
> >
> > I imagine even within the set of manageability components you will want to
> > use those different levels to adjust verbosity of the debug log.
> >
> > Mike
> >
> > > -----Original Message-----
> > > From: abner.chang@amd.com <abner.chang@amd.com>
> > > Sent: Tuesday, April 18, 2023 2:04 AM
> > > To: devel@edk2.groups.io
> > > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
> > > <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>;
> > > Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>;
> > > Oram, Isaac W <isaac.w.oram@intel.com>; Abdul Lateef Attar
> > > <AbdulLateef.Attar@amd.com>; Tinh Nguyen
> > > <tinhnguyen@os.amperecomputing.com>
> > > Subject: [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level
> > >
> > > From: Abner Chang <abner.chang@amd.com>
> > >
> > > Bug #4414
> > >
> > > Add DEBUG_MANAGEABILITY print error lever to output debug message of
> > > detailed manageability related module information, such as
> > > - RedfishPkg:
> > >   - HTTP header/request/response
> > >   - JSON plain text
> > >   - Refish resource
> > >   - Redfish Host interface information
> > >   - Redfish credential information
> > >   - Platform configuration to Redfish mapping
> > >   - etc.
> > > - ManageabilityPKg
> > >   - Protocol payload of MCTP/PLDM/IPMI
> > >   - Payload of transport interface transfers
> > >   - IPMI BLOB transfer
> > >   - etc.
> > > - RedfishClinetPkg
> > >   - Redfish feature driver dispatcher
> > >   - Redfish BIOS attributes
> > >   - Platform configuration (HII) to
> > >     Redfish property information
> > >   - Redfish C structure information
> > >   - etc.
> > >
> > > Signed-off-by: Abner Chang <abner.chang@amd.com>
> > > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > > Cc: Nickle Wang <nicklew@nvidia.com>
> > > Cc: Igor Kulchytskyy <igork@ami.com>
> > > Cc: Isaac Oram <isaac.w.oram@intel.com>
> > > Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> > > Cc: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
> > > ---
> > >  MdePkg/MdePkg.dec                 |  1 +
> > >  MdePkg/Include/Library/DebugLib.h | 42
> > > ++++++++++++++++---------------
> > >  2 files changed, 23 insertions(+), 20 deletions(-)
> > >
> > > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
> > > e70182bf7fb..a7566b688d3 100644
> > > --- a/MdePkg/MdePkg.dec
> > > +++ b/MdePkg/MdePkg.dec
> > > @@ -2282,6 +2282,7 @@
> > >    #  BIT20 - Global Coherency Database changes message.<BR>
> > >    #  BIT21 - Memory range cachability changes message.<BR>
> > >    #  BIT22 - Detailed debug message.<BR>
> > > +  #  BIT23 - Manageability messages. BR>
> > >    #  BIT31 - Error message.<BR>
> > >    # @Prompt Debug Message Print Level.
> > >    # @Expression  0x80000002 |
> > > (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel & 0x7F84AA00) ==
> > 0
> > > diff --git a/MdePkg/Include/Library/DebugLib.h
> > > b/MdePkg/Include/Library/DebugLib.h
> > > index 9110be2f41b..12de1584c41 100644
> > > --- a/MdePkg/Include/Library/DebugLib.h
> > > +++ b/MdePkg/Include/Library/DebugLib.h
> > > @@ -29,26 +29,28 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  //
> > > // Declare bits for PcdDebugPrintErrorLevel and the ErrorLevel
> > > parameter of DebugPrint()  //
> > > -#define DEBUG_INIT      0x00000001  // Initialization
> > > -#define DEBUG_WARN      0x00000002  // Warnings
> > > -#define DEBUG_LOAD      0x00000004  // Load events
> > > -#define DEBUG_FS        0x00000008  // EFI File system
> > > -#define DEBUG_POOL      0x00000010  // Alloc & Free (pool)
> > > -#define DEBUG_PAGE      0x00000020  // Alloc & Free (page)
> > > -#define DEBUG_INFO      0x00000040  // Informational debug messages
> > > -#define DEBUG_DISPATCH  0x00000080  // PEI/DXE/SMM Dispatchers
> > > -#define DEBUG_VARIABLE  0x00000100  // Variable
> > > -#define DEBUG_BM        0x00000400  // Boot Manager
> > > -#define DEBUG_BLKIO     0x00001000  // BlkIo Driver
> > > -#define DEBUG_NET       0x00004000  // Network Io Driver
> > > -#define DEBUG_UNDI      0x00010000  // UNDI Driver
> > > -#define DEBUG_LOADFILE  0x00020000  // LoadFile
> > > -#define DEBUG_EVENT     0x00080000  // Event messages
> > > -#define DEBUG_GCD       0x00100000  // Global Coherency Database
> > changes
> > > -#define DEBUG_CACHE     0x00200000  // Memory range cachability
> > changes
> > > -#define DEBUG_VERBOSE   0x00400000  // Detailed debug messages that
> > may
> > > -                                    // significantly impact boot performance
> > > -#define DEBUG_ERROR  0x80000000     // Error
> > > +#define DEBUG_INIT           0x00000001  // Initialization
> > > +#define DEBUG_WARN           0x00000002  // Warnings
> > > +#define DEBUG_LOAD           0x00000004  // Load events
> > > +#define DEBUG_FS             0x00000008  // EFI File system
> > > +#define DEBUG_POOL           0x00000010  // Alloc & Free (pool)
> > > +#define DEBUG_PAGE           0x00000020  // Alloc & Free (page)
> > > +#define DEBUG_INFO           0x00000040  // Informational debug messages
> > > +#define DEBUG_DISPATCH       0x00000080  // PEI/DXE/SMM Dispatchers
> > > +#define DEBUG_VARIABLE       0x00000100  // Variable
> > > +#define DEBUG_BM             0x00000400  // Boot Manager
> > > +#define DEBUG_BLKIO          0x00001000  // BlkIo Driver
> > > +#define DEBUG_NET            0x00004000  // Network Io Driver
> > > +#define DEBUG_UNDI           0x00010000  // UNDI Driver
> > > +#define DEBUG_LOADFILE       0x00020000  // LoadFile
> > > +#define DEBUG_EVENT          0x00080000  // Event messages
> > > +#define DEBUG_GCD            0x00100000  // Global Coherency Database
> > changes
> > > +#define DEBUG_CACHE          0x00200000  // Memory range cachability
> > changes
> > > +#define DEBUG_VERBOSE        0x00400000  // Detailed debug messages
> > that may
> > > +                                         // significantly impact boot
> > > +performance #define DEBUG_MANAGEABILITY  0x00800000  // Detailed
> > debug and payload message of manageability
> > > +                                         // related modules, such Redfish, IPMI, MCTP and etc.
> > > +#define DEBUG_ERROR          0x80000000  // Error
> > >
> > >  //
> > >  // Aliases of debug message mask bits
> > > --
> > > 2.37.1.windows.1
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level
  2023-04-20 21:08     ` [edk2-devel] " Michael D Kinney
@ 2023-04-21  8:09       ` Chang, Abner
  2023-04-21 15:44         ` Michael D Kinney
  0 siblings, 1 reply; 6+ messages in thread
From: Chang, Abner @ 2023-04-21  8:09 UTC (permalink / raw)
  To: devel@edk2.groups.io, michael.d.kinney@intel.com
  Cc: Gao, Liming, Liu, Zhiguang, Nickle Wang, Igor Kulchytskyy,
	Oram, Isaac W, Attar, AbdulLateef (Abdul Lateef), Tinh Nguyen

[AMD Official Use Only - General]



> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael
> D Kinney via groups.io
> Sent: Friday, April 21, 2023 5:09 AM
> To: devel@edk2.groups.io; Chang, Abner <Abner.Chang@amd.com>
> Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>;
> Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Tinh
> Nguyen <tinhnguyen@os.amperecomputing.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>
> Subject: Re: [edk2-devel] [PATCH] MdePkg: Add DEBUG_MANAGEABILITY
> print error level
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> Hi Abner,
> 
> This seems like a reasonable additional to the debug levels.
> 
> Do you intend to mix this debug level with DEBUG_ERROR, DEBUG_WARN,
> DEBUG_INFO, DEBUG_VERBOSE.
> DEBUG_INFO | DEBUG_LOAD example:
We still use DEBUG_INFO for the function entry point. DEBUG_VERBOSE with DEBUG_MANAGEABILITY may useful if user would like to have full debug information with only DEBUG_VERBOSE enabled.

> 
> 
> https://github.com/tianocore/edk2/blob/9bf79303ae5cb4d0e14ed7a219107
> b53e2ecdcd0/StandaloneMmPkg/Core/Dispatcher.c#L279
> 
> There may be challenges defining what is a manageability related component
> and what is not, but that can be handled through code reviews.
> 
> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>

This is the PR that passed CI, please help to merge it.
https://github.com/tianocore/edk2/pull/4294

Thanks
Abner

> 
> Mike
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chang,
> > Abner via groups.io
> > Sent: Tuesday, April 18, 2023 7:06 PM
> > To: Kinney, Michael D <michael.d.kinney@intel.com>;
> > devel@edk2.groups.io
> > Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>;
> > Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Tinh
> > Nguyen <tinhnguyen@os.amperecomputing.com>
> > Subject: Re: [edk2-devel] [PATCH] MdePkg: Add DEBUG_MANAGEABILITY
> > print error level
> >
> > [AMD Official Use Only - General]
> >
> > I was hesitated having a new debug level for just RedfishPkg, until I
> > realized not only RedfishPkg but also ManageabilityPKg and
> > edk2-redfish-client need a specific debug level. The scope look to me
> > big enough to create a new individual debug level due to lot of debug
> > information for those modules and people don’t want to see VERBOSE is
> > enabled on all modules just because PcdDebugPrintErrorLevel is
> > overwritten in platform DSC in most of platform development practices.
> There are many modules and multiple layers of driver stack in the above
> packages, especially to the upcoming package under edk2-redfish-client repo.
> It seems to me it would be pesky to developers for turning on VERBOSE on
> certain modules one by one.
> >
> > Abner
> >
> > > -----Original Message-----
> > > From: Kinney, Michael D <michael.d.kinney@intel.com>
> > > Sent: Wednesday, April 19, 2023 1:55 AM
> > > To: Chang, Abner <Abner.Chang@amd.com>; devel@edk2.groups.io
> > > Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > > Kulchytskyy <igork@ami.com>; Oram, Isaac W
> <isaac.w.oram@intel.com>;
> > > Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Tinh
> > > Nguyen <tinhnguyen@os.amperecomputing.com>; Kinney, Michael D
> > > <michael.d.kinney@intel.com>
> > > Subject: RE: [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error
> > > level
> > >
> > > Caution: This message originated from an External Source. Use proper
> > > caution when opening attachments, clicking links, or responding.
> > >
> > >
> > > Do we really need a new debug level?
> > >
> > > The DEBUG_INIT/WARN/INFO/VERBOSE levels can be enabled/disabled
> in
> > > individual modules.
> > >
> > > I imagine even within the set of manageability components you will
> > > want to use those different levels to adjust verbosity of the debug log.
> > >
> > > Mike
> > >
> > > > -----Original Message-----
> > > > From: abner.chang@amd.com <abner.chang@amd.com>
> > > > Sent: Tuesday, April 18, 2023 2:04 AM
> > > > To: devel@edk2.groups.io
> > > > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
> > > > <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > > > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > > > Kulchytskyy <igork@ami.com>; Oram, Isaac W
> > > > <isaac.w.oram@intel.com>; Abdul Lateef Attar
> > > > <AbdulLateef.Attar@amd.com>; Tinh Nguyen
> > > > <tinhnguyen@os.amperecomputing.com>
> > > > Subject: [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error
> level
> > > >
> > > > From: Abner Chang <abner.chang@amd.com>
> > > >
> > > > Bug #4414
> > > >
> > > > Add DEBUG_MANAGEABILITY print error lever to output debug
> message
> > > > of detailed manageability related module information, such as
> > > > - RedfishPkg:
> > > >   - HTTP header/request/response
> > > >   - JSON plain text
> > > >   - Refish resource
> > > >   - Redfish Host interface information
> > > >   - Redfish credential information
> > > >   - Platform configuration to Redfish mapping
> > > >   - etc.
> > > > - ManageabilityPKg
> > > >   - Protocol payload of MCTP/PLDM/IPMI
> > > >   - Payload of transport interface transfers
> > > >   - IPMI BLOB transfer
> > > >   - etc.
> > > > - RedfishClinetPkg
> > > >   - Redfish feature driver dispatcher
> > > >   - Redfish BIOS attributes
> > > >   - Platform configuration (HII) to
> > > >     Redfish property information
> > > >   - Redfish C structure information
> > > >   - etc.
> > > >
> > > > Signed-off-by: Abner Chang <abner.chang@amd.com>
> > > > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > > > Cc: Nickle Wang <nicklew@nvidia.com>
> > > > Cc: Igor Kulchytskyy <igork@ami.com>
> > > > Cc: Isaac Oram <isaac.w.oram@intel.com>
> > > > Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> > > > Cc: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
> > > > ---
> > > >  MdePkg/MdePkg.dec                 |  1 +
> > > >  MdePkg/Include/Library/DebugLib.h | 42
> > > > ++++++++++++++++---------------
> > > >  2 files changed, 23 insertions(+), 20 deletions(-)
> > > >
> > > > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
> > > > e70182bf7fb..a7566b688d3 100644
> > > > --- a/MdePkg/MdePkg.dec
> > > > +++ b/MdePkg/MdePkg.dec
> > > > @@ -2282,6 +2282,7 @@
> > > >    #  BIT20 - Global Coherency Database changes message.<BR>
> > > >    #  BIT21 - Memory range cachability changes message.<BR>
> > > >    #  BIT22 - Detailed debug message.<BR>
> > > > +  #  BIT23 - Manageability messages. BR>
> > > >    #  BIT31 - Error message.<BR>
> > > >    # @Prompt Debug Message Print Level.
> > > >    # @Expression  0x80000002 |
> > > > (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel & 0x7F84AA00)
> ==
> > > 0
> > > > diff --git a/MdePkg/Include/Library/DebugLib.h
> > > > b/MdePkg/Include/Library/DebugLib.h
> > > > index 9110be2f41b..12de1584c41 100644
> > > > --- a/MdePkg/Include/Library/DebugLib.h
> > > > +++ b/MdePkg/Include/Library/DebugLib.h
> > > > @@ -29,26 +29,28 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> > > > // // Declare bits for PcdDebugPrintErrorLevel and the ErrorLevel
> > > > parameter of DebugPrint()  //
> > > > -#define DEBUG_INIT      0x00000001  // Initialization
> > > > -#define DEBUG_WARN      0x00000002  // Warnings
> > > > -#define DEBUG_LOAD      0x00000004  // Load events
> > > > -#define DEBUG_FS        0x00000008  // EFI File system
> > > > -#define DEBUG_POOL      0x00000010  // Alloc & Free (pool)
> > > > -#define DEBUG_PAGE      0x00000020  // Alloc & Free (page)
> > > > -#define DEBUG_INFO      0x00000040  // Informational debug messages
> > > > -#define DEBUG_DISPATCH  0x00000080  // PEI/DXE/SMM Dispatchers
> > > > -#define DEBUG_VARIABLE  0x00000100  // Variable
> > > > -#define DEBUG_BM        0x00000400  // Boot Manager
> > > > -#define DEBUG_BLKIO     0x00001000  // BlkIo Driver
> > > > -#define DEBUG_NET       0x00004000  // Network Io Driver
> > > > -#define DEBUG_UNDI      0x00010000  // UNDI Driver
> > > > -#define DEBUG_LOADFILE  0x00020000  // LoadFile
> > > > -#define DEBUG_EVENT     0x00080000  // Event messages
> > > > -#define DEBUG_GCD       0x00100000  // Global Coherency Database
> > > changes
> > > > -#define DEBUG_CACHE     0x00200000  // Memory range cachability
> > > changes
> > > > -#define DEBUG_VERBOSE   0x00400000  // Detailed debug messages
> that
> > > may
> > > > -                                    // significantly impact boot performance
> > > > -#define DEBUG_ERROR  0x80000000     // Error
> > > > +#define DEBUG_INIT           0x00000001  // Initialization
> > > > +#define DEBUG_WARN           0x00000002  // Warnings
> > > > +#define DEBUG_LOAD           0x00000004  // Load events
> > > > +#define DEBUG_FS             0x00000008  // EFI File system
> > > > +#define DEBUG_POOL           0x00000010  // Alloc & Free (pool)
> > > > +#define DEBUG_PAGE           0x00000020  // Alloc & Free (page)
> > > > +#define DEBUG_INFO           0x00000040  // Informational debug
> messages
> > > > +#define DEBUG_DISPATCH       0x00000080  // PEI/DXE/SMM
> Dispatchers
> > > > +#define DEBUG_VARIABLE       0x00000100  // Variable
> > > > +#define DEBUG_BM             0x00000400  // Boot Manager
> > > > +#define DEBUG_BLKIO          0x00001000  // BlkIo Driver
> > > > +#define DEBUG_NET            0x00004000  // Network Io Driver
> > > > +#define DEBUG_UNDI           0x00010000  // UNDI Driver
> > > > +#define DEBUG_LOADFILE       0x00020000  // LoadFile
> > > > +#define DEBUG_EVENT          0x00080000  // Event messages
> > > > +#define DEBUG_GCD            0x00100000  // Global Coherency Database
> > > changes
> > > > +#define DEBUG_CACHE          0x00200000  // Memory range cachability
> > > changes
> > > > +#define DEBUG_VERBOSE        0x00400000  // Detailed debug
> messages
> > > that may
> > > > +                                         // significantly impact
> > > > +boot performance #define DEBUG_MANAGEABILITY  0x00800000  //
> > > > +Detailed
> > > debug and payload message of manageability
> > > > +                                         // related modules, such Redfish, IPMI, MCTP and
> etc.
> > > > +#define DEBUG_ERROR          0x80000000  // Error
> > > >
> > > >  //
> > > >  // Aliases of debug message mask bits
> > > > --
> > > > 2.37.1.windows.1
> >
> >
> >
> >
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level
  2023-04-21  8:09       ` Chang, Abner
@ 2023-04-21 15:44         ` Michael D Kinney
  0 siblings, 0 replies; 6+ messages in thread
From: Michael D Kinney @ 2023-04-21 15:44 UTC (permalink / raw)
  To: devel@edk2.groups.io, abner.chang@amd.com
  Cc: Gao, Liming, Liu, Zhiguang, Nickle Wang, Igor Kulchytskyy,
	Oram, Isaac W, Attar, AbdulLateef (Abdul Lateef), Tinh Nguyen,
	Kinney, Michael D

Merged

Mike

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chang, Abner via groups.io
> Sent: Friday, April 21, 2023 1:10 AM
> To: devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>
> Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Attar, AbdulLateef (Abdul Lateef)
> <AbdulLateef.Attar@amd.com>; Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
> Subject: Re: [edk2-devel] [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level
> 
> [AMD Official Use Only - General]
> 
> 
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael
> > D Kinney via groups.io
> > Sent: Friday, April 21, 2023 5:09 AM
> > To: devel@edk2.groups.io; Chang, Abner <Abner.Chang@amd.com>
> > Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>;
> > Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Tinh
> > Nguyen <tinhnguyen@os.amperecomputing.com>; Kinney, Michael D
> > <michael.d.kinney@intel.com>
> > Subject: Re: [edk2-devel] [PATCH] MdePkg: Add DEBUG_MANAGEABILITY
> > print error level
> >
> > Caution: This message originated from an External Source. Use proper
> > caution when opening attachments, clicking links, or responding.
> >
> >
> > Hi Abner,
> >
> > This seems like a reasonable additional to the debug levels.
> >
> > Do you intend to mix this debug level with DEBUG_ERROR, DEBUG_WARN,
> > DEBUG_INFO, DEBUG_VERBOSE.
> > DEBUG_INFO | DEBUG_LOAD example:
> We still use DEBUG_INFO for the function entry point. DEBUG_VERBOSE with DEBUG_MANAGEABILITY may useful if user would like to
> have full debug information with only DEBUG_VERBOSE enabled.
> 
> >
> >
> > https://github.com/tianocore/edk2/blob/9bf79303ae5cb4d0e14ed7a219107
> > b53e2ecdcd0/StandaloneMmPkg/Core/Dispatcher.c#L279
> >
> > There may be challenges defining what is a manageability related component
> > and what is not, but that can be handled through code reviews.
> >
> > Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
> 
> This is the PR that passed CI, please help to merge it.
> https://github.com/tianocore/edk2/pull/4294
> 
> Thanks
> Abner
> 
> >
> > Mike
> >
> > > -----Original Message-----
> > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chang,
> > > Abner via groups.io
> > > Sent: Tuesday, April 18, 2023 7:06 PM
> > > To: Kinney, Michael D <michael.d.kinney@intel.com>;
> > > devel@edk2.groups.io
> > > Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > > Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>;
> > > Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Tinh
> > > Nguyen <tinhnguyen@os.amperecomputing.com>
> > > Subject: Re: [edk2-devel] [PATCH] MdePkg: Add DEBUG_MANAGEABILITY
> > > print error level
> > >
> > > [AMD Official Use Only - General]
> > >
> > > I was hesitated having a new debug level for just RedfishPkg, until I
> > > realized not only RedfishPkg but also ManageabilityPKg and
> > > edk2-redfish-client need a specific debug level. The scope look to me
> > > big enough to create a new individual debug level due to lot of debug
> > > information for those modules and people don’t want to see VERBOSE is
> > > enabled on all modules just because PcdDebugPrintErrorLevel is
> > > overwritten in platform DSC in most of platform development practices.
> > There are many modules and multiple layers of driver stack in the above
> > packages, especially to the upcoming package under edk2-redfish-client repo.
> > It seems to me it would be pesky to developers for turning on VERBOSE on
> > certain modules one by one.
> > >
> > > Abner
> > >
> > > > -----Original Message-----
> > > > From: Kinney, Michael D <michael.d.kinney@intel.com>
> > > > Sent: Wednesday, April 19, 2023 1:55 AM
> > > > To: Chang, Abner <Abner.Chang@amd.com>; devel@edk2.groups.io
> > > > Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > > > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > > > Kulchytskyy <igork@ami.com>; Oram, Isaac W
> > <isaac.w.oram@intel.com>;
> > > > Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Tinh
> > > > Nguyen <tinhnguyen@os.amperecomputing.com>; Kinney, Michael D
> > > > <michael.d.kinney@intel.com>
> > > > Subject: RE: [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error
> > > > level
> > > >
> > > > Caution: This message originated from an External Source. Use proper
> > > > caution when opening attachments, clicking links, or responding.
> > > >
> > > >
> > > > Do we really need a new debug level?
> > > >
> > > > The DEBUG_INIT/WARN/INFO/VERBOSE levels can be enabled/disabled
> > in
> > > > individual modules.
> > > >
> > > > I imagine even within the set of manageability components you will
> > > > want to use those different levels to adjust verbosity of the debug log.
> > > >
> > > > Mike
> > > >
> > > > > -----Original Message-----
> > > > > From: abner.chang@amd.com <abner.chang@amd.com>
> > > > > Sent: Tuesday, April 18, 2023 2:04 AM
> > > > > To: devel@edk2.groups.io
> > > > > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
> > > > > <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > > > > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > > > > Kulchytskyy <igork@ami.com>; Oram, Isaac W
> > > > > <isaac.w.oram@intel.com>; Abdul Lateef Attar
> > > > > <AbdulLateef.Attar@amd.com>; Tinh Nguyen
> > > > > <tinhnguyen@os.amperecomputing.com>
> > > > > Subject: [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error
> > level
> > > > >
> > > > > From: Abner Chang <abner.chang@amd.com>
> > > > >
> > > > > Bug #4414
> > > > >
> > > > > Add DEBUG_MANAGEABILITY print error lever to output debug
> > message
> > > > > of detailed manageability related module information, such as
> > > > > - RedfishPkg:
> > > > >   - HTTP header/request/response
> > > > >   - JSON plain text
> > > > >   - Refish resource
> > > > >   - Redfish Host interface information
> > > > >   - Redfish credential information
> > > > >   - Platform configuration to Redfish mapping
> > > > >   - etc.
> > > > > - ManageabilityPKg
> > > > >   - Protocol payload of MCTP/PLDM/IPMI
> > > > >   - Payload of transport interface transfers
> > > > >   - IPMI BLOB transfer
> > > > >   - etc.
> > > > > - RedfishClinetPkg
> > > > >   - Redfish feature driver dispatcher
> > > > >   - Redfish BIOS attributes
> > > > >   - Platform configuration (HII) to
> > > > >     Redfish property information
> > > > >   - Redfish C structure information
> > > > >   - etc.
> > > > >
> > > > > Signed-off-by: Abner Chang <abner.chang@amd.com>
> > > > > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > > > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > > > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > > > > Cc: Nickle Wang <nicklew@nvidia.com>
> > > > > Cc: Igor Kulchytskyy <igork@ami.com>
> > > > > Cc: Isaac Oram <isaac.w.oram@intel.com>
> > > > > Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> > > > > Cc: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
> > > > > ---
> > > > >  MdePkg/MdePkg.dec                 |  1 +
> > > > >  MdePkg/Include/Library/DebugLib.h | 42
> > > > > ++++++++++++++++---------------
> > > > >  2 files changed, 23 insertions(+), 20 deletions(-)
> > > > >
> > > > > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
> > > > > e70182bf7fb..a7566b688d3 100644
> > > > > --- a/MdePkg/MdePkg.dec
> > > > > +++ b/MdePkg/MdePkg.dec
> > > > > @@ -2282,6 +2282,7 @@
> > > > >    #  BIT20 - Global Coherency Database changes message.<BR>
> > > > >    #  BIT21 - Memory range cachability changes message.<BR>
> > > > >    #  BIT22 - Detailed debug message.<BR>
> > > > > +  #  BIT23 - Manageability messages. BR>
> > > > >    #  BIT31 - Error message.<BR>
> > > > >    # @Prompt Debug Message Print Level.
> > > > >    # @Expression  0x80000002 |
> > > > > (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel & 0x7F84AA00)
> > ==
> > > > 0
> > > > > diff --git a/MdePkg/Include/Library/DebugLib.h
> > > > > b/MdePkg/Include/Library/DebugLib.h
> > > > > index 9110be2f41b..12de1584c41 100644
> > > > > --- a/MdePkg/Include/Library/DebugLib.h
> > > > > +++ b/MdePkg/Include/Library/DebugLib.h
> > > > > @@ -29,26 +29,28 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> > > > > // // Declare bits for PcdDebugPrintErrorLevel and the ErrorLevel
> > > > > parameter of DebugPrint()  //
> > > > > -#define DEBUG_INIT      0x00000001  // Initialization
> > > > > -#define DEBUG_WARN      0x00000002  // Warnings
> > > > > -#define DEBUG_LOAD      0x00000004  // Load events
> > > > > -#define DEBUG_FS        0x00000008  // EFI File system
> > > > > -#define DEBUG_POOL      0x00000010  // Alloc & Free (pool)
> > > > > -#define DEBUG_PAGE      0x00000020  // Alloc & Free (page)
> > > > > -#define DEBUG_INFO      0x00000040  // Informational debug messages
> > > > > -#define DEBUG_DISPATCH  0x00000080  // PEI/DXE/SMM Dispatchers
> > > > > -#define DEBUG_VARIABLE  0x00000100  // Variable
> > > > > -#define DEBUG_BM        0x00000400  // Boot Manager
> > > > > -#define DEBUG_BLKIO     0x00001000  // BlkIo Driver
> > > > > -#define DEBUG_NET       0x00004000  // Network Io Driver
> > > > > -#define DEBUG_UNDI      0x00010000  // UNDI Driver
> > > > > -#define DEBUG_LOADFILE  0x00020000  // LoadFile
> > > > > -#define DEBUG_EVENT     0x00080000  // Event messages
> > > > > -#define DEBUG_GCD       0x00100000  // Global Coherency Database
> > > > changes
> > > > > -#define DEBUG_CACHE     0x00200000  // Memory range cachability
> > > > changes
> > > > > -#define DEBUG_VERBOSE   0x00400000  // Detailed debug messages
> > that
> > > > may
> > > > > -                                    // significantly impact boot performance
> > > > > -#define DEBUG_ERROR  0x80000000     // Error
> > > > > +#define DEBUG_INIT           0x00000001  // Initialization
> > > > > +#define DEBUG_WARN           0x00000002  // Warnings
> > > > > +#define DEBUG_LOAD           0x00000004  // Load events
> > > > > +#define DEBUG_FS             0x00000008  // EFI File system
> > > > > +#define DEBUG_POOL           0x00000010  // Alloc & Free (pool)
> > > > > +#define DEBUG_PAGE           0x00000020  // Alloc & Free (page)
> > > > > +#define DEBUG_INFO           0x00000040  // Informational debug
> > messages
> > > > > +#define DEBUG_DISPATCH       0x00000080  // PEI/DXE/SMM
> > Dispatchers
> > > > > +#define DEBUG_VARIABLE       0x00000100  // Variable
> > > > > +#define DEBUG_BM             0x00000400  // Boot Manager
> > > > > +#define DEBUG_BLKIO          0x00001000  // BlkIo Driver
> > > > > +#define DEBUG_NET            0x00004000  // Network Io Driver
> > > > > +#define DEBUG_UNDI           0x00010000  // UNDI Driver
> > > > > +#define DEBUG_LOADFILE       0x00020000  // LoadFile
> > > > > +#define DEBUG_EVENT          0x00080000  // Event messages
> > > > > +#define DEBUG_GCD            0x00100000  // Global Coherency Database
> > > > changes
> > > > > +#define DEBUG_CACHE          0x00200000  // Memory range cachability
> > > > changes
> > > > > +#define DEBUG_VERBOSE        0x00400000  // Detailed debug
> > messages
> > > > that may
> > > > > +                                         // significantly impact
> > > > > +boot performance #define DEBUG_MANAGEABILITY  0x00800000  //
> > > > > +Detailed
> > > > debug and payload message of manageability
> > > > > +                                         // related modules, such Redfish, IPMI, MCTP and
> > etc.
> > > > > +#define DEBUG_ERROR          0x80000000  // Error
> > > > >
> > > > >  //
> > > > >  // Aliases of debug message mask bits
> > > > > --
> > > > > 2.37.1.windows.1
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-21 15:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-18  9:04 [PATCH] MdePkg: Add DEBUG_MANAGEABILITY print error level Chang, Abner
2023-04-18 17:55 ` Michael D Kinney
2023-04-19  2:06   ` Chang, Abner
2023-04-20 21:08     ` [edk2-devel] " Michael D Kinney
2023-04-21  8:09       ` Chang, Abner
2023-04-21 15:44         ` Michael D Kinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox