public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms][PATCH 1/2] ManageabilityPkg: Replace __FUNCTION__ with __func__
@ 2023-05-30  6:33 Chang, Abner
  2023-05-30  6:33 ` [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use DEBUG_MANAGEABILITY Chang, Abner
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Chang, Abner @ 2023-05-30  6:33 UTC (permalink / raw)
  To: devel; +Cc: Isaac Oram, Abdul Lateef Attar, Nickle Wang, Tinh Nguyen

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

Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Abdul Lateef Attar <abdattar@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
---
 .../BaseManageabilityTransportHelper.c        | 36 +++++++++----------
 .../Common/KcsCommon.c                        | 12 +++----
 .../Dxe/ManageabilityTransportKcs.c           | 28 +++++++--------
 .../Dxe/ManageabilityTransportMctp.c          | 22 ++++++------
 .../PldmProtocolLibrary/Dxe/PldmProtocolLib.c |  4 +--
 .../IpmiProtocol/Common/IpmiProtocolCommon.c  | 14 ++++----
 .../Universal/IpmiProtocol/Dxe/IpmiProtocol.c | 14 ++++----
 .../Universal/IpmiProtocol/Pei/IpmiPpi.c      | 18 +++++-----
 .../Universal/IpmiProtocol/Smm/IpmiProtocol.c | 14 ++++----
 .../MctpProtocol/Common/MctpProtocolCommon.c  | 30 ++++++++--------
 .../Universal/MctpProtocol/Dxe/MctpProtocol.c | 18 +++++-----
 .../PldmProtocol/Common/PldmProtocolCommon.c  | 20 +++++------
 .../Universal/PldmProtocol/Dxe/PldmProtocol.c | 14 ++++----
 .../PldmSmbiosTransferDxe.c                   | 22 ++++++------
 14 files changed, 133 insertions(+), 133 deletions(-)

diff --git a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c
index ce68f89531..f72957ea7f 100644
--- a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c
+++ b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c
@@ -49,7 +49,7 @@ HelperManageabilitySpecName (
   }
 
   if ((SpecificationGuid == NULL) || IsZeroGuid (SpecificationGuid)) {
-    DEBUG ((DEBUG_ERROR, "%a: Improper input GUIDs, could be NULL or zero GUID.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Improper input GUIDs, could be NULL or zero GUID.\n", __func__));
     return NULL;
   }
 
@@ -106,7 +106,7 @@ HelperManageabilityCheckSupportedSpec (
       IsZeroGuid (ManageabilityProtocolToCheck)
       )
   {
-    DEBUG ((DEBUG_ERROR, "%a: Improper input GUIDs, could be NULL or zero GUID.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Improper input GUIDs, could be NULL or zero GUID.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
@@ -120,7 +120,7 @@ HelperManageabilityCheckSupportedSpec (
       DEBUG ((
         DEBUG_MANAGEABILITY_INFO,
         "%a: Transport interface %s supports %s manageability specification.\n",
-        __FUNCTION__,
+        __func__,
         HelperManageabilitySpecName (TransportGuid),
         HelperManageabilitySpecName (ManageabilityProtocolToCheck)
         ));
@@ -133,7 +133,7 @@ HelperManageabilityCheckSupportedSpec (
   DEBUG ((
     DEBUG_ERROR,
     "%a: Transport interface %s doesn't support %s manageability specification.\n",
-    __FUNCTION__,
+    __func__,
     HelperManageabilitySpecName (TransportGuid),
     HelperManageabilitySpecName (ManageabilityProtocolToCheck)
     ));
@@ -163,16 +163,16 @@ HelperAcquireManageabilityTransport (
   CHAR16      *ManageabilityProtocolName;
   CHAR16      *ManageabilityTransportName;
 
-  DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
   if ((TransportToken == NULL) || (ManageabilityProtocolSpec == NULL)) {
-    DEBUG ((DEBUG_ERROR, "%a: One of the required input parameters is NULL.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: One of the required input parameters is NULL.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
   *TransportToken           = NULL;
   ManageabilityProtocolName = HelperManageabilitySpecName (ManageabilityProtocolSpec);
   if (ManageabilityProtocolName == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Unsupported Manageability Protocol Specification.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Unsupported Manageability Protocol Specification.\n", __func__));
     return EFI_UNSUPPORTED;
   }
 
@@ -180,7 +180,7 @@ HelperAcquireManageabilityTransport (
 
   Status = AcquireTransportSession (ManageabilityProtocolSpec, TransportToken);
   if (Status == EFI_UNSUPPORTED) {
-    DEBUG ((DEBUG_ERROR, "%a: No supported transport interface for %s packet.\n", __FUNCTION__, ManageabilityProtocolName));
+    DEBUG ((DEBUG_ERROR, "%a: No supported transport interface for %s packet.\n", __func__, ManageabilityProtocolName));
     return Status;
   }
 
@@ -188,7 +188,7 @@ HelperAcquireManageabilityTransport (
     DEBUG ((
       DEBUG_ERROR,
       "%a: Fail to acquire Manageability transport token for %s (%r).\n",
-      __FUNCTION__,
+      __func__,
       ManageabilityProtocolName,
       Status
       ));
@@ -197,11 +197,11 @@ HelperAcquireManageabilityTransport (
 
   ManageabilityTransportName = HelperManageabilitySpecName ((*TransportToken)->Transport->ManageabilityTransportSpecification);
   if (ManageabilityTransportName == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Unsupported Manageability Transport Interface Specification\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Unsupported Manageability Transport Interface Specification\n", __func__));
     return EFI_UNSUPPORTED;
   }
 
-  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: This is the transfer session for %s over %s\n", __FUNCTION__, ManageabilityProtocolName, ManageabilityTransportName));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: This is the transfer session for %s over %s\n", __func__, ManageabilityProtocolName, ManageabilityTransportName));
   return Status;
 }
 
@@ -227,7 +227,7 @@ HelperInitManageabilityTransport (
   EFI_STATUS  Status;
 
   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: TransportToken is invalid.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: TransportToken is invalid.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
@@ -242,20 +242,20 @@ HelperInitManageabilityTransport (
                                                                  );
       if (EFI_ERROR (Status)) {
         if (Status == EFI_UNSUPPORTED) {
-          DEBUG ((DEBUG_ERROR, "%a: Transport interface doesn't have reset capability.\n", __FUNCTION__));
+          DEBUG ((DEBUG_ERROR, "%a: Transport interface doesn't have reset capability.\n", __func__));
         } else {
-          DEBUG ((DEBUG_ERROR, "%a: Fail to reset transport interface (%r).\n", __FUNCTION__, Status));
+          DEBUG ((DEBUG_ERROR, "%a: Fail to reset transport interface (%r).\n", __func__, Status));
         }
 
         Status = EFI_DEVICE_ERROR;
       } else {
         Status = TransportToken->Transport->Function.Version1_0->TransportInit (TransportToken, HardwareInfo);
         if (EFI_ERROR (Status)) {
-          DEBUG ((DEBUG_ERROR, "%a: Transport interface is not able to use after the reset (%r).\n", __FUNCTION__, Status));
+          DEBUG ((DEBUG_ERROR, "%a: Transport interface is not able to use after the reset (%r).\n", __func__, Status));
         }
       }
     } else {
-      DEBUG ((DEBUG_ERROR, "%a: Transport interface is not able to use (%r).\n", __FUNCTION__, Status));
+      DEBUG ((DEBUG_ERROR, "%a: Transport interface is not able to use (%r).\n", __func__, Status));
     }
   }
 
@@ -343,7 +343,7 @@ HelperManageabilitySplitPayload (
     DEBUG ((
       DEBUG_ERROR,
       "%a: (Preamble 0x%x + PostambleSize 0x%x) is greater than MaximumTransferUnit 0x%x.\n",
-      __FUNCTION__,
+      __func__,
       PreambleSize,
       PostambleSize,
       MaximumTransferUnit
@@ -373,7 +373,7 @@ HelperManageabilitySplitPayload (
   }
 
   if (TotalPayloadRemaining != 0) {
-    DEBUG ((DEBUG_ERROR, "%a: Error processing multiple packages (TotalPayloadRemaining != 0)\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Error processing multiple packages (TotalPayloadRemaining != 0)\n", __func__));
     FreePool (ThisMultiplePackages);
     return EFI_INVALID_PARAMETER;
   }
diff --git a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Common/KcsCommon.c b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Common/KcsCommon.c
index 4693e7f06f..d5b54c04be 100644
--- a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Common/KcsCommon.c
+++ b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Common/KcsCommon.c
@@ -143,7 +143,7 @@ KcsTransportWrite (
       ((RequestData != NULL) && (RequestDataSize == 0))
       )
   {
-    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of RequestData or RequestDataSize.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of RequestData or RequestDataSize.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
@@ -152,7 +152,7 @@ KcsTransportWrite (
       ((TransmitHeader != NULL) && (TransmitHeaderSize == 0))
       )
   {
-    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of TransmitHeader or TransmitHeaderSize.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of TransmitHeader or TransmitHeaderSize.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
@@ -161,7 +161,7 @@ KcsTransportWrite (
       ((TransmitTrailer != NULL) && (TransmitTrailerSize == 0))
       )
   {
-    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of TransmitTrailer or TransmitTrailerSize.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of TransmitTrailer or TransmitTrailerSize.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
@@ -325,7 +325,7 @@ KcsTransportRead (
   UINT32      ReadLength;
 
   if ((DataByte == NULL) || (*Length == 0)) {
-    DEBUG ((DEBUG_ERROR, "%a: Either DataByte is NULL or Length is 0.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Either DataByte is NULL or Length is 0.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
@@ -430,12 +430,12 @@ KcsTransportSendCommand (
   CHAR16                    *CompletionCodeStr;
 
   if ((RequestData != NULL) && (RequestDataSize == 0)) {
-    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of RequestData and RequestDataSize\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of RequestData and RequestDataSize\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
   if ((ResponseData != NULL) && ((ResponseDataSize != NULL) && (*ResponseDataSize == 0))) {
-    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of ResponseData and ResponseDataSize\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of ResponseData and ResponseDataSize\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
diff --git a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/ManageabilityTransportKcs.c b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/ManageabilityTransportKcs.c
index c690bea74e..9bd8ff4c0a 100644
--- a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/ManageabilityTransportKcs.c
+++ b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/ManageabilityTransportKcs.c
@@ -58,12 +58,12 @@ KcsTransportInit (
   CHAR16  *ManageabilityProtocolName;
 
   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
   if (HardwareInfo.Kcs == NULL) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Hardware information is not provided, use dfault settings.\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Hardware information is not provided, use dfault settings.\n", __func__));
     mKcsHardwareInfo.MemoryMap                    = MANAGEABILITY_TRANSPORT_KCS_IO_MAP_IO;
     mKcsHardwareInfo.IoBaseAddress.IoAddress16    = PcdGet16 (PcdIpmiKcsIoBaseAddress);
     mKcsHardwareInfo.IoDataInAddress.IoAddress16  = mKcsHardwareInfo.IoBaseAddress.IoAddress16 + IPMI_KCS_DATA_IN_REGISTER_OFFSET;
@@ -82,9 +82,9 @@ KcsTransportInit (
   // Get protocol specification name.
   ManageabilityProtocolName = HelperManageabilitySpecName (TransportToken->ManageabilityProtocolSpecification);
 
-  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: KCS transport hardware for %s is:\n", __FUNCTION__, ManageabilityProtocolName));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: KCS transport hardware for %s is:\n", __func__, ManageabilityProtocolName));
   if (mKcsHardwareInfo.MemoryMap) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "Memory Map I/O\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "Memory Map I/O\n", __func__));
     DEBUG ((DEBUG_MANAGEABILITY_INFO, "Base Memory Address : 0x%08x\n", mKcsHardwareInfo.IoBaseAddress.IoAddress32));
     DEBUG ((DEBUG_MANAGEABILITY_INFO, "Data in Address     : 0x%08x\n", mKcsHardwareInfo.IoDataInAddress.IoAddress32));
     DEBUG ((DEBUG_MANAGEABILITY_INFO, "Data out Address    : 0x%08x\n", mKcsHardwareInfo.IoDataOutAddress.IoAddress32));
@@ -134,7 +134,7 @@ KcsTransportStatus (
   UINT8  TransportStatus;
 
   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
@@ -223,7 +223,7 @@ KcsTransportTransmitReceive (
   MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS  AdditionalStatus;
 
   if ((TransportToken == NULL) || (TransferToken == NULL)) {
-    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token or transfer token.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token or transfer token.\n", __func__));
     return;
   }
 
@@ -267,12 +267,12 @@ AcquireTransportSession (
   MANAGEABILITY_TRANSPORT_KCS  *KcsTransportToken;
 
   if (ManageabilityProtocolSpec == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: No Manageability protocol specification specified.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No Manageability protocol specification specified.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: TransportToken is NULL.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: TransportToken is NULL.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
@@ -283,25 +283,25 @@ AcquireTransportSession (
              ManageabilityProtocolSpec
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Protocol is not supported on this transport interface.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Protocol is not supported on this transport interface.\n", __func__));
     return EFI_UNSUPPORTED;
   }
 
   if (mSingleSessionToken != NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: This manageability transport library only supports one session transport token.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: This manageability transport library only supports one session transport token.\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }
 
   KcsTransportToken = AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT_KCS));
   if (KcsTransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_KCS\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_KCS\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }
 
   KcsTransportToken->Token.Transport = AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT));
   if (KcsTransportToken->Token.Transport == NULL) {
     FreePool (KcsTransportToken);
-    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }
 
@@ -312,7 +312,7 @@ AcquireTransportSession (
   KcsTransportToken->Token.Transport->TransportName                       = L"KCS";
   KcsTransportToken->Token.Transport->Function.Version1_0                 = AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT_FUNCTION_V1_0));
   if (KcsTransportToken->Token.Transport->Function.Version1_0 == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_FUNCTION_V1_0\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_FUNCTION_V1_0\n", __func__));
     FreePool (KcsTransportToken);
     FreePool (KcsTransportToken->Token.Transport);
     return EFI_OUT_OF_RESOURCES;
@@ -406,7 +406,7 @@ ReleaseTransportSession (
   }
 
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to release KCS transport token (%r).\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to release KCS transport token (%r).\n", __func__, Status));
   }
 
   return Status;
diff --git a/Features/ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/ManageabilityTransportMctp.c b/Features/ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/ManageabilityTransportMctp.c
index eaf02bbb0a..c520e2302d 100644
--- a/Features/ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/ManageabilityTransportMctp.c
+++ b/Features/ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/ManageabilityTransportMctp.c
@@ -86,7 +86,7 @@ MctpTransportStatus (
   )
 {
   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
@@ -161,7 +161,7 @@ MctpTransportTransmitReceive (
   MANAGEABILITY_MCTP_TRANSPORT_HEADER  *TransmitHeader;
 
   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __func__));
     TransferToken->TransportAdditionalStatus = MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_NOT_AVAILABLE;
     return;
   }
@@ -183,7 +183,7 @@ MctpTransportTransmitReceive (
       //
       // Dxe MCTP Protocol is not installed.
       //
-      DEBUG ((DEBUG_ERROR, "%a: EDKII MCTP protocol is not found - %r\n", __FUNCTION__, Status));
+      DEBUG ((DEBUG_ERROR, "%a: EDKII MCTP protocol is not found - %r\n", __func__, Status));
       return;
     }
   }
@@ -191,7 +191,7 @@ MctpTransportTransmitReceive (
   DEBUG ((
     DEBUG_MANAGEABILITY_INFO,
     "%a: MCTP message type: 0x%x, SourceEndpointId: 0x%x, DestinationEndpointId: 0x%x\n",
-    __FUNCTION__,
+    __func__,
     TransmitHeader->MessageHeader.MessageType,
     TransmitHeader->SourceEndpointId,
     TransmitHeader->DestinationEndpointId
@@ -242,7 +242,7 @@ AcquireTransportSession (
   MANAGEABILITY_TRANSPORT_MCTP  *MctpTransportToken;
 
   if (ManageabilityProtocolSpec == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: No Manageability protocol specification specified.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No Manageability protocol specification specified.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
@@ -253,25 +253,25 @@ AcquireTransportSession (
              ManageabilityProtocolSpec
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Protocol is not supported on this transport interface.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Protocol is not supported on this transport interface.\n", __func__));
     return EFI_UNSUPPORTED;
   }
 
   if (mSingleSessionToken != NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: This manageability transport library only supports one session transport token.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: This manageability transport library only supports one session transport token.\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }
 
   MctpTransportToken = (MANAGEABILITY_TRANSPORT_MCTP *)AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT_MCTP));
   if (MctpTransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_MCTP\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_MCTP\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }
 
   MctpTransportToken->Token.Transport = AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT));
   if (MctpTransportToken->Token.Transport == NULL) {
     FreePool (MctpTransportToken);
-    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }
 
@@ -282,7 +282,7 @@ AcquireTransportSession (
   MctpTransportToken->Token.Transport->TransportName                       = L"MCTP";
   MctpTransportToken->Token.Transport->Function.Version1_0                 = AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT_FUNCTION_V1_0));
   if (MctpTransportToken->Token.Transport->Function.Version1_0 == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_FUNCTION_V1_0\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_FUNCTION_V1_0\n", __func__));
     FreePool (MctpTransportToken);
     FreePool (MctpTransportToken->Token.Transport);
     return EFI_OUT_OF_RESOURCES;
@@ -360,7 +360,7 @@ ReleaseTransportSession (
   }
 
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to release MCTP transport token (%r).\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to release MCTP transport token (%r).\n", __func__, Status));
   }
 
   return Status;
diff --git a/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtocolLib.c b/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtocolLib.c
index 96727054ce..267bd8fbc1 100644
--- a/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtocolLib.c
+++ b/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtocolLib.c
@@ -55,12 +55,12 @@ PldmSubmitCommand (
       //
       // Dxe PLDM Protocol is not installed. So, PLDM device is not present.
       //
-      DEBUG ((DEBUG_ERROR, "%a: EDKII PLDM protocol is not found - %r\n", __FUNCTION__, Status));
+      DEBUG ((DEBUG_ERROR, "%a: EDKII PLDM protocol is not found - %r\n", __func__, Status));
       return EFI_NOT_FOUND;
     }
   }
 
-  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: PLDM Type: 0x%x, Command: 0x%x\n", __FUNCTION__, PldmType, Command));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: PLDM Type: 0x%x, Command: 0x%x\n", __func__, PldmType, Command));
   if ((RequestData != NULL) && (RequestDataSize != 0)) {
     HelperManageabilityDebugPrint ((VOID *)RequestData, RequestDataSize, "PLDM PLDM application layer Type/Command specific request payload\n");
   }
diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolCommon.c b/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolCommon.c
index b055bad7da..6a09280bcc 100644
--- a/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolCommon.c
+++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolCommon.c
@@ -39,7 +39,7 @@ SetupIpmiTransportHardwareInformation (
 
   KcsHardwareInfo = AllocatePool (sizeof (MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO));
   if (KcsHardwareInfo == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO.\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }
 
@@ -54,7 +54,7 @@ SetupIpmiTransportHardwareInformation (
     HardwareInformation->Kcs                      = KcsHardwareInfo;
     return EFI_SUCCESS;
   } else {
-    DEBUG ((DEBUG_ERROR, "%a: No implementation of setting hardware information.", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No implementation of setting hardware information.", __func__));
     ASSERT (FALSE);
   }
 
@@ -131,7 +131,7 @@ SetupIpmiRequestTransportPacket (
       *PacketBodySize = 0;
     }
   } else {
-    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.", __func__));
     ASSERT (FALSE);
   }
 
@@ -179,7 +179,7 @@ CommonIpmiSubmitCommand (
   UINT16                                     TrailerSize;
 
   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: No transport toke for IPMI\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No transport toke for IPMI\n", __func__));
     return EFI_UNSUPPORTED;
   }
 
@@ -188,7 +188,7 @@ CommonIpmiSubmitCommand (
                                                              &TransportAdditionalStatus
                                                              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Transport for IPMI has problem - (%r)\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Transport for IPMI has problem - (%r)\n", __func__, Status));
     return Status;
   }
 
@@ -208,7 +208,7 @@ CommonIpmiSubmitCommand (
                            &TrailerSize
                            );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __func__, Status));
     return Status;
   }
 
@@ -256,7 +256,7 @@ CommonIpmiSubmitCommand (
   Status                    = TransferToken.TransferStatus;
   TransportAdditionalStatus = TransferToken.TransportAdditionalStatus;
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to send IPMI command.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to send IPMI command.\n", __func__));
     return Status;
   }
 
diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocol.c b/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocol.c
index 51d5c7f0ba..1660cfbbd5 100644
--- a/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocol.c
+++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocol.c
@@ -97,26 +97,26 @@ DxeIpmiEntry (
              &mTransportToken
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI protocol - %r\n", __func__, Status));
     return Status;
   }
 
   Status = GetTransportCapability (mTransportToken, &TransportCapability);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __func__));
     return Status;
   }
 
   TransportMaximumPayload = MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY (TransportCapability);
   if (TransportMaximumPayload == (1 << MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILABLE)) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __func__));
   } else {
     TransportMaximumPayload -= 1;
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI protocol has maximum payload %x.\n", __FUNCTION__, TransportMaximumPayload));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI protocol has maximum payload %x.\n", __func__, TransportMaximumPayload));
   }
 
   mTransportName = HelperManageabilitySpecName (mTransportToken->Transport->ManageabilityTransportSpecification);
-  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n", __FUNCTION__, mTransportName));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n", __func__, mTransportName));
 
   //
   // Setup hardware information according to the transport interface.
@@ -126,7 +126,7 @@ DxeIpmiEntry (
              );
   if (EFI_ERROR (Status)) {
     if (Status == EFI_UNSUPPORTED) {
-      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __FUNCTION__, mTransportName));
+      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __func__, mTransportName));
     }
 
     return Status;
@@ -151,7 +151,7 @@ DxeIpmiEntry (
                   (VOID **)&mIpmiProtocol
                   );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI protocol - %r\n", __func__, Status));
   }
 
   return Status;
diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c b/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c
index 4bbdbf78fe..a6bdb27464 100644
--- a/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c
+++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c
@@ -96,13 +96,13 @@ PeiIpmiEntry (
   //
   PeiIpmiPpiinternal = (PEI_IPMI_PPI_INTERNAL *)AllocateZeroPool (sizeof (PEI_IPMI_PPI_INTERNAL));
   if (PeiIpmiPpiinternal == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for PEI_IPMI_PPI_INTERNAL.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for PEI_IPMI_PPI_INTERNAL.\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }
 
   PpiDescriptor = (EFI_PEI_PPI_DESCRIPTOR *)AllocateZeroPool (sizeof (EFI_PEI_PPI_DESCRIPTOR));
   if (PpiDescriptor == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for EFI_PEI_PPI_DESCRIPTOR.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for EFI_PEI_PPI_DESCRIPTOR.\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }
 
@@ -118,26 +118,26 @@ PeiIpmiEntry (
              &PeiIpmiPpiinternal->TransportToken
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI protocol - %r\n", __func__, Status));
     return Status;
   }
 
   Status = GetTransportCapability (PeiIpmiPpiinternal->TransportToken, &PeiIpmiPpiinternal->TransportCapability);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __func__));
     return Status;
   }
 
   PeiIpmiPpiinternal->TransportMaximumPayload = MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY (PeiIpmiPpiinternal->TransportCapability);
   if (PeiIpmiPpiinternal->TransportMaximumPayload  == (1 << MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILABLE)) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __func__));
   } else {
     PeiIpmiPpiinternal->TransportMaximumPayload -= 1;
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI protocol has maximum payload 0x%x.\n", __FUNCTION__, PeiIpmiPpiinternal->TransportMaximumPayload));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI protocol has maximum payload 0x%x.\n", __func__, PeiIpmiPpiinternal->TransportMaximumPayload));
   }
 
   TransportName = HelperManageabilitySpecName (PeiIpmiPpiinternal->TransportToken->Transport->ManageabilityTransportSpecification);
-  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n", __FUNCTION__, TransportName));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n", __func__, TransportName));
 
   //
   // Setup hardware information according to the transport interface.
@@ -147,7 +147,7 @@ PeiIpmiEntry (
              );
   if (EFI_ERROR (Status)) {
     if (Status == EFI_UNSUPPORTED) {
-      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __FUNCTION__, TransportName));
+      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __func__, TransportName));
     }
 
     return Status;
@@ -169,7 +169,7 @@ PeiIpmiEntry (
   //
   Status = PeiServicesInstallPpi (PpiDescriptor);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI PPI - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI PPI - %r\n", __func__, Status));
   }
 
   return Status;
diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocol.c b/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocol.c
index e4cd166b7a..aaa48b24e2 100644
--- a/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocol.c
+++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocol.c
@@ -98,26 +98,26 @@ SmmIpmiEntry (
              &mTransportToken
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI protocol - %r\n", __func__, Status));
     return Status;
   }
 
   Status = GetTransportCapability (mTransportToken, &TransportCapability);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __func__));
     return Status;
   }
 
   TransportMaximumPayload = MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY (TransportCapability);
   if (TransportMaximumPayload == (1 << MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILABLE)) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __func__));
   } else {
     TransportMaximumPayload -= 1;
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI protocol has maximum payload 0x%x.\n", __FUNCTION__, TransportMaximumPayload));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI protocol has maximum payload 0x%x.\n", __func__, TransportMaximumPayload));
   }
 
   mTransportName = HelperManageabilitySpecName (mTransportToken->Transport->ManageabilityTransportSpecification);
-  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n", __FUNCTION__, mTransportName));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n", __func__, mTransportName));
 
   //
   // Setup hardware information according to the transport interface.
@@ -127,7 +127,7 @@ SmmIpmiEntry (
              );
   if (EFI_ERROR (Status)) {
     if (Status == EFI_UNSUPPORTED) {
-      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __FUNCTION__, mTransportName));
+      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __func__, mTransportName));
     }
 
     return Status;
@@ -152,7 +152,7 @@ SmmIpmiEntry (
                     (VOID **)&mIpmiProtocol
                     );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI SMM protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI SMM protocol - %r\n", __func__, Status));
   }
 
   return Status;
diff --git a/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c b/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c
index db572ec85a..1ad48efdc7 100644
--- a/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c
+++ b/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c
@@ -52,7 +52,7 @@ SetupMctpTransportHardwareInformation (
   if (CompareGuid (&gManageabilityTransportKcsGuid, TransportToken->Transport->ManageabilityTransportSpecification)) {
     KcsHardwareInfo = AllocatePool (sizeof (MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO));
     if (KcsHardwareInfo == NULL) {
-      DEBUG ((DEBUG_ERROR, "%a: Not enough memory for MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO.\n", __FUNCTION__));
+      DEBUG ((DEBUG_ERROR, "%a: Not enough memory for MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO.\n", __func__));
       return EFI_OUT_OF_RESOURCES;
     }
 
@@ -76,7 +76,7 @@ SetupMctpTransportHardwareInformation (
     HardwareInformation->Kcs = KcsHardwareInfo;
     return EFI_SUCCESS;
   } else {
-    DEBUG ((DEBUG_ERROR, "%a: No implementation of setting hardware information.", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No implementation of setting hardware information.", __func__));
     ASSERT (FALSE);
   }
 
@@ -140,20 +140,20 @@ SetupMctpRequestTransportPacket (
       (PacketTrailer == NULL) || (PacketTrailerSize == NULL)
       )
   {
-    DEBUG ((DEBUG_ERROR, "%a: One or more than one of the input parameter is invalid.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: One or more than one of the input parameter is invalid.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
   if (CompareGuid (&gManageabilityTransportKcsGuid, TransportToken->Transport->ManageabilityTransportSpecification)) {
     MctpKcsHeader = (MANAGEABILITY_MCTP_KCS_HEADER *)AllocateZeroPool (sizeof (MANAGEABILITY_MCTP_KCS_HEADER));
     if (MctpKcsHeader == NULL) {
-      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for MANAGEABILITY_MCTP_KCS_HEADER.\n", __FUNCTION__));
+      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for MANAGEABILITY_MCTP_KCS_HEADER.\n", __func__));
       return EFI_OUT_OF_RESOURCES;
     }
 
     Pec = (UINT8 *)AllocateZeroPool (sizeof (UINT8));
     if (Pec == NULL) {
-      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for PEC.\n", __FUNCTION__));
+      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for PEC.\n", __func__));
       FreePool (MctpKcsHeader);
       return EFI_OUT_OF_RESOURCES;
     }
@@ -165,7 +165,7 @@ SetupMctpRequestTransportPacket (
 
     ThisPackage = (UINT8 *)AllocateZeroPool (MctpKcsHeader->ByteCount);
     if (ThisPackage == NULL) {
-      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for package.\n", __FUNCTION__));
+      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for package.\n", __func__));
       FreePool (MctpKcsHeader);
       FreePool (Pec);
       return EFI_OUT_OF_RESOURCES;
@@ -203,7 +203,7 @@ SetupMctpRequestTransportPacket (
     *PacketTrailerSize = 1;
     return EFI_SUCCESS;
   } else {
-    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.", __func__));
     ASSERT (FALSE);
   }
 
@@ -269,7 +269,7 @@ CommonMctpSubmitMessage (
   MANAGEABILITY_TRANSMISSION_PACKAGE_ATTR    *ThisPackage;
 
   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: No transport toke for MCTP\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No transport toke for MCTP\n", __func__));
     return EFI_UNSUPPORTED;
   }
 
@@ -278,7 +278,7 @@ CommonMctpSubmitMessage (
                                                              AdditionalTransferError
                                                              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Transport %s for MCTP has problem - (%r)\n", __FUNCTION__, mTransportName, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Transport %s for MCTP has problem - (%r)\n", __func__, mTransportName, Status));
     return Status;
   }
 
@@ -292,7 +292,7 @@ CommonMctpSubmitMessage (
                     &MultiPackages
                     );
   if (EFI_ERROR (Status) || (MultiPackages == NULL)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fails to split payload into multiple packages - (%r)\n", __FUNCTION__, mTransportName, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Fails to split payload into multiple packages - (%r)\n", __func__, mTransportName, Status));
     return Status;
   }
 
@@ -342,7 +342,7 @@ CommonMctpSubmitMessage (
                &MctpTransportTrailerSize
                );
     if (EFI_ERROR (Status)) {
-      DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __FUNCTION__, Status));
+      DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __func__, Status));
       return Status;
     }
 
@@ -373,7 +373,7 @@ CommonMctpSubmitMessage (
     DEBUG ((
       DEBUG_MANAGEABILITY_INFO,
       "%a: Send MCTP message type: 0x%x, from source endpoint ID: 0x%x to destination ID 0x%x: Request size: 0x%x, Response size: 0x%x\n",
-      __FUNCTION__,
+      __func__,
       MctpType,
       MctpSourceEndpointId,
       MctpDestinationEndpointId,
@@ -426,7 +426,7 @@ CommonMctpSubmitMessage (
     Status                   = TransferToken.TransferStatus;
     *AdditionalTransferError = TransferToken.TransportAdditionalStatus;
     if (EFI_ERROR (Status)) {
-      DEBUG ((DEBUG_ERROR, "%a: Failed to send MCTP command over %s\n", __FUNCTION__, mTransportName));
+      DEBUG ((DEBUG_ERROR, "%a: Failed to send MCTP command over %s\n", __func__, mTransportName));
       FreePool (MultiPackages);
       return Status;
     }
@@ -449,7 +449,7 @@ CommonMctpSubmitMessage (
   DEBUG ((
     DEBUG_MANAGEABILITY_INFO,
     "%a: Retrieve MCTP message Response size: 0x%x\n",
-    __FUNCTION__,
+    __func__,
     TransferToken.ReceivePackage.ReceiveSizeInByte
     ));
   TransportToken->Transport->Function.Version1_0->TransportTransmitReceive (
@@ -464,7 +464,7 @@ CommonMctpSubmitMessage (
   *ResponseDataSize        = TransferToken.ReceivePackage.ReceiveSizeInByte;
   Status                   = TransferToken.TransferStatus;
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to send MCTP command over %s: %r\n", __FUNCTION__, mTransportName, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to send MCTP command over %s: %r\n", __func__, mTransportName, Status));
     return Status;
   }
 
diff --git a/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c b/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c
index a1cac61e27..88bfd9b7e7 100644
--- a/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c
+++ b/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c
@@ -74,7 +74,7 @@ MctpSubmitMessage (
   EFI_STATUS  Status;
 
   if ((RequestData == NULL) && (ResponseData == NULL)) {
-    DEBUG ((DEBUG_ERROR, "%a: Both RequestData and ResponseData are NULL\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Both RequestData and ResponseData are NULL\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
@@ -127,26 +127,26 @@ DxeMctpEntry (
              &mTransportToken
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for MCTP protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for MCTP protocol - %r\n", __func__, Status));
     return Status;
   }
 
   Status = GetTransportCapability (mTransportToken, &TransportCapability);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __func__));
     return Status;
   }
 
   mTransportMaximumPayload = MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY (TransportCapability);
   if (mTransportMaximumPayload == (1 << MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILABLE)) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __func__));
   } else {
     mTransportMaximumPayload -= 1;
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for MCTP protocol has maximum payload 0x%x.\n", __FUNCTION__, mTransportMaximumPayload));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for MCTP protocol has maximum payload 0x%x.\n", __func__, mTransportMaximumPayload));
   }
 
   mTransportName = HelperManageabilitySpecName (mTransportToken->Transport->ManageabilityTransportSpecification);
-  DEBUG ((DEBUG_ERROR, "%a: MCTP protocol over %s.\n", __FUNCTION__, mTransportName));
+  DEBUG ((DEBUG_ERROR, "%a: MCTP protocol over %s.\n", __func__, mTransportName));
 
   //
   // Setup hardware information according to the transport interface.
@@ -156,9 +156,9 @@ DxeMctpEntry (
              );
   if (EFI_ERROR (Status)) {
     if (Status == EFI_UNSUPPORTED) {
-      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __FUNCTION__, mTransportName));
+      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __func__, mTransportName));
     } else {
-      DEBUG ((DEBUG_ERROR, "%a: Failed to setup hardware information of %s transport interface.\n", __FUNCTION__, mTransportName));
+      DEBUG ((DEBUG_ERROR, "%a: Failed to setup hardware information of %s transport interface.\n", __func__, mTransportName));
     }
 
     return Status;
@@ -184,7 +184,7 @@ DxeMctpEntry (
                                               (VOID **)&mMctpProtocol
                                               );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to install EDKII MCTP protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to install EDKII MCTP protocol - %r\n", __func__, Status));
   }
 
   return Status;
diff --git a/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolCommon.c b/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolCommon.c
index bb4d3f61a0..ce1e2cba95 100644
--- a/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolCommon.c
+++ b/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolCommon.c
@@ -104,17 +104,17 @@ SetupPldmRequestTransportPacket (
       (PacketTrailer == NULL) || (PacketTrailerSize == NULL)
       )
   {
-    DEBUG ((DEBUG_ERROR, "%a: One or more than one of the required parameters is NULL.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: One or more than one of the required parameters is NULL.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
   if (CompareGuid (&gManageabilityTransportMctpGuid, TransportToken->Transport->ManageabilityTransportSpecification)) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Setup transport header for PLDM over MCTP.\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Setup transport header for PLDM over MCTP.\n", __func__));
 
     // This is MCTP transport interface.
     MctpHeader = AllocateZeroPool (sizeof (MANAGEABILITY_MCTP_TRANSPORT_HEADER));
     if (MctpHeader == NULL) {
-      DEBUG ((DEBUG_ERROR, "%a: Not enough memory for MANAGEABILITY_MCTP_TRANSPORT_HEADER.\n", __FUNCTION__));
+      DEBUG ((DEBUG_ERROR, "%a: Not enough memory for MANAGEABILITY_MCTP_TRANSPORT_HEADER.\n", __func__));
       return EFI_OUT_OF_RESOURCES;
     }
 
@@ -127,7 +127,7 @@ SetupPldmRequestTransportPacket (
     *PacketTrailer                           = NULL;
     *PacketTrailerSize                       = 0;
   } else {
-    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.\n", __func__));
     ASSERT (FALSE);
   }
 
@@ -136,7 +136,7 @@ SetupPldmRequestTransportPacket (
   //
   PldmRequestHeader = (PLDM_REQUEST_HEADER *)AllocateZeroPool (sizeof (PLDM_REQUEST_HEADER) + *PacketBodySize);
   if (PldmRequestHeader == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for final PLDM request message.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for final PLDM request message.\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }
 
@@ -202,7 +202,7 @@ CommonPldmSubmitCommand (
   UINT16                                     TrailerSize;
 
   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: No transport token for PLDM\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No transport token for PLDM\n", __func__));
     return EFI_UNSUPPORTED;
   }
 
@@ -211,7 +211,7 @@ CommonPldmSubmitCommand (
                                                              &TransportAdditionalStatus
                                                              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Transport %s for PLDM has problem - (%r)\n", __FUNCTION__, mTransportName, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Transport %s for PLDM has problem - (%r)\n", __func__, mTransportName, Status));
     return Status;
   }
 
@@ -233,7 +233,7 @@ CommonPldmSubmitCommand (
                            &TrailerSize
                            );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __func__, Status));
     return Status;
   }
 
@@ -274,7 +274,7 @@ CommonPldmSubmitCommand (
   DEBUG ((
     DEBUG_MANAGEABILITY_INFO,
     "%a: Send PLDM type: 0x%x, Command: 0x%x: Request size: 0x%x, Response size: 0x%x\n",
-    __FUNCTION__,
+    __func__,
     PldmType,
     PldmCommand,
     TransferToken.TransmitPackage.TransmitSizeInByte,
@@ -409,7 +409,7 @@ CommonPldmSubmitCommand (
 ErrorExit:
   Status = TransferToken.TransferStatus;
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to send PLDM command over %s\n", __FUNCTION__, mTransportName));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to send PLDM command over %s\n", __func__, mTransportName));
   }
 
 ErrorExit2:
diff --git a/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c b/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c
index bb34fec16e..b2ca69b05f 100644
--- a/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c
+++ b/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c
@@ -57,7 +57,7 @@ PldmSubmitCommand (
   EFI_STATUS  Status;
 
   if ((RequestData == NULL) && (ResponseData == NULL)) {
-    DEBUG ((DEBUG_ERROR, "%a: Both RequestData and ResponseData are NULL\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Both RequestData and ResponseData are NULL\n", __func__));
     return EFI_INVALID_PARAMETER;
   }
 
@@ -106,26 +106,26 @@ DxePldmProtocolEntry (
              &mTransportToken
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for PLDM protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for PLDM protocol - %r\n", __func__, Status));
     return Status;
   }
 
   Status = GetTransportCapability (mTransportToken, &TransportCapability);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __func__));
     return Status;
   }
 
   TransportMaximumPayload = MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY (TransportCapability);
   if (TransportMaximumPayload == (1 << MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILABLE)) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __func__));
   } else {
     TransportMaximumPayload -= 1;
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for PLDM protocol has maximum payload 0x%x.\n", __FUNCTION__, TransportMaximumPayload));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for PLDM protocol has maximum payload 0x%x.\n", __func__, TransportMaximumPayload));
   }
 
   mTransportName = HelperManageabilitySpecName (mTransportToken->Transport->ManageabilityTransportSpecification);
-  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: PLDM protocol over %s.\n", __FUNCTION__, mTransportName));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: PLDM protocol over %s.\n", __func__, mTransportName));
 
   // Initial transport interface with the hardware information assigned.
   HardwareInfo.Pointer = NULL;
@@ -149,7 +149,7 @@ DxePldmProtocolEntry (
                                               (VOID **)&mPldmProtocol
                                               );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to install EDKII PLDM protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to install EDKII PLDM protocol - %r\n", __func__, Status));
   }
 
   return Status;
diff --git a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c
index 88b190757d..f897162bb5 100644
--- a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c
+++ b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c
@@ -147,7 +147,7 @@ GetSmbiosStructureTableMetaData (
   EFI_STATUS  Status;
   UINT32      ResponseSize;
 
-  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table metafile.\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table metafile.\n", __func__));
 
   ResponseSize = sizeof (PLDM_SMBIOS_STRUCTURE_TABLE_METADATA);
   Status       = PldmSubmitCommand (
@@ -159,7 +159,7 @@ GetSmbiosStructureTableMetaData (
                    &ResponseSize
                    );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fails to get SMBIOS structure table metafile.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fails to get SMBIOS structure table metafile.\n", __func__));
   }
 
   if (ResponseSize != 0) {
@@ -194,7 +194,7 @@ SetSmbiosStructureTableMetaData (
   UINT32      ResponseSize;
   UINT32      RequestSize;
 
-  DEBUG ((DEBUG_INFO, "%a: Get SMBIOS structure table metafile.\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Get SMBIOS structure table metafile.\n", __func__));
 
   RequestSize  = sizeof (PLDM_SMBIOS_STRUCTURE_TABLE_METADATA);
   ResponseSize = 0;
@@ -208,7 +208,7 @@ SetSmbiosStructureTableMetaData (
              &ResponseSize
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fails to set SMBIOS structure table metafile.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fails to set SMBIOS structure table metafile.\n", __func__));
   }
 
   return Status;
@@ -236,7 +236,7 @@ GetSmbiosStructureTable (
   OUT  UINT32                               *BufferSize
   )
 {
-  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
   // Only support PLDM SMBIOS Transfer push mode.
   return EFI_UNSUPPORTED;
 }
@@ -272,7 +272,7 @@ SetSmbiosStructureTable (
   EFI_SMBIOS_TABLE_HEADER                  *Record;
   PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST  *PldmSetSmbiosStructureTable;
 
-  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table.\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table.\n", __func__));
 
   Status = gBS->LocateProtocol (
                   &gEfiSmbiosProtocolGuid,
@@ -382,7 +382,7 @@ SetSmbiosStructureTable (
   }
 
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Set SMBIOS structure table.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Set SMBIOS structure table.\n", __func__));
   }
 
   if ((ResponseSize != 0) && (ResponseSize <= sizeof (SetSmbiosStructureTableHandle))) {
@@ -422,7 +422,7 @@ GetSmbiosStructureByType (
   OUT  UINT32                               *BufferSize
   )
 {
-  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
   // Only support PLDM SMBIOS Transfer push mode.
   return EFI_UNSUPPORTED;
 }
@@ -451,7 +451,7 @@ GetSmbiosStructureByHandle (
   OUT  UINT32                               *BufferSize
   )
 {
-  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
   // Only support PLDM SMBIOS Transfer push mode.
   return EFI_UNSUPPORTED;
 }
@@ -486,7 +486,7 @@ DxePldmSmbiosTransferEntry (
   EFI_HANDLE  Handle;
   EFI_STATUS  Status;
 
-  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));
 
   SetSmbiosStructureTableHandle = 0;
 
@@ -500,7 +500,7 @@ DxePldmSmbiosTransferEntry (
                                                             (VOID **)&mPldmSmbiosTransferProtocol
                                                             );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to install EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to install EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL.\n", __func__));
   }
 
   return Status;
-- 
2.37.1.windows.1


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

* [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use DEBUG_MANAGEABILITY
  2023-05-30  6:33 [edk2-platforms][PATCH 1/2] ManageabilityPkg: Replace __FUNCTION__ with __func__ Chang, Abner
@ 2023-05-30  6:33 ` Chang, Abner
  2023-05-30  6:52   ` Nickle Wang
  2023-05-30  8:48   ` Attar, AbdulLateef (Abdul Lateef)
  2023-05-30  6:51 ` [edk2-platforms][PATCH 1/2] ManageabilityPkg: Replace __FUNCTION__ with __func__ Nickle Wang
  2023-05-30  8:47 ` Attar, AbdulLateef (Abdul Lateef)
  2 siblings, 2 replies; 7+ messages in thread
From: Chang, Abner @ 2023-05-30  6:33 UTC (permalink / raw)
  To: devel; +Cc: Isaac Oram, Abdul Lateef Attar, Nickle Wang, Tinh Nguyen

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

Use debug print level DEBUG_MANAGEABILITY in
ManageabilityPkg.

Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Abdul Lateef Attar <abdattar@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
---
 .../Library/ManageabilityTransportHelperLib.h      |  2 +-
 .../BaseManageabilityTransportHelper.c             |  2 +-
 .../Universal/IpmiBmcAcpi/BmcAcpi.c                |  6 ++++--
 .../Universal/IpmiBmcElog/BmcElog.c                |  4 +++-
 .../ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c    |  8 +++++---
 .../PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c  | 14 +++++++-------
 6 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelperLib.h b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelperLib.h
index 11a1bd0521..dfe32189ad 100644
--- a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelperLib.h
+++ b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelperLib.h
@@ -11,7 +11,7 @@
 
 #include <Library/ManageabilityTransportLib.h>
 
-#define DEBUG_MANAGEABILITY_INFO  DEBUG_INFO
+#define DEBUG_MANAGEABILITY_INFO  DEBUG_MANAGEABILITY
 
 typedef struct _MANAGEABILITY_PROTOCOL_NAME MANAGEABILITY_PROTOCOL_NAME;
 
diff --git a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c
index f72957ea7f..27bc5eaddf 100644
--- a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c
+++ b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c
@@ -163,7 +163,7 @@ HelperAcquireManageabilityTransport (
   CHAR16      *ManageabilityProtocolName;
   CHAR16      *ManageabilityTransportName;
 
-  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Entry\n", __func__));
   if ((TransportToken == NULL) || (ManageabilityProtocolSpec == NULL)) {
     DEBUG ((DEBUG_ERROR, "%a: One of the required input parameters is NULL.\n", __func__));
     return EFI_INVALID_PARAMETER;
diff --git a/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c b/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c
index cf066dd095..d04623ecad 100644
--- a/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c
+++ b/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c
@@ -24,6 +24,8 @@
 #include <Library/BaseMemoryLib.h>
 #include <Library/UefiLib.h>
 
+#include <Library/ManageabilityTransportHelperLib.h>
+
 #ifndef EFI_ACPI_CREATOR_ID
 #define EFI_ACPI_CREATOR_ID  SIGNATURE_32 ('M', 'S', 'F', 'T')
 #endif
@@ -140,7 +142,7 @@ UpdateDeviceSsdtTable (
   //
   // Update IO(Decode16, 0xCA2, 0xCA2, 0, 2)
   //
-  DEBUG ((DEBUG_INFO, "UpdateDeviceSsdtTable - IPMI\n"));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "UpdateDeviceSsdtTable - IPMI\n"));
   for (DataPtr = (UINT8 *)(Table + 1);
        DataPtr < (UINT8 *)((UINT8 *)Table + Table->Length - 4);
        DataPtr++)
@@ -158,7 +160,7 @@ UpdateDeviceSsdtTable (
       ASSERT (IoRsc->Header.Bits.Type == ACPI_SMALL_ITEM_FLAG);
       ASSERT (IoRsc->Header.Bits.Name == ACPI_SMALL_IO_PORT_DESCRIPTOR_NAME);
       ASSERT (IoRsc->Header.Bits.Length == sizeof (EFI_ACPI_IO_PORT_DESCRIPTOR) - sizeof (ACPI_SMALL_RESOURCE_HEADER));
-      DEBUG ((DEBUG_INFO, "IPMI IO Base in ASL update - 0x%04x <= 0x%04x\n", IoRsc->BaseAddressMin, PcdGet16 (PcdIpmiKcsIoBaseAddress)));
+      DEBUG ((DEBUG_MANAGEABILITY_INFO, "IPMI IO Base in ASL update - 0x%04x <= 0x%04x\n", IoRsc->BaseAddressMin, PcdGet16 (PcdIpmiKcsIoBaseAddress)));
       IoRsc->BaseAddressMin = PcdGet16 (PcdIpmiKcsIoBaseAddress);
       IoRsc->BaseAddressMax = PcdGet16 (PcdIpmiKcsIoBaseAddress);
     }
diff --git a/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c b/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c
index 02873fc4c6..8b34b2d2d5 100644
--- a/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c
+++ b/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c
@@ -15,6 +15,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Library/UefiRuntimeServicesTableLib.h>
 #include <Library/IpmiCommandLib.h>
 
+#include <Library/ManageabilityTransportHelperLib.h>
+
 EFI_STATUS
 EFIAPI
 CheckIfSelIsFull (
@@ -186,7 +188,7 @@ CheckIfSelIsFull (
   // Check the Bit7 of the OperationByte if SEL is OverFlow.
   //
   SelIsFull = (SelInfo.OperationSupport & 0x80);
-  DEBUG ((DEBUG_INFO, "SelIsFull - 0x%x\n", SelIsFull));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "SelIsFull - 0x%x\n", SelIsFull));
 
   return EFI_SUCCESS;
 }
diff --git a/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c b/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c
index 46f741eed1..40ae0c3ecc 100644
--- a/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c
+++ b/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c
@@ -16,6 +16,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Library/IpmiCommandLib.h>
 #include <IndustryStandard/Ipmi.h>
 
+#include <Library/ManageabilityTransportHelperLib.h>
+
 /**
   This routine disables the specified FRB timer.
 
@@ -159,7 +161,7 @@ ReportFrb2Status (
   //
   Status = IpmiGetWatchdogTimer (&GetWatchdogTimer);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_INFO, "Failed to get Watchdog Timer info from BMC.\n"));
+    DEBUG ((DEBUG_ERROR, "Failed to get Watchdog Timer info from BMC.\n"));
     return Status;
   }
 
@@ -167,9 +169,9 @@ ReportFrb2Status (
   // Check if timer is running, report status to DEBUG_MODE output.
   //
   if (GetWatchdogTimer.TimerUse.Bits.TimerRunning == 1) {
-    DEBUG ((DEBUG_INFO, "FRB2 Timer is running.\n"));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "FRB2 Timer is running.\n"));
   } else {
-    DEBUG ((DEBUG_INFO, "FRB2 Timer is not running.\n"));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "FRB2 Timer is not running.\n"));
   }
 
   return EFI_SUCCESS;
diff --git a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c
index f897162bb5..fdf033f0b1 100644
--- a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c
+++ b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c
@@ -147,7 +147,7 @@ GetSmbiosStructureTableMetaData (
   EFI_STATUS  Status;
   UINT32      ResponseSize;
 
-  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table metafile.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Set SMBIOS structure table metafile.\n", __func__));
 
   ResponseSize = sizeof (PLDM_SMBIOS_STRUCTURE_TABLE_METADATA);
   Status       = PldmSubmitCommand (
@@ -194,7 +194,7 @@ SetSmbiosStructureTableMetaData (
   UINT32      ResponseSize;
   UINT32      RequestSize;
 
-  DEBUG ((DEBUG_INFO, "%a: Get SMBIOS structure table metafile.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Get SMBIOS structure table metafile.\n", __func__));
 
   RequestSize  = sizeof (PLDM_SMBIOS_STRUCTURE_TABLE_METADATA);
   ResponseSize = 0;
@@ -236,7 +236,7 @@ GetSmbiosStructureTable (
   OUT  UINT32                               *BufferSize
   )
 {
-  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Unsupported.\n", __func__));
   // Only support PLDM SMBIOS Transfer push mode.
   return EFI_UNSUPPORTED;
 }
@@ -272,7 +272,7 @@ SetSmbiosStructureTable (
   EFI_SMBIOS_TABLE_HEADER                  *Record;
   PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST  *PldmSetSmbiosStructureTable;
 
-  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Set SMBIOS structure table.\n", __func__));
 
   Status = gBS->LocateProtocol (
                   &gEfiSmbiosProtocolGuid,
@@ -422,7 +422,7 @@ GetSmbiosStructureByType (
   OUT  UINT32                               *BufferSize
   )
 {
-  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Unsupported.\n", __func__));
   // Only support PLDM SMBIOS Transfer push mode.
   return EFI_UNSUPPORTED;
 }
@@ -451,7 +451,7 @@ GetSmbiosStructureByHandle (
   OUT  UINT32                               *BufferSize
   )
 {
-  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Unsupported.\n", __func__));
   // Only support PLDM SMBIOS Transfer push mode.
   return EFI_UNSUPPORTED;
 }
@@ -486,7 +486,7 @@ DxePldmSmbiosTransferEntry (
   EFI_HANDLE  Handle;
   EFI_STATUS  Status;
 
-  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Entry.\n", __func__));
 
   SetSmbiosStructureTableHandle = 0;
 
-- 
2.37.1.windows.1


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

* Re: [edk2-platforms][PATCH 1/2] ManageabilityPkg: Replace __FUNCTION__ with __func__
  2023-05-30  6:33 [edk2-platforms][PATCH 1/2] ManageabilityPkg: Replace __FUNCTION__ with __func__ Chang, Abner
  2023-05-30  6:33 ` [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use DEBUG_MANAGEABILITY Chang, Abner
@ 2023-05-30  6:51 ` Nickle Wang
  2023-05-30  8:47 ` Attar, AbdulLateef (Abdul Lateef)
  2 siblings, 0 replies; 7+ messages in thread
From: Nickle Wang @ 2023-05-30  6:51 UTC (permalink / raw)
  To: abner.chang@amd.com, devel@edk2.groups.io
  Cc: Isaac Oram, Abdul Lateef Attar, Tinh Nguyen

Reviewed-by: Nickle Wang <nicklew@nvidia.com>

Regards,
Nickle

> -----Original Message-----
> From: abner.chang@amd.com <abner.chang@amd.com>
> Sent: Tuesday, May 30, 2023 2:33 PM
> To: devel@edk2.groups.io
> Cc: Isaac Oram <isaac.w.oram@intel.com>; Abdul Lateef Attar
> <abdattar@amd.com>; Nickle Wang <nicklew@nvidia.com>; Tinh Nguyen
> <tinhnguyen@os.amperecomputing.com>
> Subject: [edk2-platforms][PATCH 1/2] ManageabilityPkg: Replace __FUNCTION__
> with __func__
> 
> External email: Use caution opening links or attachments
> 
> 
> From: Abner Chang <abner.chang@amd.com>
> 
> Signed-off-by: Abner Chang <abner.chang@amd.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Abdul Lateef Attar <abdattar@amd.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
> ---
>  .../BaseManageabilityTransportHelper.c        | 36 +++++++++----------
>  .../Common/KcsCommon.c                        | 12 +++----
>  .../Dxe/ManageabilityTransportKcs.c           | 28 +++++++--------
>  .../Dxe/ManageabilityTransportMctp.c          | 22 ++++++------
>  .../PldmProtocolLibrary/Dxe/PldmProtocolLib.c |  4 +--
>  .../IpmiProtocol/Common/IpmiProtocolCommon.c  | 14 ++++----
>  .../Universal/IpmiProtocol/Dxe/IpmiProtocol.c | 14 ++++----
>  .../Universal/IpmiProtocol/Pei/IpmiPpi.c      | 18 +++++-----
>  .../Universal/IpmiProtocol/Smm/IpmiProtocol.c | 14 ++++----
>  .../MctpProtocol/Common/MctpProtocolCommon.c  | 30 ++++++++--------
>  .../Universal/MctpProtocol/Dxe/MctpProtocol.c | 18 +++++-----
>  .../PldmProtocol/Common/PldmProtocolCommon.c  | 20 +++++------
>  .../Universal/PldmProtocol/Dxe/PldmProtocol.c | 14 ++++----
>  .../PldmSmbiosTransferDxe.c                   | 22 ++++++------
>  14 files changed, 133 insertions(+), 133 deletions(-)
> 
> diff --git
> a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/Bas
> eManageabilityTransportHelper.c
> b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/Bas
> eManageabilityTransportHelper.c
> index ce68f89531..f72957ea7f 100644
> ---
> a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/Bas
> eManageabilityTransportHelper.c
> +++
> b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/Bas
> eManageabilityTransportHelper.c
> @@ -49,7 +49,7 @@ HelperManageabilitySpecName (
>    }
> 
>    if ((SpecificationGuid == NULL) || IsZeroGuid (SpecificationGuid)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Improper input GUIDs, could be NULL or zero
> GUID.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Improper input GUIDs, could be NULL or zero
> GUID.\n", __func__));
>      return NULL;
>    }
> 
> @@ -106,7 +106,7 @@ HelperManageabilityCheckSupportedSpec (
>        IsZeroGuid (ManageabilityProtocolToCheck)
>        )
>    {
> -    DEBUG ((DEBUG_ERROR, "%a: Improper input GUIDs, could be NULL or zero
> GUID.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Improper input GUIDs, could be NULL or zero
> GUID.\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
> @@ -120,7 +120,7 @@ HelperManageabilityCheckSupportedSpec (
>        DEBUG ((
>          DEBUG_MANAGEABILITY_INFO,
>          "%a: Transport interface %s supports %s manageability specification.\n",
> -        __FUNCTION__,
> +        __func__,
>          HelperManageabilitySpecName (TransportGuid),
>          HelperManageabilitySpecName (ManageabilityProtocolToCheck)
>          ));
> @@ -133,7 +133,7 @@ HelperManageabilityCheckSupportedSpec (
>    DEBUG ((
>      DEBUG_ERROR,
>      "%a: Transport interface %s doesn't support %s manageability
> specification.\n",
> -    __FUNCTION__,
> +    __func__,
>      HelperManageabilitySpecName (TransportGuid),
>      HelperManageabilitySpecName (ManageabilityProtocolToCheck)
>      ));
> @@ -163,16 +163,16 @@ HelperAcquireManageabilityTransport (
>    CHAR16      *ManageabilityProtocolName;
>    CHAR16      *ManageabilityTransportName;
> 
> -  DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
> +  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
>    if ((TransportToken == NULL) || (ManageabilityProtocolSpec == NULL)) {
> -    DEBUG ((DEBUG_ERROR, "%a: One of the required input parameters is
> NULL.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: One of the required input parameters is
> NULL.\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
>    *TransportToken           = NULL;
>    ManageabilityProtocolName = HelperManageabilitySpecName
> (ManageabilityProtocolSpec);
>    if (ManageabilityProtocolName == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: Unsupported Manageability Protocol
> Specification.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Unsupported Manageability Protocol
> Specification.\n", __func__));
>      return EFI_UNSUPPORTED;
>    }
> 
> @@ -180,7 +180,7 @@ HelperAcquireManageabilityTransport (
> 
>    Status = AcquireTransportSession (ManageabilityProtocolSpec, TransportToken);
>    if (Status == EFI_UNSUPPORTED) {
> -    DEBUG ((DEBUG_ERROR, "%a: No supported transport interface for %s
> packet.\n", __FUNCTION__, ManageabilityProtocolName));
> +    DEBUG ((DEBUG_ERROR, "%a: No supported transport interface for %s
> packet.\n", __func__, ManageabilityProtocolName));
>      return Status;
>    }
> 
> @@ -188,7 +188,7 @@ HelperAcquireManageabilityTransport (
>      DEBUG ((
>        DEBUG_ERROR,
>        "%a: Fail to acquire Manageability transport token for %s (%r).\n",
> -      __FUNCTION__,
> +      __func__,
>        ManageabilityProtocolName,
>        Status
>        ));
> @@ -197,11 +197,11 @@ HelperAcquireManageabilityTransport (
> 
>    ManageabilityTransportName = HelperManageabilitySpecName
> ((*TransportToken)->Transport->ManageabilityTransportSpecification);
>    if (ManageabilityTransportName == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: Unsupported Manageability Transport
> Interface Specification\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Unsupported Manageability Transport
> Interface Specification\n", __func__));
>      return EFI_UNSUPPORTED;
>    }
> 
> -  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: This is the transfer session for
> %s over %s\n", __FUNCTION__, ManageabilityProtocolName,
> ManageabilityTransportName));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: This is the transfer session for
> %s over %s\n", __func__, ManageabilityProtocolName,
> ManageabilityTransportName));
>    return Status;
>  }
> 
> @@ -227,7 +227,7 @@ HelperInitManageabilityTransport (
>    EFI_STATUS  Status;
> 
>    if (TransportToken == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: TransportToken is invalid.\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: TransportToken is invalid.\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
> @@ -242,20 +242,20 @@ HelperInitManageabilityTransport (
>                                                                   );
>        if (EFI_ERROR (Status)) {
>          if (Status == EFI_UNSUPPORTED) {
> -          DEBUG ((DEBUG_ERROR, "%a: Transport interface doesn't have reset
> capability.\n", __FUNCTION__));
> +          DEBUG ((DEBUG_ERROR, "%a: Transport interface doesn't have reset
> capability.\n", __func__));
>          } else {
> -          DEBUG ((DEBUG_ERROR, "%a: Fail to reset transport interface (%r).\n",
> __FUNCTION__, Status));
> +          DEBUG ((DEBUG_ERROR, "%a: Fail to reset transport interface (%r).\n",
> __func__, Status));
>          }
> 
>          Status = EFI_DEVICE_ERROR;
>        } else {
>          Status = TransportToken->Transport->Function.Version1_0->TransportInit
> (TransportToken, HardwareInfo);
>          if (EFI_ERROR (Status)) {
> -          DEBUG ((DEBUG_ERROR, "%a: Transport interface is not able to use after
> the reset (%r).\n", __FUNCTION__, Status));
> +          DEBUG ((DEBUG_ERROR, "%a: Transport interface is not able to use after
> the reset (%r).\n", __func__, Status));
>          }
>        }
>      } else {
> -      DEBUG ((DEBUG_ERROR, "%a: Transport interface is not able to use (%r).\n",
> __FUNCTION__, Status));
> +      DEBUG ((DEBUG_ERROR, "%a: Transport interface is not able to use (%r).\n",
> __func__, Status));
>      }
>    }
> 
> @@ -343,7 +343,7 @@ HelperManageabilitySplitPayload (
>      DEBUG ((
>        DEBUG_ERROR,
>        "%a: (Preamble 0x%x + PostambleSize 0x%x) is greater than
> MaximumTransferUnit 0x%x.\n",
> -      __FUNCTION__,
> +      __func__,
>        PreambleSize,
>        PostambleSize,
>        MaximumTransferUnit
> @@ -373,7 +373,7 @@ HelperManageabilitySplitPayload (
>    }
> 
>    if (TotalPayloadRemaining != 0) {
> -    DEBUG ((DEBUG_ERROR, "%a: Error processing multiple packages
> (TotalPayloadRemaining != 0)\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Error processing multiple packages
> (TotalPayloadRemaining != 0)\n", __func__));
>      FreePool (ThisMultiplePackages);
>      return EFI_INVALID_PARAMETER;
>    }
> diff --git
> a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Common/K
> csCommon.c
> b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Common/K
> csCommon.c
> index 4693e7f06f..d5b54c04be 100644
> ---
> a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Common/K
> csCommon.c
> +++
> b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Common/K
> csCommon.c
> @@ -143,7 +143,7 @@ KcsTransportWrite (
>        ((RequestData != NULL) && (RequestDataSize == 0))
>        )
>    {
> -    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of RequestData or
> RequestDataSize.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of RequestData or
> RequestDataSize.\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
> @@ -152,7 +152,7 @@ KcsTransportWrite (
>        ((TransmitHeader != NULL) && (TransmitHeaderSize == 0))
>        )
>    {
> -    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of TransmitHeader or
> TransmitHeaderSize.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of TransmitHeader or
> TransmitHeaderSize.\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
> @@ -161,7 +161,7 @@ KcsTransportWrite (
>        ((TransmitTrailer != NULL) && (TransmitTrailerSize == 0))
>        )
>    {
> -    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of TransmitTrailer or
> TransmitTrailerSize.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of TransmitTrailer or
> TransmitTrailerSize.\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
> @@ -325,7 +325,7 @@ KcsTransportRead (
>    UINT32      ReadLength;
> 
>    if ((DataByte == NULL) || (*Length == 0)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Either DataByte is NULL or Length is 0.\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Either DataByte is NULL or Length is 0.\n",
> __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
> @@ -430,12 +430,12 @@ KcsTransportSendCommand (
>    CHAR16                    *CompletionCodeStr;
> 
>    if ((RequestData != NULL) && (RequestDataSize == 0)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of RequestData and
> RequestDataSize\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of RequestData and
> RequestDataSize\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
>    if ((ResponseData != NULL) && ((ResponseDataSize != NULL) &&
> (*ResponseDataSize == 0))) {
> -    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of ResponseData and
> ResponseDataSize\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of ResponseData and
> ResponseDataSize\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
> diff --git
> a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/Manag
> eabilityTransportKcs.c
> b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/Manag
> eabilityTransportKcs.c
> index c690bea74e..9bd8ff4c0a 100644
> ---
> a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/Manag
> eabilityTransportKcs.c
> +++
> b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/Manag
> eabilityTransportKcs.c
> @@ -58,12 +58,12 @@ KcsTransportInit (
>    CHAR16  *ManageabilityProtocolName;
> 
>    if (TransportToken == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
>    if (HardwareInfo.Kcs == NULL) {
> -    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Hardware information is not
> provided, use dfault settings.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Hardware information is not
> provided, use dfault settings.\n", __func__));
>      mKcsHardwareInfo.MemoryMap                    =
> MANAGEABILITY_TRANSPORT_KCS_IO_MAP_IO;
>      mKcsHardwareInfo.IoBaseAddress.IoAddress16    = PcdGet16
> (PcdIpmiKcsIoBaseAddress);
>      mKcsHardwareInfo.IoDataInAddress.IoAddress16  =
> mKcsHardwareInfo.IoBaseAddress.IoAddress16 +
> IPMI_KCS_DATA_IN_REGISTER_OFFSET;
> @@ -82,9 +82,9 @@ KcsTransportInit (
>    // Get protocol specification name.
>    ManageabilityProtocolName = HelperManageabilitySpecName
> (TransportToken->ManageabilityProtocolSpecification);
> 
> -  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: KCS transport hardware for %s
> is:\n", __FUNCTION__, ManageabilityProtocolName));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: KCS transport hardware for %s
> is:\n", __func__, ManageabilityProtocolName));
>    if (mKcsHardwareInfo.MemoryMap) {
> -    DEBUG ((DEBUG_MANAGEABILITY_INFO, "Memory Map I/O\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "Memory Map I/O\n", __func__));
>      DEBUG ((DEBUG_MANAGEABILITY_INFO, "Base Memory Address :
> 0x%08x\n", mKcsHardwareInfo.IoBaseAddress.IoAddress32));
>      DEBUG ((DEBUG_MANAGEABILITY_INFO, "Data in Address     : 0x%08x\n",
> mKcsHardwareInfo.IoDataInAddress.IoAddress32));
>      DEBUG ((DEBUG_MANAGEABILITY_INFO, "Data out Address    : 0x%08x\n",
> mKcsHardwareInfo.IoDataOutAddress.IoAddress32));
> @@ -134,7 +134,7 @@ KcsTransportStatus (
>    UINT8  TransportStatus;
> 
>    if (TransportToken == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
> @@ -223,7 +223,7 @@ KcsTransportTransmitReceive (
>    MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS  AdditionalStatus;
> 
>    if ((TransportToken == NULL) || (TransferToken == NULL)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token or transfer token.\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token or transfer token.\n",
> __func__));
>      return;
>    }
> 
> @@ -267,12 +267,12 @@ AcquireTransportSession (
>    MANAGEABILITY_TRANSPORT_KCS  *KcsTransportToken;
> 
>    if (ManageabilityProtocolSpec == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: No Manageability protocol specification
> specified.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: No Manageability protocol specification
> specified.\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
>    if (TransportToken == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: TransportToken is NULL.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: TransportToken is NULL.\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
> @@ -283,25 +283,25 @@ AcquireTransportSession (
>               ManageabilityProtocolSpec
>               );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Protocol is not supported on this transport
> interface.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Protocol is not supported on this transport
> interface.\n", __func__));
>      return EFI_UNSUPPORTED;
>    }
> 
>    if (mSingleSessionToken != NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: This manageability transport library only
> supports one session transport token.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: This manageability transport library only
> supports one session transport token.\n", __func__));
>      return EFI_OUT_OF_RESOURCES;
>    }
> 
>    KcsTransportToken = AllocateZeroPool (sizeof
> (MANAGEABILITY_TRANSPORT_KCS));
>    if (KcsTransportToken == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for
> MANAGEABILITY_TRANSPORT_KCS\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for
> MANAGEABILITY_TRANSPORT_KCS\n", __func__));
>      return EFI_OUT_OF_RESOURCES;
>    }
> 
>    KcsTransportToken->Token.Transport = AllocateZeroPool (sizeof
> (MANAGEABILITY_TRANSPORT));
>    if (KcsTransportToken->Token.Transport == NULL) {
>      FreePool (KcsTransportToken);
> -    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for
> MANAGEABILITY_TRANSPORT\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for
> MANAGEABILITY_TRANSPORT\n", __func__));
>      return EFI_OUT_OF_RESOURCES;
>    }
> 
> @@ -312,7 +312,7 @@ AcquireTransportSession (
>    KcsTransportToken->Token.Transport->TransportName                       = L"KCS";
>    KcsTransportToken->Token.Transport->Function.Version1_0                 =
> AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT_FUNCTION_V1_0));
>    if (KcsTransportToken->Token.Transport->Function.Version1_0 == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for
> MANAGEABILITY_TRANSPORT_FUNCTION_V1_0\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for
> MANAGEABILITY_TRANSPORT_FUNCTION_V1_0\n", __func__));
>      FreePool (KcsTransportToken);
>      FreePool (KcsTransportToken->Token.Transport);
>      return EFI_OUT_OF_RESOURCES;
> @@ -406,7 +406,7 @@ ReleaseTransportSession (
>    }
> 
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Fail to release KCS transport token (%r).\n",
> __FUNCTION__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Fail to release KCS transport token (%r).\n",
> __func__, Status));
>    }
> 
>    return Status;
> diff --git
> a/Features/ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/Man
> ageabilityTransportMctp.c
> b/Features/ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/Man
> ageabilityTransportMctp.c
> index eaf02bbb0a..c520e2302d 100644
> ---
> a/Features/ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/Man
> ageabilityTransportMctp.c
> +++
> b/Features/ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/Man
> ageabilityTransportMctp.c
> @@ -86,7 +86,7 @@ MctpTransportStatus (
>    )
>  {
>    if (TransportToken == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
> @@ -161,7 +161,7 @@ MctpTransportTransmitReceive (
>    MANAGEABILITY_MCTP_TRANSPORT_HEADER  *TransmitHeader;
> 
>    if (TransportToken == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __func__));
>      TransferToken->TransportAdditionalStatus =
> MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_NOT_AVAILABLE;
>      return;
>    }
> @@ -183,7 +183,7 @@ MctpTransportTransmitReceive (
>        //
>        // Dxe MCTP Protocol is not installed.
>        //
> -      DEBUG ((DEBUG_ERROR, "%a: EDKII MCTP protocol is not found - %r\n",
> __FUNCTION__, Status));
> +      DEBUG ((DEBUG_ERROR, "%a: EDKII MCTP protocol is not found - %r\n",
> __func__, Status));
>        return;
>      }
>    }
> @@ -191,7 +191,7 @@ MctpTransportTransmitReceive (
>    DEBUG ((
>      DEBUG_MANAGEABILITY_INFO,
>      "%a: MCTP message type: 0x%x, SourceEndpointId: 0x%x,
> DestinationEndpointId: 0x%x\n",
> -    __FUNCTION__,
> +    __func__,
>      TransmitHeader->MessageHeader.MessageType,
>      TransmitHeader->SourceEndpointId,
>      TransmitHeader->DestinationEndpointId
> @@ -242,7 +242,7 @@ AcquireTransportSession (
>    MANAGEABILITY_TRANSPORT_MCTP  *MctpTransportToken;
> 
>    if (ManageabilityProtocolSpec == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: No Manageability protocol specification
> specified.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: No Manageability protocol specification
> specified.\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
> @@ -253,25 +253,25 @@ AcquireTransportSession (
>               ManageabilityProtocolSpec
>               );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Protocol is not supported on this transport
> interface.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Protocol is not supported on this transport
> interface.\n", __func__));
>      return EFI_UNSUPPORTED;
>    }
> 
>    if (mSingleSessionToken != NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: This manageability transport library only
> supports one session transport token.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: This manageability transport library only
> supports one session transport token.\n", __func__));
>      return EFI_OUT_OF_RESOURCES;
>    }
> 
>    MctpTransportToken = (MANAGEABILITY_TRANSPORT_MCTP
> *)AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT_MCTP));
>    if (MctpTransportToken == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for
> MANAGEABILITY_TRANSPORT_MCTP\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for
> MANAGEABILITY_TRANSPORT_MCTP\n", __func__));
>      return EFI_OUT_OF_RESOURCES;
>    }
> 
>    MctpTransportToken->Token.Transport = AllocateZeroPool (sizeof
> (MANAGEABILITY_TRANSPORT));
>    if (MctpTransportToken->Token.Transport == NULL) {
>      FreePool (MctpTransportToken);
> -    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for
> MANAGEABILITY_TRANSPORT\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for
> MANAGEABILITY_TRANSPORT\n", __func__));
>      return EFI_OUT_OF_RESOURCES;
>    }
> 
> @@ -282,7 +282,7 @@ AcquireTransportSession (
>    MctpTransportToken->Token.Transport->TransportName                       =
> L"MCTP";
>    MctpTransportToken->Token.Transport->Function.Version1_0                 =
> AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT_FUNCTION_V1_0));
>    if (MctpTransportToken->Token.Transport->Function.Version1_0 == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for
> MANAGEABILITY_TRANSPORT_FUNCTION_V1_0\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for
> MANAGEABILITY_TRANSPORT_FUNCTION_V1_0\n", __func__));
>      FreePool (MctpTransportToken);
>      FreePool (MctpTransportToken->Token.Transport);
>      return EFI_OUT_OF_RESOURCES;
> @@ -360,7 +360,7 @@ ReleaseTransportSession (
>    }
> 
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Fail to release MCTP transport token (%r).\n",
> __FUNCTION__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Fail to release MCTP transport token (%r).\n",
> __func__, Status));
>    }
> 
>    return Status;
> diff --git
> a/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtocolLib.
> c
> b/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtocolLib.
> c
> index 96727054ce..267bd8fbc1 100644
> ---
> a/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtocolLib.
> c
> +++
> b/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtocolLib.
> c
> @@ -55,12 +55,12 @@ PldmSubmitCommand (
>        //
>        // Dxe PLDM Protocol is not installed. So, PLDM device is not present.
>        //
> -      DEBUG ((DEBUG_ERROR, "%a: EDKII PLDM protocol is not found - %r\n",
> __FUNCTION__, Status));
> +      DEBUG ((DEBUG_ERROR, "%a: EDKII PLDM protocol is not found - %r\n",
> __func__, Status));
>        return EFI_NOT_FOUND;
>      }
>    }
> 
> -  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: PLDM Type: 0x%x, Command:
> 0x%x\n", __FUNCTION__, PldmType, Command));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: PLDM Type: 0x%x, Command:
> 0x%x\n", __func__, PldmType, Command));
>    if ((RequestData != NULL) && (RequestDataSize != 0)) {
>      HelperManageabilityDebugPrint ((VOID *)RequestData, RequestDataSize,
> "PLDM PLDM application layer Type/Command specific request payload\n");
>    }
> diff --git
> a/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolCo
> mmon.c
> b/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolCo
> mmon.c
> index b055bad7da..6a09280bcc 100644
> ---
> a/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolCo
> mmon.c
> +++
> b/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolCo
> mmon.c
> @@ -39,7 +39,7 @@ SetupIpmiTransportHardwareInformation (
> 
>    KcsHardwareInfo = AllocatePool (sizeof
> (MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO));
>    if (KcsHardwareInfo == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for
> MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for
> MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO.\n", __func__));
>      return EFI_OUT_OF_RESOURCES;
>    }
> 
> @@ -54,7 +54,7 @@ SetupIpmiTransportHardwareInformation (
>      HardwareInformation->Kcs                      = KcsHardwareInfo;
>      return EFI_SUCCESS;
>    } else {
> -    DEBUG ((DEBUG_ERROR, "%a: No implementation of setting hardware
> information.", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: No implementation of setting hardware
> information.", __func__));
>      ASSERT (FALSE);
>    }
> 
> @@ -131,7 +131,7 @@ SetupIpmiRequestTransportPacket (
>        *PacketBodySize = 0;
>      }
>    } else {
> -    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.",
> __func__));
>      ASSERT (FALSE);
>    }
> 
> @@ -179,7 +179,7 @@ CommonIpmiSubmitCommand (
>    UINT16                                     TrailerSize;
> 
>    if (TransportToken == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: No transport toke for IPMI\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: No transport toke for IPMI\n", __func__));
>      return EFI_UNSUPPORTED;
>    }
> 
> @@ -188,7 +188,7 @@ CommonIpmiSubmitCommand (
>                                                               &TransportAdditionalStatus
>                                                               );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Transport for IPMI has problem - (%r)\n",
> __FUNCTION__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Transport for IPMI has problem - (%r)\n",
> __func__, Status));
>      return Status;
>    }
> 
> @@ -208,7 +208,7 @@ CommonIpmiSubmitCommand (
>                             &TrailerSize
>                             );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __FUNCTION__,
> Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __func__,
> Status));
>      return Status;
>    }
> 
> @@ -256,7 +256,7 @@ CommonIpmiSubmitCommand (
>    Status                    = TransferToken.TransferStatus;
>    TransportAdditionalStatus = TransferToken.TransportAdditionalStatus;
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to send IPMI command.\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to send IPMI command.\n", __func__));
>      return Status;
>    }
> 
> diff --git
> a/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocol.c
> b/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocol.c
> index 51d5c7f0ba..1660cfbbd5 100644
> --- a/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocol.c
> +++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocol.c
> @@ -97,26 +97,26 @@ DxeIpmiEntry (
>               &mTransportToken
>               );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI
> protocol - %r\n", __FUNCTION__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI
> protocol - %r\n", __func__, Status));
>      return Status;
>    }
> 
>    Status = GetTransportCapability (mTransportToken, &TransportCapability);
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n",
> __func__));
>      return Status;
>    }
> 
>    TransportMaximumPayload =
> MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY
> (TransportCapability);
>    if (TransportMaximumPayload == (1 <<
> MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILA
> BLE)) {
> -    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum
> payload is undefined.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum
> payload is undefined.\n", __func__));
>    } else {
>      TransportMaximumPayload -= 1;
> -    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI
> protocol has maximum payload %x.\n", __FUNCTION__,
> TransportMaximumPayload));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI
> protocol has maximum payload %x.\n", __func__, TransportMaximumPayload));
>    }
> 
>    mTransportName = HelperManageabilitySpecName (mTransportToken-
> >Transport->ManageabilityTransportSpecification);
> -  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n",
> __FUNCTION__, mTransportName));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n",
> __func__, mTransportName));
> 
>    //
>    // Setup hardware information according to the transport interface.
> @@ -126,7 +126,7 @@ DxeIpmiEntry (
>               );
>    if (EFI_ERROR (Status)) {
>      if (Status == EFI_UNSUPPORTED) {
> -      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport
> interface.\n", __FUNCTION__, mTransportName));
> +      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport
> interface.\n", __func__, mTransportName));
>      }
> 
>      return Status;
> @@ -151,7 +151,7 @@ DxeIpmiEntry (
>                    (VOID **)&mIpmiProtocol
>                    );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI protocol - %r\n",
> __FUNCTION__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI protocol - %r\n",
> __func__, Status));
>    }
> 
>    return Status;
> diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c
> b/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c
> index 4bbdbf78fe..a6bdb27464 100644
> --- a/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c
> +++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c
> @@ -96,13 +96,13 @@ PeiIpmiEntry (
>    //
>    PeiIpmiPpiinternal = (PEI_IPMI_PPI_INTERNAL *)AllocateZeroPool (sizeof
> (PEI_IPMI_PPI_INTERNAL));
>    if (PeiIpmiPpiinternal == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for
> PEI_IPMI_PPI_INTERNAL.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for
> PEI_IPMI_PPI_INTERNAL.\n", __func__));
>      return EFI_OUT_OF_RESOURCES;
>    }
> 
>    PpiDescriptor = (EFI_PEI_PPI_DESCRIPTOR *)AllocateZeroPool (sizeof
> (EFI_PEI_PPI_DESCRIPTOR));
>    if (PpiDescriptor == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for
> EFI_PEI_PPI_DESCRIPTOR.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for
> EFI_PEI_PPI_DESCRIPTOR.\n", __func__));
>      return EFI_OUT_OF_RESOURCES;
>    }
> 
> @@ -118,26 +118,26 @@ PeiIpmiEntry (
>               &PeiIpmiPpiinternal->TransportToken
>               );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI
> protocol - %r\n", __FUNCTION__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI
> protocol - %r\n", __func__, Status));
>      return Status;
>    }
> 
>    Status = GetTransportCapability (PeiIpmiPpiinternal->TransportToken,
> &PeiIpmiPpiinternal->TransportCapability);
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n",
> __func__));
>      return Status;
>    }
> 
>    PeiIpmiPpiinternal->TransportMaximumPayload =
> MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY
> (PeiIpmiPpiinternal->TransportCapability);
>    if (PeiIpmiPpiinternal->TransportMaximumPayload  == (1 <<
> MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILA
> BLE)) {
> -    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum
> payload is undefined.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum
> payload is undefined.\n", __func__));
>    } else {
>      PeiIpmiPpiinternal->TransportMaximumPayload -= 1;
> -    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI
> protocol has maximum payload 0x%x.\n", __FUNCTION__, PeiIpmiPpiinternal-
> >TransportMaximumPayload));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI
> protocol has maximum payload 0x%x.\n", __func__, PeiIpmiPpiinternal-
> >TransportMaximumPayload));
>    }
> 
>    TransportName = HelperManageabilitySpecName (PeiIpmiPpiinternal-
> >TransportToken->Transport->ManageabilityTransportSpecification);
> -  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n",
> __FUNCTION__, TransportName));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n",
> __func__, TransportName));
> 
>    //
>    // Setup hardware information according to the transport interface.
> @@ -147,7 +147,7 @@ PeiIpmiEntry (
>               );
>    if (EFI_ERROR (Status)) {
>      if (Status == EFI_UNSUPPORTED) {
> -      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport
> interface.\n", __FUNCTION__, TransportName));
> +      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport
> interface.\n", __func__, TransportName));
>      }
> 
>      return Status;
> @@ -169,7 +169,7 @@ PeiIpmiEntry (
>    //
>    Status = PeiServicesInstallPpi (PpiDescriptor);
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI PPI - %r\n",
> __FUNCTION__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI PPI - %r\n", __func__,
> Status));
>    }
> 
>    return Status;
> diff --git
> a/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocol.c
> b/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocol.c
> index e4cd166b7a..aaa48b24e2 100644
> --- a/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocol.c
> +++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocol.c
> @@ -98,26 +98,26 @@ SmmIpmiEntry (
>               &mTransportToken
>               );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI
> protocol - %r\n", __FUNCTION__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI
> protocol - %r\n", __func__, Status));
>      return Status;
>    }
> 
>    Status = GetTransportCapability (mTransportToken, &TransportCapability);
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n",
> __func__));
>      return Status;
>    }
> 
>    TransportMaximumPayload =
> MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY
> (TransportCapability);
>    if (TransportMaximumPayload == (1 <<
> MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILA
> BLE)) {
> -    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum
> payload is undefined.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum
> payload is undefined.\n", __func__));
>    } else {
>      TransportMaximumPayload -= 1;
> -    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI
> protocol has maximum payload 0x%x.\n", __FUNCTION__,
> TransportMaximumPayload));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI
> protocol has maximum payload 0x%x.\n", __func__, TransportMaximumPayload));
>    }
> 
>    mTransportName = HelperManageabilitySpecName (mTransportToken-
> >Transport->ManageabilityTransportSpecification);
> -  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n",
> __FUNCTION__, mTransportName));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n",
> __func__, mTransportName));
> 
>    //
>    // Setup hardware information according to the transport interface.
> @@ -127,7 +127,7 @@ SmmIpmiEntry (
>               );
>    if (EFI_ERROR (Status)) {
>      if (Status == EFI_UNSUPPORTED) {
> -      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport
> interface.\n", __FUNCTION__, mTransportName));
> +      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport
> interface.\n", __func__, mTransportName));
>      }
> 
>      return Status;
> @@ -152,7 +152,7 @@ SmmIpmiEntry (
>                      (VOID **)&mIpmiProtocol
>                      );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI SMM protocol - %r\n",
> __FUNCTION__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI SMM protocol - %r\n",
> __func__, Status));
>    }
> 
>    return Status;
> diff --git
> a/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCo
> mmon.c
> b/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCo
> mmon.c
> index db572ec85a..1ad48efdc7 100644
> ---
> a/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCo
> mmon.c
> +++
> b/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCo
> mmon.c
> @@ -52,7 +52,7 @@ SetupMctpTransportHardwareInformation (
>    if (CompareGuid (&gManageabilityTransportKcsGuid, TransportToken-
> >Transport->ManageabilityTransportSpecification)) {
>      KcsHardwareInfo = AllocatePool (sizeof
> (MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO));
>      if (KcsHardwareInfo == NULL) {
> -      DEBUG ((DEBUG_ERROR, "%a: Not enough memory for
> MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO.\n", __FUNCTION__));
> +      DEBUG ((DEBUG_ERROR, "%a: Not enough memory for
> MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO.\n", __func__));
>        return EFI_OUT_OF_RESOURCES;
>      }
> 
> @@ -76,7 +76,7 @@ SetupMctpTransportHardwareInformation (
>      HardwareInformation->Kcs = KcsHardwareInfo;
>      return EFI_SUCCESS;
>    } else {
> -    DEBUG ((DEBUG_ERROR, "%a: No implementation of setting hardware
> information.", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: No implementation of setting hardware
> information.", __func__));
>      ASSERT (FALSE);
>    }
> 
> @@ -140,20 +140,20 @@ SetupMctpRequestTransportPacket (
>        (PacketTrailer == NULL) || (PacketTrailerSize == NULL)
>        )
>    {
> -    DEBUG ((DEBUG_ERROR, "%a: One or more than one of the input parameter
> is invalid.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: One or more than one of the input parameter
> is invalid.\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
>    if (CompareGuid (&gManageabilityTransportKcsGuid, TransportToken-
> >Transport->ManageabilityTransportSpecification)) {
>      MctpKcsHeader = (MANAGEABILITY_MCTP_KCS_HEADER *)AllocateZeroPool
> (sizeof (MANAGEABILITY_MCTP_KCS_HEADER));
>      if (MctpKcsHeader == NULL) {
> -      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for
> MANAGEABILITY_MCTP_KCS_HEADER.\n", __FUNCTION__));
> +      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for
> MANAGEABILITY_MCTP_KCS_HEADER.\n", __func__));
>        return EFI_OUT_OF_RESOURCES;
>      }
> 
>      Pec = (UINT8 *)AllocateZeroPool (sizeof (UINT8));
>      if (Pec == NULL) {
> -      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for PEC.\n",
> __FUNCTION__));
> +      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for PEC.\n", __func__));
>        FreePool (MctpKcsHeader);
>        return EFI_OUT_OF_RESOURCES;
>      }
> @@ -165,7 +165,7 @@ SetupMctpRequestTransportPacket (
> 
>      ThisPackage = (UINT8 *)AllocateZeroPool (MctpKcsHeader->ByteCount);
>      if (ThisPackage == NULL) {
> -      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for package.\n",
> __FUNCTION__));
> +      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for package.\n",
> __func__));
>        FreePool (MctpKcsHeader);
>        FreePool (Pec);
>        return EFI_OUT_OF_RESOURCES;
> @@ -203,7 +203,7 @@ SetupMctpRequestTransportPacket (
>      *PacketTrailerSize = 1;
>      return EFI_SUCCESS;
>    } else {
> -    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.",
> __func__));
>      ASSERT (FALSE);
>    }
> 
> @@ -269,7 +269,7 @@ CommonMctpSubmitMessage (
>    MANAGEABILITY_TRANSMISSION_PACKAGE_ATTR    *ThisPackage;
> 
>    if (TransportToken == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: No transport toke for MCTP\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: No transport toke for MCTP\n", __func__));
>      return EFI_UNSUPPORTED;
>    }
> 
> @@ -278,7 +278,7 @@ CommonMctpSubmitMessage (
>                                                               AdditionalTransferError
>                                                               );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Transport %s for MCTP has problem - (%r)\n",
> __FUNCTION__, mTransportName, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Transport %s for MCTP has problem - (%r)\n",
> __func__, mTransportName, Status));
>      return Status;
>    }
> 
> @@ -292,7 +292,7 @@ CommonMctpSubmitMessage (
>                      &MultiPackages
>                      );
>    if (EFI_ERROR (Status) || (MultiPackages == NULL)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Fails to split payload into multiple packages -
> (%r)\n", __FUNCTION__, mTransportName, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Fails to split payload into multiple packages -
> (%r)\n", __func__, mTransportName, Status));
>      return Status;
>    }
> 
> @@ -342,7 +342,7 @@ CommonMctpSubmitMessage (
>                 &MctpTransportTrailerSize
>                 );
>      if (EFI_ERROR (Status)) {
> -      DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n",
> __FUNCTION__, Status));
> +      DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __func__,
> Status));
>        return Status;
>      }
> 
> @@ -373,7 +373,7 @@ CommonMctpSubmitMessage (
>      DEBUG ((
>        DEBUG_MANAGEABILITY_INFO,
>        "%a: Send MCTP message type: 0x%x, from source endpoint ID: 0x%x to
> destination ID 0x%x: Request size: 0x%x, Response size: 0x%x\n",
> -      __FUNCTION__,
> +      __func__,
>        MctpType,
>        MctpSourceEndpointId,
>        MctpDestinationEndpointId,
> @@ -426,7 +426,7 @@ CommonMctpSubmitMessage (
>      Status                   = TransferToken.TransferStatus;
>      *AdditionalTransferError = TransferToken.TransportAdditionalStatus;
>      if (EFI_ERROR (Status)) {
> -      DEBUG ((DEBUG_ERROR, "%a: Failed to send MCTP command over %s\n",
> __FUNCTION__, mTransportName));
> +      DEBUG ((DEBUG_ERROR, "%a: Failed to send MCTP command over %s\n",
> __func__, mTransportName));
>        FreePool (MultiPackages);
>        return Status;
>      }
> @@ -449,7 +449,7 @@ CommonMctpSubmitMessage (
>    DEBUG ((
>      DEBUG_MANAGEABILITY_INFO,
>      "%a: Retrieve MCTP message Response size: 0x%x\n",
> -    __FUNCTION__,
> +    __func__,
>      TransferToken.ReceivePackage.ReceiveSizeInByte
>      ));
>    TransportToken->Transport->Function.Version1_0->TransportTransmitReceive (
> @@ -464,7 +464,7 @@ CommonMctpSubmitMessage (
>    *ResponseDataSize        = TransferToken.ReceivePackage.ReceiveSizeInByte;
>    Status                   = TransferToken.TransferStatus;
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to send MCTP command over %s: %r\n",
> __FUNCTION__, mTransportName, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to send MCTP command over %s: %r\n",
> __func__, mTransportName, Status));
>      return Status;
>    }
> 
> diff --git
> a/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c
> b/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c
> index a1cac61e27..88bfd9b7e7 100644
> --- a/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c
> +++ b/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c
> @@ -74,7 +74,7 @@ MctpSubmitMessage (
>    EFI_STATUS  Status;
> 
>    if ((RequestData == NULL) && (ResponseData == NULL)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Both RequestData and ResponseData are
> NULL\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Both RequestData and ResponseData are
> NULL\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
> @@ -127,26 +127,26 @@ DxeMctpEntry (
>               &mTransportToken
>               );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for MCTP
> protocol - %r\n", __FUNCTION__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for MCTP
> protocol - %r\n", __func__, Status));
>      return Status;
>    }
> 
>    Status = GetTransportCapability (mTransportToken, &TransportCapability);
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n",
> __func__));
>      return Status;
>    }
> 
>    mTransportMaximumPayload =
> MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY
> (TransportCapability);
>    if (mTransportMaximumPayload == (1 <<
> MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILA
> BLE)) {
> -    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum
> payload is undefined.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum
> payload is undefined.\n", __func__));
>    } else {
>      mTransportMaximumPayload -= 1;
> -    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for MCTP
> protocol has maximum payload 0x%x.\n", __FUNCTION__,
> mTransportMaximumPayload));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for MCTP
> protocol has maximum payload 0x%x.\n", __func__,
> mTransportMaximumPayload));
>    }
> 
>    mTransportName = HelperManageabilitySpecName (mTransportToken-
> >Transport->ManageabilityTransportSpecification);
> -  DEBUG ((DEBUG_ERROR, "%a: MCTP protocol over %s.\n", __FUNCTION__,
> mTransportName));
> +  DEBUG ((DEBUG_ERROR, "%a: MCTP protocol over %s.\n", __func__,
> mTransportName));
> 
>    //
>    // Setup hardware information according to the transport interface.
> @@ -156,9 +156,9 @@ DxeMctpEntry (
>               );
>    if (EFI_ERROR (Status)) {
>      if (Status == EFI_UNSUPPORTED) {
> -      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport
> interface.\n", __FUNCTION__, mTransportName));
> +      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport
> interface.\n", __func__, mTransportName));
>      } else {
> -      DEBUG ((DEBUG_ERROR, "%a: Failed to setup hardware information of %s
> transport interface.\n", __FUNCTION__, mTransportName));
> +      DEBUG ((DEBUG_ERROR, "%a: Failed to setup hardware information of %s
> transport interface.\n", __func__, mTransportName));
>      }
> 
>      return Status;
> @@ -184,7 +184,7 @@ DxeMctpEntry (
>                                                (VOID **)&mMctpProtocol
>                                                );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to install EDKII MCTP protocol - %r\n",
> __FUNCTION__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to install EDKII MCTP protocol - %r\n",
> __func__, Status));
>    }
> 
>    return Status;
> diff --git
> a/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolCo
> mmon.c
> b/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolCo
> mmon.c
> index bb4d3f61a0..ce1e2cba95 100644
> ---
> a/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolCo
> mmon.c
> +++
> b/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolCo
> mmon.c
> @@ -104,17 +104,17 @@ SetupPldmRequestTransportPacket (
>        (PacketTrailer == NULL) || (PacketTrailerSize == NULL)
>        )
>    {
> -    DEBUG ((DEBUG_ERROR, "%a: One or more than one of the required
> parameters is NULL.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: One or more than one of the required
> parameters is NULL.\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
>    if (CompareGuid (&gManageabilityTransportMctpGuid, TransportToken-
> >Transport->ManageabilityTransportSpecification)) {
> -    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Setup transport header for
> PLDM over MCTP.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Setup transport header for
> PLDM over MCTP.\n", __func__));
> 
>      // This is MCTP transport interface.
>      MctpHeader = AllocateZeroPool (sizeof
> (MANAGEABILITY_MCTP_TRANSPORT_HEADER));
>      if (MctpHeader == NULL) {
> -      DEBUG ((DEBUG_ERROR, "%a: Not enough memory for
> MANAGEABILITY_MCTP_TRANSPORT_HEADER.\n", __FUNCTION__));
> +      DEBUG ((DEBUG_ERROR, "%a: Not enough memory for
> MANAGEABILITY_MCTP_TRANSPORT_HEADER.\n", __func__));
>        return EFI_OUT_OF_RESOURCES;
>      }
> 
> @@ -127,7 +127,7 @@ SetupPldmRequestTransportPacket (
>      *PacketTrailer                           = NULL;
>      *PacketTrailerSize                       = 0;
>    } else {
> -    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.\n",
> __func__));
>      ASSERT (FALSE);
>    }
> 
> @@ -136,7 +136,7 @@ SetupPldmRequestTransportPacket (
>    //
>    PldmRequestHeader = (PLDM_REQUEST_HEADER *)AllocateZeroPool (sizeof
> (PLDM_REQUEST_HEADER) + *PacketBodySize);
>    if (PldmRequestHeader == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for final PLDM request
> message.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for final PLDM request
> message.\n", __func__));
>      return EFI_OUT_OF_RESOURCES;
>    }
> 
> @@ -202,7 +202,7 @@ CommonPldmSubmitCommand (
>    UINT16                                     TrailerSize;
> 
>    if (TransportToken == NULL) {
> -    DEBUG ((DEBUG_ERROR, "%a: No transport token for PLDM\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: No transport token for PLDM\n", __func__));
>      return EFI_UNSUPPORTED;
>    }
> 
> @@ -211,7 +211,7 @@ CommonPldmSubmitCommand (
>                                                               &TransportAdditionalStatus
>                                                               );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Transport %s for PLDM has problem - (%r)\n",
> __FUNCTION__, mTransportName, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Transport %s for PLDM has problem - (%r)\n",
> __func__, mTransportName, Status));
>      return Status;
>    }
> 
> @@ -233,7 +233,7 @@ CommonPldmSubmitCommand (
>                             &TrailerSize
>                             );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __FUNCTION__,
> Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __func__,
> Status));
>      return Status;
>    }
> 
> @@ -274,7 +274,7 @@ CommonPldmSubmitCommand (
>    DEBUG ((
>      DEBUG_MANAGEABILITY_INFO,
>      "%a: Send PLDM type: 0x%x, Command: 0x%x: Request size: 0x%x, Response
> size: 0x%x\n",
> -    __FUNCTION__,
> +    __func__,
>      PldmType,
>      PldmCommand,
>      TransferToken.TransmitPackage.TransmitSizeInByte,
> @@ -409,7 +409,7 @@ CommonPldmSubmitCommand (
>  ErrorExit:
>    Status = TransferToken.TransferStatus;
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to send PLDM command over %s\n",
> __FUNCTION__, mTransportName));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to send PLDM command over %s\n",
> __func__, mTransportName));
>    }
> 
>  ErrorExit2:
> diff --git
> a/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c
> b/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c
> index bb34fec16e..b2ca69b05f 100644
> --- a/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c
> +++ b/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c
> @@ -57,7 +57,7 @@ PldmSubmitCommand (
>    EFI_STATUS  Status;
> 
>    if ((RequestData == NULL) && (ResponseData == NULL)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Both RequestData and ResponseData are
> NULL\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Both RequestData and ResponseData are
> NULL\n", __func__));
>      return EFI_INVALID_PARAMETER;
>    }
> 
> @@ -106,26 +106,26 @@ DxePldmProtocolEntry (
>               &mTransportToken
>               );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for PLDM
> protocol - %r\n", __FUNCTION__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for PLDM
> protocol - %r\n", __func__, Status));
>      return Status;
>    }
> 
>    Status = GetTransportCapability (mTransportToken, &TransportCapability);
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n",
> __func__));
>      return Status;
>    }
> 
>    TransportMaximumPayload =
> MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY
> (TransportCapability);
>    if (TransportMaximumPayload == (1 <<
> MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILA
> BLE)) {
> -    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum
> payload is undefined.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum
> payload is undefined.\n", __func__));
>    } else {
>      TransportMaximumPayload -= 1;
> -    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for PLDM
> protocol has maximum payload 0x%x.\n", __FUNCTION__,
> TransportMaximumPayload));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for PLDM
> protocol has maximum payload 0x%x.\n", __func__, TransportMaximumPayload));
>    }
> 
>    mTransportName = HelperManageabilitySpecName (mTransportToken-
> >Transport->ManageabilityTransportSpecification);
> -  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: PLDM protocol over %s.\n",
> __FUNCTION__, mTransportName));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: PLDM protocol over %s.\n",
> __func__, mTransportName));
> 
>    // Initial transport interface with the hardware information assigned.
>    HardwareInfo.Pointer = NULL;
> @@ -149,7 +149,7 @@ DxePldmProtocolEntry (
>                                                (VOID **)&mPldmProtocol
>                                                );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Failed to install EDKII PLDM protocol - %r\n",
> __FUNCTION__, Status));
> +    DEBUG ((DEBUG_ERROR, "%a: Failed to install EDKII PLDM protocol - %r\n",
> __func__, Status));
>    }
> 
>    return Status;
> diff --git
> a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTra
> nsferDxe.c
> b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTra
> nsferDxe.c
> index 88b190757d..f897162bb5 100644
> ---
> a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTra
> nsferDxe.c
> +++
> b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTra
> nsferDxe.c
> @@ -147,7 +147,7 @@ GetSmbiosStructureTableMetaData (
>    EFI_STATUS  Status;
>    UINT32      ResponseSize;
> 
> -  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table metafile.\n",
> __FUNCTION__));
> +  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table metafile.\n",
> __func__));
> 
>    ResponseSize = sizeof (PLDM_SMBIOS_STRUCTURE_TABLE_METADATA);
>    Status       = PldmSubmitCommand (
> @@ -159,7 +159,7 @@ GetSmbiosStructureTableMetaData (
>                     &ResponseSize
>                     );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Fails to get SMBIOS structure table
> metafile.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Fails to get SMBIOS structure table
> metafile.\n", __func__));
>    }
> 
>    if (ResponseSize != 0) {
> @@ -194,7 +194,7 @@ SetSmbiosStructureTableMetaData (
>    UINT32      ResponseSize;
>    UINT32      RequestSize;
> 
> -  DEBUG ((DEBUG_INFO, "%a: Get SMBIOS structure table metafile.\n",
> __FUNCTION__));
> +  DEBUG ((DEBUG_INFO, "%a: Get SMBIOS structure table metafile.\n",
> __func__));
> 
>    RequestSize  = sizeof (PLDM_SMBIOS_STRUCTURE_TABLE_METADATA);
>    ResponseSize = 0;
> @@ -208,7 +208,7 @@ SetSmbiosStructureTableMetaData (
>               &ResponseSize
>               );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Fails to set SMBIOS structure table
> metafile.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Fails to set SMBIOS structure table
> metafile.\n", __func__));
>    }
> 
>    return Status;
> @@ -236,7 +236,7 @@ GetSmbiosStructureTable (
>    OUT  UINT32                               *BufferSize
>    )
>  {
> -  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __FUNCTION__));
> +  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
>    // Only support PLDM SMBIOS Transfer push mode.
>    return EFI_UNSUPPORTED;
>  }
> @@ -272,7 +272,7 @@ SetSmbiosStructureTable (
>    EFI_SMBIOS_TABLE_HEADER                  *Record;
>    PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST
> *PldmSetSmbiosStructureTable;
> 
> -  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table.\n", __FUNCTION__));
> +  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table.\n", __func__));
> 
>    Status = gBS->LocateProtocol (
>                    &gEfiSmbiosProtocolGuid,
> @@ -382,7 +382,7 @@ SetSmbiosStructureTable (
>    }
> 
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Set SMBIOS structure table.\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Set SMBIOS structure table.\n", __func__));
>    }
> 
>    if ((ResponseSize != 0) && (ResponseSize <= sizeof
> (SetSmbiosStructureTableHandle))) {
> @@ -422,7 +422,7 @@ GetSmbiosStructureByType (
>    OUT  UINT32                               *BufferSize
>    )
>  {
> -  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __FUNCTION__));
> +  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
>    // Only support PLDM SMBIOS Transfer push mode.
>    return EFI_UNSUPPORTED;
>  }
> @@ -451,7 +451,7 @@ GetSmbiosStructureByHandle (
>    OUT  UINT32                               *BufferSize
>    )
>  {
> -  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __FUNCTION__));
> +  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
>    // Only support PLDM SMBIOS Transfer push mode.
>    return EFI_UNSUPPORTED;
>  }
> @@ -486,7 +486,7 @@ DxePldmSmbiosTransferEntry (
>    EFI_HANDLE  Handle;
>    EFI_STATUS  Status;
> 
> -  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__));
> +  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));
> 
>    SetSmbiosStructureTableHandle = 0;
> 
> @@ -500,7 +500,7 @@ DxePldmSmbiosTransferEntry (
>                                                              (VOID **)&mPldmSmbiosTransferProtocol
>                                                              );
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: Fail to install
> EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL.\n", __FUNCTION__));
> +    DEBUG ((DEBUG_ERROR, "%a: Fail to install
> EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL.\n", __func__));
>    }
> 
>    return Status;
> --
> 2.37.1.windows.1


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

* Re: [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use DEBUG_MANAGEABILITY
  2023-05-30  6:33 ` [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use DEBUG_MANAGEABILITY Chang, Abner
@ 2023-05-30  6:52   ` Nickle Wang
  2023-05-30  8:48   ` Attar, AbdulLateef (Abdul Lateef)
  1 sibling, 0 replies; 7+ messages in thread
From: Nickle Wang @ 2023-05-30  6:52 UTC (permalink / raw)
  To: abner.chang@amd.com, devel@edk2.groups.io
  Cc: Isaac Oram, Abdul Lateef Attar, Tinh Nguyen

Reviewed-by: Nickle Wang <nicklew@nvidia.com>

Regards,
Nickle

> -----Original Message-----
> From: abner.chang@amd.com <abner.chang@amd.com>
> Sent: Tuesday, May 30, 2023 2:33 PM
> To: devel@edk2.groups.io
> Cc: Isaac Oram <isaac.w.oram@intel.com>; Abdul Lateef Attar
> <abdattar@amd.com>; Nickle Wang <nicklew@nvidia.com>; Tinh Nguyen
> <tinhnguyen@os.amperecomputing.com>
> Subject: [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use
> DEBUG_MANAGEABILITY
> 
> External email: Use caution opening links or attachments
> 
> 
> From: Abner Chang <abner.chang@amd.com>
> 
> Use debug print level DEBUG_MANAGEABILITY in
> ManageabilityPkg.
> 
> Signed-off-by: Abner Chang <abner.chang@amd.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Abdul Lateef Attar <abdattar@amd.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
> ---
>  .../Library/ManageabilityTransportHelperLib.h      |  2 +-
>  .../BaseManageabilityTransportHelper.c             |  2 +-
>  .../Universal/IpmiBmcAcpi/BmcAcpi.c                |  6 ++++--
>  .../Universal/IpmiBmcElog/BmcElog.c                |  4 +++-
>  .../ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c    |  8 +++++---
>  .../PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c  | 14 +++++++-------
>  6 files changed, 21 insertions(+), 15 deletions(-)
> 
> diff --git
> a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelperLib.
> h
> b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelperLib.
> h
> index 11a1bd0521..dfe32189ad 100644
> ---
> a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelperLib.
> h
> +++
> b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelperLib.
> h
> @@ -11,7 +11,7 @@
> 
>  #include <Library/ManageabilityTransportLib.h>
> 
> -#define DEBUG_MANAGEABILITY_INFO  DEBUG_INFO
> +#define DEBUG_MANAGEABILITY_INFO  DEBUG_MANAGEABILITY
> 
>  typedef struct _MANAGEABILITY_PROTOCOL_NAME
> MANAGEABILITY_PROTOCOL_NAME;
> 
> diff --git
> a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/Bas
> eManageabilityTransportHelper.c
> b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/Bas
> eManageabilityTransportHelper.c
> index f72957ea7f..27bc5eaddf 100644
> ---
> a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/Bas
> eManageabilityTransportHelper.c
> +++
> b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/Bas
> eManageabilityTransportHelper.c
> @@ -163,7 +163,7 @@ HelperAcquireManageabilityTransport (
>    CHAR16      *ManageabilityProtocolName;
>    CHAR16      *ManageabilityTransportName;
> 
> -  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Entry\n", __func__));
>    if ((TransportToken == NULL) || (ManageabilityProtocolSpec == NULL)) {
>      DEBUG ((DEBUG_ERROR, "%a: One of the required input parameters is
> NULL.\n", __func__));
>      return EFI_INVALID_PARAMETER;
> diff --git a/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c
> b/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c
> index cf066dd095..d04623ecad 100644
> --- a/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c
> +++ b/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c
> @@ -24,6 +24,8 @@
>  #include <Library/BaseMemoryLib.h>
>  #include <Library/UefiLib.h>
> 
> +#include <Library/ManageabilityTransportHelperLib.h>
> +
>  #ifndef EFI_ACPI_CREATOR_ID
>  #define EFI_ACPI_CREATOR_ID  SIGNATURE_32 ('M', 'S', 'F', 'T')
>  #endif
> @@ -140,7 +142,7 @@ UpdateDeviceSsdtTable (
>    //
>    // Update IO(Decode16, 0xCA2, 0xCA2, 0, 2)
>    //
> -  DEBUG ((DEBUG_INFO, "UpdateDeviceSsdtTable - IPMI\n"));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "UpdateDeviceSsdtTable - IPMI\n"));
>    for (DataPtr = (UINT8 *)(Table + 1);
>         DataPtr < (UINT8 *)((UINT8 *)Table + Table->Length - 4);
>         DataPtr++)
> @@ -158,7 +160,7 @@ UpdateDeviceSsdtTable (
>        ASSERT (IoRsc->Header.Bits.Type == ACPI_SMALL_ITEM_FLAG);
>        ASSERT (IoRsc->Header.Bits.Name ==
> ACPI_SMALL_IO_PORT_DESCRIPTOR_NAME);
>        ASSERT (IoRsc->Header.Bits.Length == sizeof
> (EFI_ACPI_IO_PORT_DESCRIPTOR) - sizeof (ACPI_SMALL_RESOURCE_HEADER));
> -      DEBUG ((DEBUG_INFO, "IPMI IO Base in ASL update - 0x%04x <= 0x%04x\n",
> IoRsc->BaseAddressMin, PcdGet16 (PcdIpmiKcsIoBaseAddress)));
> +      DEBUG ((DEBUG_MANAGEABILITY_INFO, "IPMI IO Base in ASL update -
> 0x%04x <= 0x%04x\n", IoRsc->BaseAddressMin, PcdGet16
> (PcdIpmiKcsIoBaseAddress)));
>        IoRsc->BaseAddressMin = PcdGet16 (PcdIpmiKcsIoBaseAddress);
>        IoRsc->BaseAddressMax = PcdGet16 (PcdIpmiKcsIoBaseAddress);
>      }
> diff --git a/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c
> b/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c
> index 02873fc4c6..8b34b2d2d5 100644
> --- a/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c
> +++ b/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c
> @@ -15,6 +15,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>  #include <Library/UefiRuntimeServicesTableLib.h>
>  #include <Library/IpmiCommandLib.h>
> 
> +#include <Library/ManageabilityTransportHelperLib.h>
> +
>  EFI_STATUS
>  EFIAPI
>  CheckIfSelIsFull (
> @@ -186,7 +188,7 @@ CheckIfSelIsFull (
>    // Check the Bit7 of the OperationByte if SEL is OverFlow.
>    //
>    SelIsFull = (SelInfo.OperationSupport & 0x80);
> -  DEBUG ((DEBUG_INFO, "SelIsFull - 0x%x\n", SelIsFull));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "SelIsFull - 0x%x\n", SelIsFull));
> 
>    return EFI_SUCCESS;
>  }
> diff --git a/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c
> b/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c
> index 46f741eed1..40ae0c3ecc 100644
> --- a/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c
> +++ b/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c
> @@ -16,6 +16,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>  #include <Library/IpmiCommandLib.h>
>  #include <IndustryStandard/Ipmi.h>
> 
> +#include <Library/ManageabilityTransportHelperLib.h>
> +
>  /**
>    This routine disables the specified FRB timer.
> 
> @@ -159,7 +161,7 @@ ReportFrb2Status (
>    //
>    Status = IpmiGetWatchdogTimer (&GetWatchdogTimer);
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_INFO, "Failed to get Watchdog Timer info from BMC.\n"));
> +    DEBUG ((DEBUG_ERROR, "Failed to get Watchdog Timer info from BMC.\n"));
>      return Status;
>    }
> 
> @@ -167,9 +169,9 @@ ReportFrb2Status (
>    // Check if timer is running, report status to DEBUG_MODE output.
>    //
>    if (GetWatchdogTimer.TimerUse.Bits.TimerRunning == 1) {
> -    DEBUG ((DEBUG_INFO, "FRB2 Timer is running.\n"));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "FRB2 Timer is running.\n"));
>    } else {
> -    DEBUG ((DEBUG_INFO, "FRB2 Timer is not running.\n"));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "FRB2 Timer is not running.\n"));
>    }
> 
>    return EFI_SUCCESS;
> diff --git
> a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTra
> nsferDxe.c
> b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTra
> nsferDxe.c
> index f897162bb5..fdf033f0b1 100644
> ---
> a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTra
> nsferDxe.c
> +++
> b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTra
> nsferDxe.c
> @@ -147,7 +147,7 @@ GetSmbiosStructureTableMetaData (
>    EFI_STATUS  Status;
>    UINT32      ResponseSize;
> 
> -  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table metafile.\n",
> __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Set SMBIOS structure table
> metafile.\n", __func__));
> 
>    ResponseSize = sizeof (PLDM_SMBIOS_STRUCTURE_TABLE_METADATA);
>    Status       = PldmSubmitCommand (
> @@ -194,7 +194,7 @@ SetSmbiosStructureTableMetaData (
>    UINT32      ResponseSize;
>    UINT32      RequestSize;
> 
> -  DEBUG ((DEBUG_INFO, "%a: Get SMBIOS structure table metafile.\n",
> __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Get SMBIOS structure table
> metafile.\n", __func__));
> 
>    RequestSize  = sizeof (PLDM_SMBIOS_STRUCTURE_TABLE_METADATA);
>    ResponseSize = 0;
> @@ -236,7 +236,7 @@ GetSmbiosStructureTable (
>    OUT  UINT32                               *BufferSize
>    )
>  {
> -  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Unsupported.\n", __func__));
>    // Only support PLDM SMBIOS Transfer push mode.
>    return EFI_UNSUPPORTED;
>  }
> @@ -272,7 +272,7 @@ SetSmbiosStructureTable (
>    EFI_SMBIOS_TABLE_HEADER                  *Record;
>    PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST
> *PldmSetSmbiosStructureTable;
> 
> -  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table.\n", __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Set SMBIOS structure table.\n",
> __func__));
> 
>    Status = gBS->LocateProtocol (
>                    &gEfiSmbiosProtocolGuid,
> @@ -422,7 +422,7 @@ GetSmbiosStructureByType (
>    OUT  UINT32                               *BufferSize
>    )
>  {
> -  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Unsupported.\n", __func__));
>    // Only support PLDM SMBIOS Transfer push mode.
>    return EFI_UNSUPPORTED;
>  }
> @@ -451,7 +451,7 @@ GetSmbiosStructureByHandle (
>    OUT  UINT32                               *BufferSize
>    )
>  {
> -  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Unsupported.\n", __func__));
>    // Only support PLDM SMBIOS Transfer push mode.
>    return EFI_UNSUPPORTED;
>  }
> @@ -486,7 +486,7 @@ DxePldmSmbiosTransferEntry (
>    EFI_HANDLE  Handle;
>    EFI_STATUS  Status;
> 
> -  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Entry.\n", __func__));
> 
>    SetSmbiosStructureTableHandle = 0;
> 
> --
> 2.37.1.windows.1


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

* Re: [edk2-platforms][PATCH 1/2] ManageabilityPkg: Replace __FUNCTION__ with __func__
  2023-05-30  6:33 [edk2-platforms][PATCH 1/2] ManageabilityPkg: Replace __FUNCTION__ with __func__ Chang, Abner
  2023-05-30  6:33 ` [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use DEBUG_MANAGEABILITY Chang, Abner
  2023-05-30  6:51 ` [edk2-platforms][PATCH 1/2] ManageabilityPkg: Replace __FUNCTION__ with __func__ Nickle Wang
@ 2023-05-30  8:47 ` Attar, AbdulLateef (Abdul Lateef)
  2 siblings, 0 replies; 7+ messages in thread
From: Attar, AbdulLateef (Abdul Lateef) @ 2023-05-30  8:47 UTC (permalink / raw)
  To: Chang, Abner, devel@edk2.groups.io; +Cc: Isaac Oram, Nickle Wang, Tinh Nguyen

[AMD Official Use Only - General]

Reviewed-by: Abdul Lateef Attar <abdattar@amd.com>

-----Original Message-----
From: Chang, Abner <Abner.Chang@amd.com>
Sent: Tuesday, May 30, 2023 12:03 PM
To: devel@edk2.groups.io
Cc: Isaac Oram <isaac.w.oram@intel.com>; Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Nickle Wang <nicklew@nvidia.com>; Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
Subject: [edk2-platforms][PATCH 1/2] ManageabilityPkg: Replace __FUNCTION__ with __func__

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

Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Abdul Lateef Attar <abdattar@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
---
 .../BaseManageabilityTransportHelper.c        | 36 +++++++++----------
 .../Common/KcsCommon.c                        | 12 +++----
 .../Dxe/ManageabilityTransportKcs.c           | 28 +++++++--------
 .../Dxe/ManageabilityTransportMctp.c          | 22 ++++++------
 .../PldmProtocolLibrary/Dxe/PldmProtocolLib.c |  4 +--
 .../IpmiProtocol/Common/IpmiProtocolCommon.c  | 14 ++++----
 .../Universal/IpmiProtocol/Dxe/IpmiProtocol.c | 14 ++++----
 .../Universal/IpmiProtocol/Pei/IpmiPpi.c      | 18 +++++-----
 .../Universal/IpmiProtocol/Smm/IpmiProtocol.c | 14 ++++----
 .../MctpProtocol/Common/MctpProtocolCommon.c  | 30 ++++++++--------
 .../Universal/MctpProtocol/Dxe/MctpProtocol.c | 18 +++++-----
 .../PldmProtocol/Common/PldmProtocolCommon.c  | 20 +++++------
 .../Universal/PldmProtocol/Dxe/PldmProtocol.c | 14 ++++----
 .../PldmSmbiosTransferDxe.c                   | 22 ++++++------
 14 files changed, 133 insertions(+), 133 deletions(-)

diff --git a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c
index ce68f89531..f72957ea7f 100644
--- a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c
+++ b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c
@@ -49,7 +49,7 @@ HelperManageabilitySpecName (
   }

   if ((SpecificationGuid == NULL) || IsZeroGuid (SpecificationGuid)) {
-    DEBUG ((DEBUG_ERROR, "%a: Improper input GUIDs, could be NULL or zero GUID.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Improper input GUIDs, could be NULL or zero GUID.\n", __func__));
     return NULL;
   }

@@ -106,7 +106,7 @@ HelperManageabilityCheckSupportedSpec (
       IsZeroGuid (ManageabilityProtocolToCheck)
       )
   {
-    DEBUG ((DEBUG_ERROR, "%a: Improper input GUIDs, could be NULL or zero GUID.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Improper input GUIDs, could be NULL or zero GUID.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

@@ -120,7 +120,7 @@ HelperManageabilityCheckSupportedSpec (
       DEBUG ((
         DEBUG_MANAGEABILITY_INFO,
         "%a: Transport interface %s supports %s manageability specification.\n",
-        __FUNCTION__,
+        __func__,
         HelperManageabilitySpecName (TransportGuid),
         HelperManageabilitySpecName (ManageabilityProtocolToCheck)
         ));
@@ -133,7 +133,7 @@ HelperManageabilityCheckSupportedSpec (
   DEBUG ((
     DEBUG_ERROR,
     "%a: Transport interface %s doesn't support %s manageability specification.\n",
-    __FUNCTION__,
+    __func__,
     HelperManageabilitySpecName (TransportGuid),
     HelperManageabilitySpecName (ManageabilityProtocolToCheck)
     ));
@@ -163,16 +163,16 @@ HelperAcquireManageabilityTransport (
   CHAR16      *ManageabilityProtocolName;
   CHAR16      *ManageabilityTransportName;

-  DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
   if ((TransportToken == NULL) || (ManageabilityProtocolSpec == NULL)) {
-    DEBUG ((DEBUG_ERROR, "%a: One of the required input parameters is NULL.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: One of the required input parameters is NULL.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

   *TransportToken           = NULL;
   ManageabilityProtocolName = HelperManageabilitySpecName (ManageabilityProtocolSpec);
   if (ManageabilityProtocolName == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Unsupported Manageability Protocol Specification.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Unsupported Manageability Protocol Specification.\n", __func__));
     return EFI_UNSUPPORTED;
   }

@@ -180,7 +180,7 @@ HelperAcquireManageabilityTransport (

   Status = AcquireTransportSession (ManageabilityProtocolSpec, TransportToken);
   if (Status == EFI_UNSUPPORTED) {
-    DEBUG ((DEBUG_ERROR, "%a: No supported transport interface for %s packet.\n", __FUNCTION__, ManageabilityProtocolName));
+    DEBUG ((DEBUG_ERROR, "%a: No supported transport interface for %s packet.\n", __func__, ManageabilityProtocolName));
     return Status;
   }

@@ -188,7 +188,7 @@ HelperAcquireManageabilityTransport (
     DEBUG ((
       DEBUG_ERROR,
       "%a: Fail to acquire Manageability transport token for %s (%r).\n",
-      __FUNCTION__,
+      __func__,
       ManageabilityProtocolName,
       Status
       ));
@@ -197,11 +197,11 @@ HelperAcquireManageabilityTransport (

   ManageabilityTransportName = HelperManageabilitySpecName ((*TransportToken)->Transport->ManageabilityTransportSpecification);
   if (ManageabilityTransportName == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Unsupported Manageability Transport Interface Specification\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Unsupported Manageability Transport Interface Specification\n", __func__));
     return EFI_UNSUPPORTED;
   }

-  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: This is the transfer session for %s over %s\n", __FUNCTION__, ManageabilityProtocolName, ManageabilityTransportName));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: This is the transfer session for %s over %s\n", __func__, ManageabilityProtocolName, ManageabilityTransportName));
   return Status;
 }

@@ -227,7 +227,7 @@ HelperInitManageabilityTransport (
   EFI_STATUS  Status;

   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: TransportToken is invalid.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: TransportToken is invalid.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

@@ -242,20 +242,20 @@ HelperInitManageabilityTransport (
                                                                  );
       if (EFI_ERROR (Status)) {
         if (Status == EFI_UNSUPPORTED) {
-          DEBUG ((DEBUG_ERROR, "%a: Transport interface doesn't have reset capability.\n", __FUNCTION__));
+          DEBUG ((DEBUG_ERROR, "%a: Transport interface doesn't have reset capability.\n", __func__));
         } else {
-          DEBUG ((DEBUG_ERROR, "%a: Fail to reset transport interface (%r).\n", __FUNCTION__, Status));
+          DEBUG ((DEBUG_ERROR, "%a: Fail to reset transport interface (%r).\n", __func__, Status));
         }

         Status = EFI_DEVICE_ERROR;
       } else {
         Status = TransportToken->Transport->Function.Version1_0->TransportInit (TransportToken, HardwareInfo);
         if (EFI_ERROR (Status)) {
-          DEBUG ((DEBUG_ERROR, "%a: Transport interface is not able to use after the reset (%r).\n", __FUNCTION__, Status));
+          DEBUG ((DEBUG_ERROR, "%a: Transport interface is not able to use after the reset (%r).\n", __func__, Status));
         }
       }
     } else {
-      DEBUG ((DEBUG_ERROR, "%a: Transport interface is not able to use (%r).\n", __FUNCTION__, Status));
+      DEBUG ((DEBUG_ERROR, "%a: Transport interface is not able to use (%r).\n", __func__, Status));
     }
   }

@@ -343,7 +343,7 @@ HelperManageabilitySplitPayload (
     DEBUG ((
       DEBUG_ERROR,
       "%a: (Preamble 0x%x + PostambleSize 0x%x) is greater than MaximumTransferUnit 0x%x.\n",
-      __FUNCTION__,
+      __func__,
       PreambleSize,
       PostambleSize,
       MaximumTransferUnit
@@ -373,7 +373,7 @@ HelperManageabilitySplitPayload (
   }

   if (TotalPayloadRemaining != 0) {
-    DEBUG ((DEBUG_ERROR, "%a: Error processing multiple packages (TotalPayloadRemaining != 0)\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Error processing multiple packages (TotalPayloadRemaining != 0)\n", __func__));
     FreePool (ThisMultiplePackages);
     return EFI_INVALID_PARAMETER;
   }
diff --git a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Common/KcsCommon.c b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Common/KcsCommon.c
index 4693e7f06f..d5b54c04be 100644
--- a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Common/KcsCommon.c
+++ b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Common/KcsCommon.c
@@ -143,7 +143,7 @@ KcsTransportWrite (
       ((RequestData != NULL) && (RequestDataSize == 0))
       )
   {
-    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of RequestData or RequestDataSize.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of RequestData or RequestDataSize.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

@@ -152,7 +152,7 @@ KcsTransportWrite (
       ((TransmitHeader != NULL) && (TransmitHeaderSize == 0))
       )
   {
-    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of TransmitHeader or TransmitHeaderSize.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of TransmitHeader or TransmitHeaderSize.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

@@ -161,7 +161,7 @@ KcsTransportWrite (
       ((TransmitTrailer != NULL) && (TransmitTrailerSize == 0))
       )
   {
-    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of TransmitTrailer or TransmitTrailerSize.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of TransmitTrailer or TransmitTrailerSize.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

@@ -325,7 +325,7 @@ KcsTransportRead (
   UINT32      ReadLength;

   if ((DataByte == NULL) || (*Length == 0)) {
-    DEBUG ((DEBUG_ERROR, "%a: Either DataByte is NULL or Length is 0.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Either DataByte is NULL or Length is 0.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

@@ -430,12 +430,12 @@ KcsTransportSendCommand (
   CHAR16                    *CompletionCodeStr;

   if ((RequestData != NULL) && (RequestDataSize == 0)) {
-    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of RequestData and RequestDataSize\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of RequestData and RequestDataSize\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

   if ((ResponseData != NULL) && ((ResponseDataSize != NULL) && (*ResponseDataSize == 0))) {
-    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of ResponseData and ResponseDataSize\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Mismatched values of ResponseData and ResponseDataSize\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

diff --git a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/ManageabilityTransportKcs.c b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/ManageabilityTransportKcs.c
index c690bea74e..9bd8ff4c0a 100644
--- a/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/ManageabilityTransportKcs.c
+++ b/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/ManageabilityTransportKcs.c
@@ -58,12 +58,12 @@ KcsTransportInit (
   CHAR16  *ManageabilityProtocolName;

   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

   if (HardwareInfo.Kcs == NULL) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Hardware information is not provided, use dfault settings.\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Hardware information is not provided, use dfault settings.\n", __func__));
     mKcsHardwareInfo.MemoryMap                    = MANAGEABILITY_TRANSPORT_KCS_IO_MAP_IO;
     mKcsHardwareInfo.IoBaseAddress.IoAddress16    = PcdGet16 (PcdIpmiKcsIoBaseAddress);
     mKcsHardwareInfo.IoDataInAddress.IoAddress16  = mKcsHardwareInfo.IoBaseAddress.IoAddress16 + IPMI_KCS_DATA_IN_REGISTER_OFFSET;
@@ -82,9 +82,9 @@ KcsTransportInit (
   // Get protocol specification name.
   ManageabilityProtocolName = HelperManageabilitySpecName (TransportToken->ManageabilityProtocolSpecification);

-  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: KCS transport hardware for %s is:\n", __FUNCTION__, ManageabilityProtocolName));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: KCS transport hardware for %s is:\n", __func__, ManageabilityProtocolName));
   if (mKcsHardwareInfo.MemoryMap) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "Memory Map I/O\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "Memory Map I/O\n", __func__));
     DEBUG ((DEBUG_MANAGEABILITY_INFO, "Base Memory Address : 0x%08x\n", mKcsHardwareInfo.IoBaseAddress.IoAddress32));
     DEBUG ((DEBUG_MANAGEABILITY_INFO, "Data in Address     : 0x%08x\n", mKcsHardwareInfo.IoDataInAddress.IoAddress32));
     DEBUG ((DEBUG_MANAGEABILITY_INFO, "Data out Address    : 0x%08x\n", mKcsHardwareInfo.IoDataOutAddress.IoAddress32));
@@ -134,7 +134,7 @@ KcsTransportStatus (
   UINT8  TransportStatus;

   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

@@ -223,7 +223,7 @@ KcsTransportTransmitReceive (
   MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS  AdditionalStatus;

   if ((TransportToken == NULL) || (TransferToken == NULL)) {
-    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token or transfer token.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token or transfer token.\n", __func__));
     return;
   }

@@ -267,12 +267,12 @@ AcquireTransportSession (
   MANAGEABILITY_TRANSPORT_KCS  *KcsTransportToken;

   if (ManageabilityProtocolSpec == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: No Manageability protocol specification specified.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No Manageability protocol specification specified.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: TransportToken is NULL.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: TransportToken is NULL.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

@@ -283,25 +283,25 @@ AcquireTransportSession (
              ManageabilityProtocolSpec
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Protocol is not supported on this transport interface.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Protocol is not supported on this transport interface.\n", __func__));
     return EFI_UNSUPPORTED;
   }

   if (mSingleSessionToken != NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: This manageability transport library only supports one session transport token.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: This manageability transport library only supports one session transport token.\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }

   KcsTransportToken = AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT_KCS));
   if (KcsTransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_KCS\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_KCS\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }

   KcsTransportToken->Token.Transport = AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT));
   if (KcsTransportToken->Token.Transport == NULL) {
     FreePool (KcsTransportToken);
-    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }

@@ -312,7 +312,7 @@ AcquireTransportSession (
   KcsTransportToken->Token.Transport->TransportName                       = L"KCS";
   KcsTransportToken->Token.Transport->Function.Version1_0                 = AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT_FUNCTION_V1_0));
   if (KcsTransportToken->Token.Transport->Function.Version1_0 == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_FUNCTION_V1_0\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_FUNCTION_V1_0\n", __func__));
     FreePool (KcsTransportToken);
     FreePool (KcsTransportToken->Token.Transport);
     return EFI_OUT_OF_RESOURCES;
@@ -406,7 +406,7 @@ ReleaseTransportSession (
   }

   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to release KCS transport token (%r).\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to release KCS transport token (%r).\n", __func__, Status));
   }

   return Status;
diff --git a/Features/ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/ManageabilityTransportMctp.c b/Features/ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/ManageabilityTransportMctp.c
index eaf02bbb0a..c520e2302d 100644
--- a/Features/ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/ManageabilityTransportMctp.c
+++ b/Features/ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/ManageabilityTransportMctp.c
@@ -86,7 +86,7 @@ MctpTransportStatus (
   )
 {
   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

@@ -161,7 +161,7 @@ MctpTransportTransmitReceive (
   MANAGEABILITY_MCTP_TRANSPORT_HEADER  *TransmitHeader;

   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Invalid transport token.\n", __func__));
     TransferToken->TransportAdditionalStatus = MANAGEABILITY_TRANSPORT_ADDITIONAL_STATUS_NOT_AVAILABLE;
     return;
   }
@@ -183,7 +183,7 @@ MctpTransportTransmitReceive (
       //
       // Dxe MCTP Protocol is not installed.
       //
-      DEBUG ((DEBUG_ERROR, "%a: EDKII MCTP protocol is not found - %r\n", __FUNCTION__, Status));
+      DEBUG ((DEBUG_ERROR, "%a: EDKII MCTP protocol is not found - %r\n", __func__, Status));
       return;
     }
   }
@@ -191,7 +191,7 @@ MctpTransportTransmitReceive (
   DEBUG ((
     DEBUG_MANAGEABILITY_INFO,
     "%a: MCTP message type: 0x%x, SourceEndpointId: 0x%x, DestinationEndpointId: 0x%x\n",
-    __FUNCTION__,
+    __func__,
     TransmitHeader->MessageHeader.MessageType,
     TransmitHeader->SourceEndpointId,
     TransmitHeader->DestinationEndpointId
@@ -242,7 +242,7 @@ AcquireTransportSession (
   MANAGEABILITY_TRANSPORT_MCTP  *MctpTransportToken;

   if (ManageabilityProtocolSpec == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: No Manageability protocol specification specified.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No Manageability protocol specification specified.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

@@ -253,25 +253,25 @@ AcquireTransportSession (
              ManageabilityProtocolSpec
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Protocol is not supported on this transport interface.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Protocol is not supported on this transport interface.\n", __func__));
     return EFI_UNSUPPORTED;
   }

   if (mSingleSessionToken != NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: This manageability transport library only supports one session transport token.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: This manageability transport library only supports one session transport token.\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }

   MctpTransportToken = (MANAGEABILITY_TRANSPORT_MCTP *)AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT_MCTP));
   if (MctpTransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_MCTP\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_MCTP\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }

   MctpTransportToken->Token.Transport = AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT));
   if (MctpTransportToken->Token.Transport == NULL) {
     FreePool (MctpTransportToken);
-    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }

@@ -282,7 +282,7 @@ AcquireTransportSession (
   MctpTransportToken->Token.Transport->TransportName                       = L"MCTP";
   MctpTransportToken->Token.Transport->Function.Version1_0                 = AllocateZeroPool (sizeof (MANAGEABILITY_TRANSPORT_FUNCTION_V1_0));
   if (MctpTransportToken->Token.Transport->Function.Version1_0 == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_FUNCTION_V1_0\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for MANAGEABILITY_TRANSPORT_FUNCTION_V1_0\n", __func__));
     FreePool (MctpTransportToken);
     FreePool (MctpTransportToken->Token.Transport);
     return EFI_OUT_OF_RESOURCES;
@@ -360,7 +360,7 @@ ReleaseTransportSession (
   }

   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to release MCTP transport token (%r).\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to release MCTP transport token (%r).\n", __func__, Status));
   }

   return Status;
diff --git a/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtocolLib.c b/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtocolLib.c
index 96727054ce..267bd8fbc1 100644
--- a/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtocolLib.c
+++ b/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtocolLib.c
@@ -55,12 +55,12 @@ PldmSubmitCommand (
       //
       // Dxe PLDM Protocol is not installed. So, PLDM device is not present.
       //
-      DEBUG ((DEBUG_ERROR, "%a: EDKII PLDM protocol is not found - %r\n", __FUNCTION__, Status));
+      DEBUG ((DEBUG_ERROR, "%a: EDKII PLDM protocol is not found - %r\n", __func__, Status));
       return EFI_NOT_FOUND;
     }
   }

-  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: PLDM Type: 0x%x, Command: 0x%x\n", __FUNCTION__, PldmType, Command));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: PLDM Type: 0x%x, Command: 0x%x\n", __func__, PldmType, Command));
   if ((RequestData != NULL) && (RequestDataSize != 0)) {
     HelperManageabilityDebugPrint ((VOID *)RequestData, RequestDataSize, "PLDM PLDM application layer Type/Command specific request payload\n");
   }
diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolCommon.c b/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolCommon.c
index b055bad7da..6a09280bcc 100644
--- a/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolCommon.c
+++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Common/IpmiProtocolCommon.c
@@ -39,7 +39,7 @@ SetupIpmiTransportHardwareInformation (

   KcsHardwareInfo = AllocatePool (sizeof (MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO));
   if (KcsHardwareInfo == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO.\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }

@@ -54,7 +54,7 @@ SetupIpmiTransportHardwareInformation (
     HardwareInformation->Kcs                      = KcsHardwareInfo;
     return EFI_SUCCESS;
   } else {
-    DEBUG ((DEBUG_ERROR, "%a: No implementation of setting hardware information.", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No implementation of setting hardware information.", __func__));
     ASSERT (FALSE);
   }

@@ -131,7 +131,7 @@ SetupIpmiRequestTransportPacket (
       *PacketBodySize = 0;
     }
   } else {
-    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.", __func__));
     ASSERT (FALSE);
   }

@@ -179,7 +179,7 @@ CommonIpmiSubmitCommand (
   UINT16                                     TrailerSize;

   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: No transport toke for IPMI\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No transport toke for IPMI\n", __func__));
     return EFI_UNSUPPORTED;
   }

@@ -188,7 +188,7 @@ CommonIpmiSubmitCommand (
                                                              &TransportAdditionalStatus
                                                              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Transport for IPMI has problem - (%r)\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Transport for IPMI has problem - (%r)\n", __func__, Status));
     return Status;
   }

@@ -208,7 +208,7 @@ CommonIpmiSubmitCommand (
                            &TrailerSize
                            );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __func__, Status));
     return Status;
   }

@@ -256,7 +256,7 @@ CommonIpmiSubmitCommand (
   Status                    = TransferToken.TransferStatus;
   TransportAdditionalStatus = TransferToken.TransportAdditionalStatus;
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to send IPMI command.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to send IPMI command.\n", __func__));
     return Status;
   }

diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocol.c b/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocol.c
index 51d5c7f0ba..1660cfbbd5 100644
--- a/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocol.c
+++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocol.c
@@ -97,26 +97,26 @@ DxeIpmiEntry (
              &mTransportToken
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI protocol - %r\n", __func__, Status));
     return Status;
   }

   Status = GetTransportCapability (mTransportToken, &TransportCapability);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __func__));
     return Status;
   }

   TransportMaximumPayload = MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY (TransportCapability);
   if (TransportMaximumPayload == (1 << MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILABLE)) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __func__));
   } else {
     TransportMaximumPayload -= 1;
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI protocol has maximum payload %x.\n", __FUNCTION__, TransportMaximumPayload));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI protocol has maximum payload %x.\n", __func__, TransportMaximumPayload));
   }

   mTransportName = HelperManageabilitySpecName (mTransportToken->Transport->ManageabilityTransportSpecification);
-  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n", __FUNCTION__, mTransportName));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n", __func__, mTransportName));

   //
   // Setup hardware information according to the transport interface.
@@ -126,7 +126,7 @@ DxeIpmiEntry (
              );
   if (EFI_ERROR (Status)) {
     if (Status == EFI_UNSUPPORTED) {
-      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __FUNCTION__, mTransportName));
+      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __func__, mTransportName));
     }

     return Status;
@@ -151,7 +151,7 @@ DxeIpmiEntry (
                   (VOID **)&mIpmiProtocol
                   );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI protocol - %r\n", __func__, Status));
   }

   return Status;
diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c b/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c
index 4bbdbf78fe..a6bdb27464 100644
--- a/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c
+++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Pei/IpmiPpi.c
@@ -96,13 +96,13 @@ PeiIpmiEntry (
   //
   PeiIpmiPpiinternal = (PEI_IPMI_PPI_INTERNAL *)AllocateZeroPool (sizeof (PEI_IPMI_PPI_INTERNAL));
   if (PeiIpmiPpiinternal == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for PEI_IPMI_PPI_INTERNAL.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for PEI_IPMI_PPI_INTERNAL.\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }

   PpiDescriptor = (EFI_PEI_PPI_DESCRIPTOR *)AllocateZeroPool (sizeof (EFI_PEI_PPI_DESCRIPTOR));
   if (PpiDescriptor == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for EFI_PEI_PPI_DESCRIPTOR.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for EFI_PEI_PPI_DESCRIPTOR.\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }

@@ -118,26 +118,26 @@ PeiIpmiEntry (
              &PeiIpmiPpiinternal->TransportToken
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI protocol - %r\n", __func__, Status));
     return Status;
   }

   Status = GetTransportCapability (PeiIpmiPpiinternal->TransportToken, &PeiIpmiPpiinternal->TransportCapability);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __func__));
     return Status;
   }

   PeiIpmiPpiinternal->TransportMaximumPayload = MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY (PeiIpmiPpiinternal->TransportCapability);
   if (PeiIpmiPpiinternal->TransportMaximumPayload  == (1 << MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILABLE)) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __func__));
   } else {
     PeiIpmiPpiinternal->TransportMaximumPayload -= 1;
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI protocol has maximum payload 0x%x.\n", __FUNCTION__, PeiIpmiPpiinternal->TransportMaximumPayload));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI protocol has maximum payload 0x%x.\n", __func__, PeiIpmiPpiinternal->TransportMaximumPayload));
   }

   TransportName = HelperManageabilitySpecName (PeiIpmiPpiinternal->TransportToken->Transport->ManageabilityTransportSpecification);
-  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n", __FUNCTION__, TransportName));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n", __func__, TransportName));

   //
   // Setup hardware information according to the transport interface.
@@ -147,7 +147,7 @@ PeiIpmiEntry (
              );
   if (EFI_ERROR (Status)) {
     if (Status == EFI_UNSUPPORTED) {
-      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __FUNCTION__, TransportName));
+      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __func__, TransportName));
     }

     return Status;
@@ -169,7 +169,7 @@ PeiIpmiEntry (
   //
   Status = PeiServicesInstallPpi (PpiDescriptor);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI PPI - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI PPI - %r\n", __func__, Status));
   }

   return Status;
diff --git a/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocol.c b/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocol.c
index e4cd166b7a..aaa48b24e2 100644
--- a/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocol.c
+++ b/Features/ManageabilityPkg/Universal/IpmiProtocol/Smm/IpmiProtocol.c
@@ -98,26 +98,26 @@ SmmIpmiEntry (
              &mTransportToken
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for IPMI protocol - %r\n", __func__, Status));
     return Status;
   }

   Status = GetTransportCapability (mTransportToken, &TransportCapability);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __func__));
     return Status;
   }

   TransportMaximumPayload = MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY (TransportCapability);
   if (TransportMaximumPayload == (1 << MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILABLE)) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __func__));
   } else {
     TransportMaximumPayload -= 1;
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI protocol has maximum payload 0x%x.\n", __FUNCTION__, TransportMaximumPayload));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for IPMI protocol has maximum payload 0x%x.\n", __func__, TransportMaximumPayload));
   }

   mTransportName = HelperManageabilitySpecName (mTransportToken->Transport->ManageabilityTransportSpecification);
-  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n", __FUNCTION__, mTransportName));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: IPMI protocol over %s.\n", __func__, mTransportName));

   //
   // Setup hardware information according to the transport interface.
@@ -127,7 +127,7 @@ SmmIpmiEntry (
              );
   if (EFI_ERROR (Status)) {
     if (Status == EFI_UNSUPPORTED) {
-      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __FUNCTION__, mTransportName));
+      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __func__, mTransportName));
     }

     return Status;
@@ -152,7 +152,7 @@ SmmIpmiEntry (
                     (VOID **)&mIpmiProtocol
                     );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI SMM protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to install IPMI SMM protocol - %r\n", __func__, Status));
   }

   return Status;
diff --git a/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c b/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c
index db572ec85a..1ad48efdc7 100644
--- a/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c
+++ b/Features/ManageabilityPkg/Universal/MctpProtocol/Common/MctpProtocolCommon.c
@@ -52,7 +52,7 @@ SetupMctpTransportHardwareInformation (
   if (CompareGuid (&gManageabilityTransportKcsGuid, TransportToken->Transport->ManageabilityTransportSpecification)) {
     KcsHardwareInfo = AllocatePool (sizeof (MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO));
     if (KcsHardwareInfo == NULL) {
-      DEBUG ((DEBUG_ERROR, "%a: Not enough memory for MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO.\n", __FUNCTION__));
+      DEBUG ((DEBUG_ERROR, "%a: Not enough memory for MANAGEABILITY_TRANSPORT_KCS_HARDWARE_INFO.\n", __func__));
       return EFI_OUT_OF_RESOURCES;
     }

@@ -76,7 +76,7 @@ SetupMctpTransportHardwareInformation (
     HardwareInformation->Kcs = KcsHardwareInfo;
     return EFI_SUCCESS;
   } else {
-    DEBUG ((DEBUG_ERROR, "%a: No implementation of setting hardware information.", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No implementation of setting hardware information.", __func__));
     ASSERT (FALSE);
   }

@@ -140,20 +140,20 @@ SetupMctpRequestTransportPacket (
       (PacketTrailer == NULL) || (PacketTrailerSize == NULL)
       )
   {
-    DEBUG ((DEBUG_ERROR, "%a: One or more than one of the input parameter is invalid.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: One or more than one of the input parameter is invalid.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

   if (CompareGuid (&gManageabilityTransportKcsGuid, TransportToken->Transport->ManageabilityTransportSpecification)) {
     MctpKcsHeader = (MANAGEABILITY_MCTP_KCS_HEADER *)AllocateZeroPool (sizeof (MANAGEABILITY_MCTP_KCS_HEADER));
     if (MctpKcsHeader == NULL) {
-      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for MANAGEABILITY_MCTP_KCS_HEADER.\n", __FUNCTION__));
+      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for MANAGEABILITY_MCTP_KCS_HEADER.\n", __func__));
       return EFI_OUT_OF_RESOURCES;
     }

     Pec = (UINT8 *)AllocateZeroPool (sizeof (UINT8));
     if (Pec == NULL) {
-      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for PEC.\n", __FUNCTION__));
+      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for PEC.\n", __func__));
       FreePool (MctpKcsHeader);
       return EFI_OUT_OF_RESOURCES;
     }
@@ -165,7 +165,7 @@ SetupMctpRequestTransportPacket (

     ThisPackage = (UINT8 *)AllocateZeroPool (MctpKcsHeader->ByteCount);
     if (ThisPackage == NULL) {
-      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for package.\n", __FUNCTION__));
+      DEBUG ((DEBUG_ERROR, "%a: Not enough resource for package.\n", __func__));
       FreePool (MctpKcsHeader);
       FreePool (Pec);
       return EFI_OUT_OF_RESOURCES;
@@ -203,7 +203,7 @@ SetupMctpRequestTransportPacket (
     *PacketTrailerSize = 1;
     return EFI_SUCCESS;
   } else {
-    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.", __func__));
     ASSERT (FALSE);
   }

@@ -269,7 +269,7 @@ CommonMctpSubmitMessage (
   MANAGEABILITY_TRANSMISSION_PACKAGE_ATTR    *ThisPackage;

   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: No transport toke for MCTP\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No transport toke for MCTP\n", __func__));
     return EFI_UNSUPPORTED;
   }

@@ -278,7 +278,7 @@ CommonMctpSubmitMessage (
                                                              AdditionalTransferError
                                                              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Transport %s for MCTP has problem - (%r)\n", __FUNCTION__, mTransportName, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Transport %s for MCTP has problem - (%r)\n", __func__, mTransportName, Status));
     return Status;
   }

@@ -292,7 +292,7 @@ CommonMctpSubmitMessage (
                     &MultiPackages
                     );
   if (EFI_ERROR (Status) || (MultiPackages == NULL)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fails to split payload into multiple packages - (%r)\n", __FUNCTION__, mTransportName, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Fails to split payload into multiple packages - (%r)\n", __func__, mTransportName, Status));
     return Status;
   }

@@ -342,7 +342,7 @@ CommonMctpSubmitMessage (
                &MctpTransportTrailerSize
                );
     if (EFI_ERROR (Status)) {
-      DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __FUNCTION__, Status));
+      DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __func__, Status));
       return Status;
     }

@@ -373,7 +373,7 @@ CommonMctpSubmitMessage (
     DEBUG ((
       DEBUG_MANAGEABILITY_INFO,
       "%a: Send MCTP message type: 0x%x, from source endpoint ID: 0x%x to destination ID 0x%x: Request size: 0x%x, Response size: 0x%x\n",
-      __FUNCTION__,
+      __func__,
       MctpType,
       MctpSourceEndpointId,
       MctpDestinationEndpointId,
@@ -426,7 +426,7 @@ CommonMctpSubmitMessage (
     Status                   = TransferToken.TransferStatus;
     *AdditionalTransferError = TransferToken.TransportAdditionalStatus;
     if (EFI_ERROR (Status)) {
-      DEBUG ((DEBUG_ERROR, "%a: Failed to send MCTP command over %s\n", __FUNCTION__, mTransportName));
+      DEBUG ((DEBUG_ERROR, "%a: Failed to send MCTP command over %s\n", __func__, mTransportName));
       FreePool (MultiPackages);
       return Status;
     }
@@ -449,7 +449,7 @@ CommonMctpSubmitMessage (
   DEBUG ((
     DEBUG_MANAGEABILITY_INFO,
     "%a: Retrieve MCTP message Response size: 0x%x\n",
-    __FUNCTION__,
+    __func__,
     TransferToken.ReceivePackage.ReceiveSizeInByte
     ));
   TransportToken->Transport->Function.Version1_0->TransportTransmitReceive (
@@ -464,7 +464,7 @@ CommonMctpSubmitMessage (
   *ResponseDataSize        = TransferToken.ReceivePackage.ReceiveSizeInByte;
   Status                   = TransferToken.TransferStatus;
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to send MCTP command over %s: %r\n", __FUNCTION__, mTransportName, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to send MCTP command over %s: %r\n", __func__, mTransportName, Status));
     return Status;
   }

diff --git a/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c b/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c
index a1cac61e27..88bfd9b7e7 100644
--- a/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c
+++ b/Features/ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocol.c
@@ -74,7 +74,7 @@ MctpSubmitMessage (
   EFI_STATUS  Status;

   if ((RequestData == NULL) && (ResponseData == NULL)) {
-    DEBUG ((DEBUG_ERROR, "%a: Both RequestData and ResponseData are NULL\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Both RequestData and ResponseData are NULL\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

@@ -127,26 +127,26 @@ DxeMctpEntry (
              &mTransportToken
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for MCTP protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for MCTP protocol - %r\n", __func__, Status));
     return Status;
   }

   Status = GetTransportCapability (mTransportToken, &TransportCapability);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __func__));
     return Status;
   }

   mTransportMaximumPayload = MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY (TransportCapability);
   if (mTransportMaximumPayload == (1 << MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILABLE)) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __func__));
   } else {
     mTransportMaximumPayload -= 1;
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for MCTP protocol has maximum payload 0x%x.\n", __FUNCTION__, mTransportMaximumPayload));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for MCTP protocol has maximum payload 0x%x.\n", __func__, mTransportMaximumPayload));
   }

   mTransportName = HelperManageabilitySpecName (mTransportToken->Transport->ManageabilityTransportSpecification);
-  DEBUG ((DEBUG_ERROR, "%a: MCTP protocol over %s.\n", __FUNCTION__, mTransportName));
+  DEBUG ((DEBUG_ERROR, "%a: MCTP protocol over %s.\n", __func__, mTransportName));

   //
   // Setup hardware information according to the transport interface.
@@ -156,9 +156,9 @@ DxeMctpEntry (
              );
   if (EFI_ERROR (Status)) {
     if (Status == EFI_UNSUPPORTED) {
-      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __FUNCTION__, mTransportName));
+      DEBUG ((DEBUG_ERROR, "%a: No hardware information of %s transport interface.\n", __func__, mTransportName));
     } else {
-      DEBUG ((DEBUG_ERROR, "%a: Failed to setup hardware information of %s transport interface.\n", __FUNCTION__, mTransportName));
+      DEBUG ((DEBUG_ERROR, "%a: Failed to setup hardware information of %s transport interface.\n", __func__, mTransportName));
     }

     return Status;
@@ -184,7 +184,7 @@ DxeMctpEntry (
                                               (VOID **)&mMctpProtocol
                                               );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to install EDKII MCTP protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to install EDKII MCTP protocol - %r\n", __func__, Status));
   }

   return Status;
diff --git a/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolCommon.c b/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolCommon.c
index bb4d3f61a0..ce1e2cba95 100644
--- a/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolCommon.c
+++ b/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolCommon.c
@@ -104,17 +104,17 @@ SetupPldmRequestTransportPacket (
       (PacketTrailer == NULL) || (PacketTrailerSize == NULL)
       )
   {
-    DEBUG ((DEBUG_ERROR, "%a: One or more than one of the required parameters is NULL.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: One or more than one of the required parameters is NULL.\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

   if (CompareGuid (&gManageabilityTransportMctpGuid, TransportToken->Transport->ManageabilityTransportSpecification)) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Setup transport header for PLDM over MCTP.\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Setup transport header for PLDM over MCTP.\n", __func__));

     // This is MCTP transport interface.
     MctpHeader = AllocateZeroPool (sizeof (MANAGEABILITY_MCTP_TRANSPORT_HEADER));
     if (MctpHeader == NULL) {
-      DEBUG ((DEBUG_ERROR, "%a: Not enough memory for MANAGEABILITY_MCTP_TRANSPORT_HEADER.\n", __FUNCTION__));
+      DEBUG ((DEBUG_ERROR, "%a: Not enough memory for MANAGEABILITY_MCTP_TRANSPORT_HEADER.\n", __func__));
       return EFI_OUT_OF_RESOURCES;
     }

@@ -127,7 +127,7 @@ SetupPldmRequestTransportPacket (
     *PacketTrailer                           = NULL;
     *PacketTrailerSize                       = 0;
   } else {
-    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No implementation of building up packet.\n", __func__));
     ASSERT (FALSE);
   }

@@ -136,7 +136,7 @@ SetupPldmRequestTransportPacket (
   //
   PldmRequestHeader = (PLDM_REQUEST_HEADER *)AllocateZeroPool (sizeof (PLDM_REQUEST_HEADER) + *PacketBodySize);
   if (PldmRequestHeader == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for final PLDM request message.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for final PLDM request message.\n", __func__));
     return EFI_OUT_OF_RESOURCES;
   }

@@ -202,7 +202,7 @@ CommonPldmSubmitCommand (
   UINT16                                     TrailerSize;

   if (TransportToken == NULL) {
-    DEBUG ((DEBUG_ERROR, "%a: No transport token for PLDM\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: No transport token for PLDM\n", __func__));
     return EFI_UNSUPPORTED;
   }

@@ -211,7 +211,7 @@ CommonPldmSubmitCommand (
                                                              &TransportAdditionalStatus
                                                              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Transport %s for PLDM has problem - (%r)\n", __FUNCTION__, mTransportName, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Transport %s for PLDM has problem - (%r)\n", __func__, mTransportName, Status));
     return Status;
   }

@@ -233,7 +233,7 @@ CommonPldmSubmitCommand (
                            &TrailerSize
                            );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to build packets - (%r)\n", __func__, Status));
     return Status;
   }

@@ -274,7 +274,7 @@ CommonPldmSubmitCommand (
   DEBUG ((
     DEBUG_MANAGEABILITY_INFO,
     "%a: Send PLDM type: 0x%x, Command: 0x%x: Request size: 0x%x, Response size: 0x%x\n",
-    __FUNCTION__,
+    __func__,
     PldmType,
     PldmCommand,
     TransferToken.TransmitPackage.TransmitSizeInByte,
@@ -409,7 +409,7 @@ CommonPldmSubmitCommand (
 ErrorExit:
   Status = TransferToken.TransferStatus;
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to send PLDM command over %s\n", __FUNCTION__, mTransportName));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to send PLDM command over %s\n", __func__, mTransportName));
   }

 ErrorExit2:
diff --git a/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c b/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c
index bb34fec16e..b2ca69b05f 100644
--- a/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c
+++ b/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c
@@ -57,7 +57,7 @@ PldmSubmitCommand (
   EFI_STATUS  Status;

   if ((RequestData == NULL) && (ResponseData == NULL)) {
-    DEBUG ((DEBUG_ERROR, "%a: Both RequestData and ResponseData are NULL\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Both RequestData and ResponseData are NULL\n", __func__));
     return EFI_INVALID_PARAMETER;
   }

@@ -106,26 +106,26 @@ DxePldmProtocolEntry (
              &mTransportToken
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for PLDM protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to acquire transport interface for PLDM protocol - %r\n", __func__, Status));
     return Status;
   }

   Status = GetTransportCapability (mTransportToken, &TransportCapability);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to GetTransportCapability().\n", __func__));
     return Status;
   }

   TransportMaximumPayload = MANAGEABILITY_TRANSPORT_PAYLOAD_SIZE_FROM_CAPABILITY (TransportCapability);
   if (TransportMaximumPayload == (1 << MANAGEABILITY_TRANSPORT_CAPABILITY_MAXIMUM_PAYLOAD_NOT_AVAILABLE)) {
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __FUNCTION__));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface maximum payload is undefined.\n", __func__));
   } else {
     TransportMaximumPayload -= 1;
-    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for PLDM protocol has maximum payload 0x%x.\n", __FUNCTION__, TransportMaximumPayload));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Transport interface for PLDM protocol has maximum payload 0x%x.\n", __func__, TransportMaximumPayload));
   }

   mTransportName = HelperManageabilitySpecName (mTransportToken->Transport->ManageabilityTransportSpecification);
-  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: PLDM protocol over %s.\n", __FUNCTION__, mTransportName));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: PLDM protocol over %s.\n", __func__, mTransportName));

   // Initial transport interface with the hardware information assigned.
   HardwareInfo.Pointer = NULL;
@@ -149,7 +149,7 @@ DxePldmProtocolEntry (
                                               (VOID **)&mPldmProtocol
                                               );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Failed to install EDKII PLDM protocol - %r\n", __FUNCTION__, Status));
+    DEBUG ((DEBUG_ERROR, "%a: Failed to install EDKII PLDM protocol - %r\n", __func__, Status));
   }

   return Status;
diff --git a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c
index 88b190757d..f897162bb5 100644
--- a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c
+++ b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c
@@ -147,7 +147,7 @@ GetSmbiosStructureTableMetaData (
   EFI_STATUS  Status;
   UINT32      ResponseSize;

-  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table metafile.\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table metafile.\n", __func__));

   ResponseSize = sizeof (PLDM_SMBIOS_STRUCTURE_TABLE_METADATA);
   Status       = PldmSubmitCommand (
@@ -159,7 +159,7 @@ GetSmbiosStructureTableMetaData (
                    &ResponseSize
                    );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fails to get SMBIOS structure table metafile.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fails to get SMBIOS structure table metafile.\n", __func__));
   }

   if (ResponseSize != 0) {
@@ -194,7 +194,7 @@ SetSmbiosStructureTableMetaData (
   UINT32      ResponseSize;
   UINT32      RequestSize;

-  DEBUG ((DEBUG_INFO, "%a: Get SMBIOS structure table metafile.\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Get SMBIOS structure table metafile.\n", __func__));

   RequestSize  = sizeof (PLDM_SMBIOS_STRUCTURE_TABLE_METADATA);
   ResponseSize = 0;
@@ -208,7 +208,7 @@ SetSmbiosStructureTableMetaData (
              &ResponseSize
              );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fails to set SMBIOS structure table metafile.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fails to set SMBIOS structure table metafile.\n", __func__));
   }

   return Status;
@@ -236,7 +236,7 @@ GetSmbiosStructureTable (
   OUT  UINT32                               *BufferSize
   )
 {
-  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
   // Only support PLDM SMBIOS Transfer push mode.
   return EFI_UNSUPPORTED;
 }
@@ -272,7 +272,7 @@ SetSmbiosStructureTable (
   EFI_SMBIOS_TABLE_HEADER                  *Record;
   PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST  *PldmSetSmbiosStructureTable;

-  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table.\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table.\n", __func__));

   Status = gBS->LocateProtocol (
                   &gEfiSmbiosProtocolGuid,
@@ -382,7 +382,7 @@ SetSmbiosStructureTable (
   }

   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Set SMBIOS structure table.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Set SMBIOS structure table.\n", __func__));
   }

   if ((ResponseSize != 0) && (ResponseSize <= sizeof (SetSmbiosStructureTableHandle))) {
@@ -422,7 +422,7 @@ GetSmbiosStructureByType (
   OUT  UINT32                               *BufferSize
   )
 {
-  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
   // Only support PLDM SMBIOS Transfer push mode.
   return EFI_UNSUPPORTED;
 }
@@ -451,7 +451,7 @@ GetSmbiosStructureByHandle (
   OUT  UINT32                               *BufferSize
   )
 {
-  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
   // Only support PLDM SMBIOS Transfer push mode.
   return EFI_UNSUPPORTED;
 }
@@ -486,7 +486,7 @@ DxePldmSmbiosTransferEntry (
   EFI_HANDLE  Handle;
   EFI_STATUS  Status;

-  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__));
+  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));

   SetSmbiosStructureTableHandle = 0;

@@ -500,7 +500,7 @@ DxePldmSmbiosTransferEntry (
                                                             (VOID **)&mPldmSmbiosTransferProtocol
                                                             );
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: Fail to install EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL.\n", __FUNCTION__));
+    DEBUG ((DEBUG_ERROR, "%a: Fail to install EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL.\n", __func__));
   }

   return Status;
--
2.37.1.windows.1


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

* Re: [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use DEBUG_MANAGEABILITY
  2023-05-30  6:33 ` [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use DEBUG_MANAGEABILITY Chang, Abner
  2023-05-30  6:52   ` Nickle Wang
@ 2023-05-30  8:48   ` Attar, AbdulLateef (Abdul Lateef)
  2023-05-31  8:07     ` Chang, Abner
  1 sibling, 1 reply; 7+ messages in thread
From: Attar, AbdulLateef (Abdul Lateef) @ 2023-05-30  8:48 UTC (permalink / raw)
  To: Chang, Abner, devel@edk2.groups.io; +Cc: Isaac Oram, Nickle Wang, Tinh Nguyen

[AMD Official Use Only - General]

Reviewed-by: Abdul Lateef Attar <abdattar@amd.com>

-----Original Message-----
From: Chang, Abner <Abner.Chang@amd.com>
Sent: Tuesday, May 30, 2023 12:03 PM
To: devel@edk2.groups.io
Cc: Isaac Oram <isaac.w.oram@intel.com>; Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Nickle Wang <nicklew@nvidia.com>; Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
Subject: [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use DEBUG_MANAGEABILITY

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

Use debug print level DEBUG_MANAGEABILITY in ManageabilityPkg.

Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Abdul Lateef Attar <abdattar@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
---
 .../Library/ManageabilityTransportHelperLib.h      |  2 +-
 .../BaseManageabilityTransportHelper.c             |  2 +-
 .../Universal/IpmiBmcAcpi/BmcAcpi.c                |  6 ++++--
 .../Universal/IpmiBmcElog/BmcElog.c                |  4 +++-
 .../ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c    |  8 +++++---
 .../PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c  | 14 +++++++-------
 6 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelperLib.h b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelperLib.h
index 11a1bd0521..dfe32189ad 100644
--- a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelperLib.h
+++ b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHe
+++ lperLib.h
@@ -11,7 +11,7 @@

 #include <Library/ManageabilityTransportLib.h>

-#define DEBUG_MANAGEABILITY_INFO  DEBUG_INFO
+#define DEBUG_MANAGEABILITY_INFO  DEBUG_MANAGEABILITY

 typedef struct _MANAGEABILITY_PROTOCOL_NAME MANAGEABILITY_PROTOCOL_NAME;

diff --git a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c
index f72957ea7f..27bc5eaddf 100644
--- a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/BaseManageabilityTransportHelper.c
+++ b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelper
+++ Lib/BaseManageabilityTransportHelper.c
@@ -163,7 +163,7 @@ HelperAcquireManageabilityTransport (
   CHAR16      *ManageabilityProtocolName;
   CHAR16      *ManageabilityTransportName;

-  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Entry\n", __func__));
   if ((TransportToken == NULL) || (ManageabilityProtocolSpec == NULL)) {
     DEBUG ((DEBUG_ERROR, "%a: One of the required input parameters is NULL.\n", __func__));
     return EFI_INVALID_PARAMETER;
diff --git a/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c b/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c
index cf066dd095..d04623ecad 100644
--- a/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c
+++ b/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c
@@ -24,6 +24,8 @@
 #include <Library/BaseMemoryLib.h>
 #include <Library/UefiLib.h>

+#include <Library/ManageabilityTransportHelperLib.h>
+
 #ifndef EFI_ACPI_CREATOR_ID
 #define EFI_ACPI_CREATOR_ID  SIGNATURE_32 ('M', 'S', 'F', 'T')  #endif @@ -140,7 +142,7 @@ UpdateDeviceSsdtTable (
   //
   // Update IO(Decode16, 0xCA2, 0xCA2, 0, 2)
   //
-  DEBUG ((DEBUG_INFO, "UpdateDeviceSsdtTable - IPMI\n"));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "UpdateDeviceSsdtTable - IPMI\n"));
   for (DataPtr = (UINT8 *)(Table + 1);
        DataPtr < (UINT8 *)((UINT8 *)Table + Table->Length - 4);
        DataPtr++)
@@ -158,7 +160,7 @@ UpdateDeviceSsdtTable (
       ASSERT (IoRsc->Header.Bits.Type == ACPI_SMALL_ITEM_FLAG);
       ASSERT (IoRsc->Header.Bits.Name == ACPI_SMALL_IO_PORT_DESCRIPTOR_NAME);
       ASSERT (IoRsc->Header.Bits.Length == sizeof (EFI_ACPI_IO_PORT_DESCRIPTOR) - sizeof (ACPI_SMALL_RESOURCE_HEADER));
-      DEBUG ((DEBUG_INFO, "IPMI IO Base in ASL update - 0x%04x <= 0x%04x\n", IoRsc->BaseAddressMin, PcdGet16 (PcdIpmiKcsIoBaseAddress)));
+      DEBUG ((DEBUG_MANAGEABILITY_INFO, "IPMI IO Base in ASL update -
+ 0x%04x <= 0x%04x\n", IoRsc->BaseAddressMin, PcdGet16
+ (PcdIpmiKcsIoBaseAddress)));
       IoRsc->BaseAddressMin = PcdGet16 (PcdIpmiKcsIoBaseAddress);
       IoRsc->BaseAddressMax = PcdGet16 (PcdIpmiKcsIoBaseAddress);
     }
diff --git a/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c b/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c
index 02873fc4c6..8b34b2d2d5 100644
--- a/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c
+++ b/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c
@@ -15,6 +15,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include <Library/UefiRuntimeServicesTableLib.h>
 #include <Library/IpmiCommandLib.h>

+#include <Library/ManageabilityTransportHelperLib.h>
+
 EFI_STATUS
 EFIAPI
 CheckIfSelIsFull (
@@ -186,7 +188,7 @@ CheckIfSelIsFull (
   // Check the Bit7 of the OperationByte if SEL is OverFlow.
   //
   SelIsFull = (SelInfo.OperationSupport & 0x80);
-  DEBUG ((DEBUG_INFO, "SelIsFull - 0x%x\n", SelIsFull));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "SelIsFull - 0x%x\n", SelIsFull));

   return EFI_SUCCESS;
 }
diff --git a/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c b/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c
index 46f741eed1..40ae0c3ecc 100644
--- a/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c
+++ b/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c
@@ -16,6 +16,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include <Library/IpmiCommandLib.h>  #include <IndustryStandard/Ipmi.h>

+#include <Library/ManageabilityTransportHelperLib.h>
+
 /**
   This routine disables the specified FRB timer.

@@ -159,7 +161,7 @@ ReportFrb2Status (
   //
   Status = IpmiGetWatchdogTimer (&GetWatchdogTimer);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_INFO, "Failed to get Watchdog Timer info from BMC.\n"));
+    DEBUG ((DEBUG_ERROR, "Failed to get Watchdog Timer info from
+ BMC.\n"));
     return Status;
   }

@@ -167,9 +169,9 @@ ReportFrb2Status (
   // Check if timer is running, report status to DEBUG_MODE output.
   //
   if (GetWatchdogTimer.TimerUse.Bits.TimerRunning == 1) {
-    DEBUG ((DEBUG_INFO, "FRB2 Timer is running.\n"));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "FRB2 Timer is running.\n"));
   } else {
-    DEBUG ((DEBUG_INFO, "FRB2 Timer is not running.\n"));
+    DEBUG ((DEBUG_MANAGEABILITY_INFO, "FRB2 Timer is not running.\n"));
   }

   return EFI_SUCCESS;
diff --git a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c
index f897162bb5..fdf033f0b1 100644
--- a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c
+++ b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbi
+++ osTransferDxe.c
@@ -147,7 +147,7 @@ GetSmbiosStructureTableMetaData (
   EFI_STATUS  Status;
   UINT32      ResponseSize;

-  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table metafile.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Set SMBIOS structure table
+ metafile.\n", __func__));

   ResponseSize = sizeof (PLDM_SMBIOS_STRUCTURE_TABLE_METADATA);
   Status       = PldmSubmitCommand (
@@ -194,7 +194,7 @@ SetSmbiosStructureTableMetaData (
   UINT32      ResponseSize;
   UINT32      RequestSize;

-  DEBUG ((DEBUG_INFO, "%a: Get SMBIOS structure table metafile.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Get SMBIOS structure table
+ metafile.\n", __func__));

   RequestSize  = sizeof (PLDM_SMBIOS_STRUCTURE_TABLE_METADATA);
   ResponseSize = 0;
@@ -236,7 +236,7 @@ GetSmbiosStructureTable (
   OUT  UINT32                               *BufferSize
   )
 {
-  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Unsupported.\n", __func__));
   // Only support PLDM SMBIOS Transfer push mode.
   return EFI_UNSUPPORTED;
 }
@@ -272,7 +272,7 @@ SetSmbiosStructureTable (
   EFI_SMBIOS_TABLE_HEADER                  *Record;
   PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST  *PldmSetSmbiosStructureTable;

-  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Set SMBIOS structure
+ table.\n", __func__));

   Status = gBS->LocateProtocol (
                   &gEfiSmbiosProtocolGuid, @@ -422,7 +422,7 @@ GetSmbiosStructureByType (
   OUT  UINT32                               *BufferSize
   )
 {
-  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Unsupported.\n", __func__));
   // Only support PLDM SMBIOS Transfer push mode.
   return EFI_UNSUPPORTED;
 }
@@ -451,7 +451,7 @@ GetSmbiosStructureByHandle (
   OUT  UINT32                               *BufferSize
   )
 {
-  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Unsupported.\n", __func__));
   // Only support PLDM SMBIOS Transfer push mode.
   return EFI_UNSUPPORTED;
 }
@@ -486,7 +486,7 @@ DxePldmSmbiosTransferEntry (
   EFI_HANDLE  Handle;
   EFI_STATUS  Status;

-  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Entry.\n", __func__));

   SetSmbiosStructureTableHandle = 0;

--
2.37.1.windows.1


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

* Re: [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use DEBUG_MANAGEABILITY
  2023-05-30  8:48   ` Attar, AbdulLateef (Abdul Lateef)
@ 2023-05-31  8:07     ` Chang, Abner
  0 siblings, 0 replies; 7+ messages in thread
From: Chang, Abner @ 2023-05-31  8:07 UTC (permalink / raw)
  To: Attar, AbdulLateef (Abdul Lateef), devel@edk2.groups.io
  Cc: Isaac Oram, Nickle Wang, Tinh Nguyen

[AMD Official Use Only - General]

Merged.

Thanks
Abner

> -----Original Message-----
> From: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>
> Sent: Tuesday, May 30, 2023 4:48 PM
> To: Chang, Abner <Abner.Chang@amd.com>; devel@edk2.groups.io
> Cc: Isaac Oram <isaac.w.oram@intel.com>; Nickle Wang
> <nicklew@nvidia.com>; Tinh Nguyen
> <tinhnguyen@os.amperecomputing.com>
> Subject: RE: [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use
> DEBUG_MANAGEABILITY
>
> [AMD Official Use Only - General]
>
> Reviewed-by: Abdul Lateef Attar <abdattar@amd.com>
>
> -----Original Message-----
> From: Chang, Abner <Abner.Chang@amd.com>
> Sent: Tuesday, May 30, 2023 12:03 PM
> To: devel@edk2.groups.io
> Cc: Isaac Oram <isaac.w.oram@intel.com>; Attar, AbdulLateef (Abdul Lateef)
> <AbdulLateef.Attar@amd.com>; Nickle Wang <nicklew@nvidia.com>; Tinh
> Nguyen <tinhnguyen@os.amperecomputing.com>
> Subject: [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use
> DEBUG_MANAGEABILITY
>
> From: Abner Chang <abner.chang@amd.com>
>
> Use debug print level DEBUG_MANAGEABILITY in ManageabilityPkg.
>
> Signed-off-by: Abner Chang <abner.chang@amd.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Abdul Lateef Attar <abdattar@amd.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
> ---
>  .../Library/ManageabilityTransportHelperLib.h      |  2 +-
>  .../BaseManageabilityTransportHelper.c             |  2 +-
>  .../Universal/IpmiBmcAcpi/BmcAcpi.c                |  6 ++++--
>  .../Universal/IpmiBmcElog/BmcElog.c                |  4 +++-
>  .../ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c    |  8 +++++---
>  .../PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c  | 14 +++++++-------
>  6 files changed, 21 insertions(+), 15 deletions(-)
>
> diff --git
> a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelperL
> ib.h
> b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelper
> Lib.h
> index 11a1bd0521..dfe32189ad 100644
> ---
> a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHelperL
> ib.h
> +++ b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportHe
> +++ lperLib.h
> @@ -11,7 +11,7 @@
>
>  #include <Library/ManageabilityTransportLib.h>
>
> -#define DEBUG_MANAGEABILITY_INFO  DEBUG_INFO
> +#define DEBUG_MANAGEABILITY_INFO  DEBUG_MANAGEABILITY
>
>  typedef struct _MANAGEABILITY_PROTOCOL_NAME
> MANAGEABILITY_PROTOCOL_NAME;
>
> diff --git
> a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/
> BaseManageabilityTransportHelper.c
> b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/
> BaseManageabilityTransportHelper.c
> index f72957ea7f..27bc5eaddf 100644
> ---
> a/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelperLib/
> BaseManageabilityTransportHelper.c
> +++ b/Features/ManageabilityPkg/Library/BaseManageabilityTransportHelper
> +++ Lib/BaseManageabilityTransportHelper.c
> @@ -163,7 +163,7 @@ HelperAcquireManageabilityTransport (
>    CHAR16      *ManageabilityProtocolName;
>    CHAR16      *ManageabilityTransportName;
>
> -  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Entry\n", __func__));
>    if ((TransportToken == NULL) || (ManageabilityProtocolSpec == NULL)) {
>      DEBUG ((DEBUG_ERROR, "%a: One of the required input parameters is
> NULL.\n", __func__));
>      return EFI_INVALID_PARAMETER;
> diff --git a/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c
> b/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c
> index cf066dd095..d04623ecad 100644
> --- a/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c
> +++ b/Features/ManageabilityPkg/Universal/IpmiBmcAcpi/BmcAcpi.c
> @@ -24,6 +24,8 @@
>  #include <Library/BaseMemoryLib.h>
>  #include <Library/UefiLib.h>
>
> +#include <Library/ManageabilityTransportHelperLib.h>
> +
>  #ifndef EFI_ACPI_CREATOR_ID
>  #define EFI_ACPI_CREATOR_ID  SIGNATURE_32 ('M', 'S', 'F', 'T')  #endif @@ -
> 140,7 +142,7 @@ UpdateDeviceSsdtTable (
>    //
>    // Update IO(Decode16, 0xCA2, 0xCA2, 0, 2)
>    //
> -  DEBUG ((DEBUG_INFO, "UpdateDeviceSsdtTable - IPMI\n"));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "UpdateDeviceSsdtTable -
> IPMI\n"));
>    for (DataPtr = (UINT8 *)(Table + 1);
>         DataPtr < (UINT8 *)((UINT8 *)Table + Table->Length - 4);
>         DataPtr++)
> @@ -158,7 +160,7 @@ UpdateDeviceSsdtTable (
>        ASSERT (IoRsc->Header.Bits.Type == ACPI_SMALL_ITEM_FLAG);
>        ASSERT (IoRsc->Header.Bits.Name ==
> ACPI_SMALL_IO_PORT_DESCRIPTOR_NAME);
>        ASSERT (IoRsc->Header.Bits.Length == sizeof
> (EFI_ACPI_IO_PORT_DESCRIPTOR) - sizeof
> (ACPI_SMALL_RESOURCE_HEADER));
> -      DEBUG ((DEBUG_INFO, "IPMI IO Base in ASL update - 0x%04x <=
> 0x%04x\n", IoRsc->BaseAddressMin, PcdGet16 (PcdIpmiKcsIoBaseAddress)));
> +      DEBUG ((DEBUG_MANAGEABILITY_INFO, "IPMI IO Base in ASL update -
> + 0x%04x <= 0x%04x\n", IoRsc->BaseAddressMin, PcdGet16
> + (PcdIpmiKcsIoBaseAddress)));
>        IoRsc->BaseAddressMin = PcdGet16 (PcdIpmiKcsIoBaseAddress);
>        IoRsc->BaseAddressMax = PcdGet16 (PcdIpmiKcsIoBaseAddress);
>      }
> diff --git a/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c
> b/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c
> index 02873fc4c6..8b34b2d2d5 100644
> --- a/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c
> +++ b/Features/ManageabilityPkg/Universal/IpmiBmcElog/BmcElog.c
> @@ -15,6 +15,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include
> <Library/UefiRuntimeServicesTableLib.h>
>  #include <Library/IpmiCommandLib.h>
>
> +#include <Library/ManageabilityTransportHelperLib.h>
> +
>  EFI_STATUS
>  EFIAPI
>  CheckIfSelIsFull (
> @@ -186,7 +188,7 @@ CheckIfSelIsFull (
>    // Check the Bit7 of the OperationByte if SEL is OverFlow.
>    //
>    SelIsFull = (SelInfo.OperationSupport & 0x80);
> -  DEBUG ((DEBUG_INFO, "SelIsFull - 0x%x\n", SelIsFull));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "SelIsFull - 0x%x\n", SelIsFull));
>
>    return EFI_SUCCESS;
>  }
> diff --git a/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c
> b/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c
> index 46f741eed1..40ae0c3ecc 100644
> --- a/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c
> +++ b/Features/ManageabilityPkg/Universal/IpmiFrb/FrbDxe.c
> @@ -16,6 +16,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include
> <Library/IpmiCommandLib.h>  #include <IndustryStandard/Ipmi.h>
>
> +#include <Library/ManageabilityTransportHelperLib.h>
> +
>  /**
>    This routine disables the specified FRB timer.
>
> @@ -159,7 +161,7 @@ ReportFrb2Status (
>    //
>    Status = IpmiGetWatchdogTimer (&GetWatchdogTimer);
>    if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_INFO, "Failed to get Watchdog Timer info from BMC.\n"));
> +    DEBUG ((DEBUG_ERROR, "Failed to get Watchdog Timer info from
> + BMC.\n"));
>      return Status;
>    }
>
> @@ -167,9 +169,9 @@ ReportFrb2Status (
>    // Check if timer is running, report status to DEBUG_MODE output.
>    //
>    if (GetWatchdogTimer.TimerUse.Bits.TimerRunning == 1) {
> -    DEBUG ((DEBUG_INFO, "FRB2 Timer is running.\n"));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "FRB2 Timer is running.\n"));
>    } else {
> -    DEBUG ((DEBUG_INFO, "FRB2 Timer is not running.\n"));
> +    DEBUG ((DEBUG_MANAGEABILITY_INFO, "FRB2 Timer is not running.\n"));
>    }
>
>    return EFI_SUCCESS;
> diff --git
> a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbio
> sTransferDxe.c
> b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbio
> sTransferDxe.c
> index f897162bb5..fdf033f0b1 100644
> ---
> a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbio
> sTransferDxe.c
> +++
> b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbi
> +++ osTransferDxe.c
> @@ -147,7 +147,7 @@ GetSmbiosStructureTableMetaData (
>    EFI_STATUS  Status;
>    UINT32      ResponseSize;
>
> -  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table metafile.\n",
> __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Set SMBIOS structure table
> + metafile.\n", __func__));
>
>    ResponseSize = sizeof (PLDM_SMBIOS_STRUCTURE_TABLE_METADATA);
>    Status       = PldmSubmitCommand (
> @@ -194,7 +194,7 @@ SetSmbiosStructureTableMetaData (
>    UINT32      ResponseSize;
>    UINT32      RequestSize;
>
> -  DEBUG ((DEBUG_INFO, "%a: Get SMBIOS structure table metafile.\n",
> __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Get SMBIOS structure table
> + metafile.\n", __func__));
>
>    RequestSize  = sizeof (PLDM_SMBIOS_STRUCTURE_TABLE_METADATA);
>    ResponseSize = 0;
> @@ -236,7 +236,7 @@ GetSmbiosStructureTable (
>    OUT  UINT32                               *BufferSize
>    )
>  {
> -  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Unsupported.\n",
> __func__));
>    // Only support PLDM SMBIOS Transfer push mode.
>    return EFI_UNSUPPORTED;
>  }
> @@ -272,7 +272,7 @@ SetSmbiosStructureTable (
>    EFI_SMBIOS_TABLE_HEADER                  *Record;
>    PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST
> *PldmSetSmbiosStructureTable;
>
> -  DEBUG ((DEBUG_INFO, "%a: Set SMBIOS structure table.\n", __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Set SMBIOS structure
> + table.\n", __func__));
>
>    Status = gBS->LocateProtocol (
>                    &gEfiSmbiosProtocolGuid, @@ -422,7 +422,7 @@
> GetSmbiosStructureByType (
>    OUT  UINT32                               *BufferSize
>    )
>  {
> -  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Unsupported.\n",
> __func__));
>    // Only support PLDM SMBIOS Transfer push mode.
>    return EFI_UNSUPPORTED;
>  }
> @@ -451,7 +451,7 @@ GetSmbiosStructureByHandle (
>    OUT  UINT32                               *BufferSize
>    )
>  {
> -  DEBUG ((DEBUG_INFO, "%a: Unsupported.\n", __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Unsupported.\n",
> __func__));
>    // Only support PLDM SMBIOS Transfer push mode.
>    return EFI_UNSUPPORTED;
>  }
> @@ -486,7 +486,7 @@ DxePldmSmbiosTransferEntry (
>    EFI_HANDLE  Handle;
>    EFI_STATUS  Status;
>
> -  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));
> +  DEBUG ((DEBUG_MANAGEABILITY_INFO, "%a: Entry.\n", __func__));
>
>    SetSmbiosStructureTableHandle = 0;
>
> --
> 2.37.1.windows.1
>


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

end of thread, other threads:[~2023-05-31  8:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-30  6:33 [edk2-platforms][PATCH 1/2] ManageabilityPkg: Replace __FUNCTION__ with __func__ Chang, Abner
2023-05-30  6:33 ` [edk2-platforms][PATCH 2/2] ManageabilityPkg: Use DEBUG_MANAGEABILITY Chang, Abner
2023-05-30  6:52   ` Nickle Wang
2023-05-30  8:48   ` Attar, AbdulLateef (Abdul Lateef)
2023-05-31  8:07     ` Chang, Abner
2023-05-30  6:51 ` [edk2-platforms][PATCH 1/2] ManageabilityPkg: Replace __FUNCTION__ with __func__ Nickle Wang
2023-05-30  8:47 ` Attar, AbdulLateef (Abdul Lateef)

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