public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chang, Abner" <abner.chang@amd.com>
To: <devel@edk2.groups.io>
Cc: Nickle Wang <nicklew@nvidia.com>, Igor Kulchytskyy <igork@ami.com>
Subject: [PATCH] RedfishPkg: Use DEBUG_MANAGEABILITY
Date: Tue, 30 May 2023 15:09:15 +0800	[thread overview]
Message-ID: <20230530070915.731-1-abner.chang@amd.com> (raw)

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

Use debug print level DEBUG_MANAGEABILITY in
RedfishPkg.

Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
 RedfishPkg/Include/Library/RedfishDebugLib.h  |  4 +-
 .../PlatformHostInterfaceBmcUsbNicLib.c       | 22 +++++-----
 .../RedfishPlatformCredentialIpmiLib.c        |  8 ++--
 .../RedfishCrtLib/RedfishCrtLib.c             |  2 +-
 .../PrivateLibrary/RedfishLib/RedfishLib.c    |  8 ++--
 .../RedfishLib/edk2libredfish/src/service.c   | 10 ++---
 .../RedfishConfigHandlerCommon.c              |  2 +-
 .../RedfishConfigHandlerDriver.c              |  2 +-
 .../RedfishDiscoverDxe/RedfishDiscoverDxe.c   | 44 +++++++++----------
 .../RedfishHostInterfaceDxe.c                 | 10 ++---
 .../RedfishRestExDxe/RedfishRestExImpl.c      |  2 +-
 .../RedfishRestExDxe/RedfishRestExProtocol.c  |  8 ++--
 12 files changed, 61 insertions(+), 61 deletions(-)

diff --git a/RedfishPkg/Include/Library/RedfishDebugLib.h b/RedfishPkg/Include/Library/RedfishDebugLib.h
index 913f2b2f358..73f1469ac62 100644
--- a/RedfishPkg/Include/Library/RedfishDebugLib.h
+++ b/RedfishPkg/Include/Library/RedfishDebugLib.h
@@ -14,8 +14,8 @@
 #include <Library/JsonLib.h>
 #include <Library/RedfishLib.h>
 
-#define DEBUG_REDFISH_NETWORK         DEBUG_INFO   ///< Debug error level for Redfish networking function
-#define DEBUG_REDFISH_HOST_INTERFACE  DEBUG_INFO   ///< Debug error level for Redfish networking function
+#define DEBUG_REDFISH_NETWORK         DEBUG_MANAGEABILITY   ///< Debug error level for Redfish networking function
+#define DEBUG_REDFISH_HOST_INTERFACE  DEBUG_MANAGEABILITY   ///< Debug error level for Redfish networking function
 
 /**
 
diff --git a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c b/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c
index 4bd01850af9..d18d83b9380 100644
--- a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c
+++ b/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c
@@ -37,7 +37,7 @@ ProbeRedfishCredentialBootstrap (
   UINT32                                      ResponseSize;
   BOOLEAN                                     ReturnBool;
 
-  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry\n", __func__));
 
   //
   // IPMI callout to NetFn 2C, command 02
@@ -94,7 +94,7 @@ RedfishPlatformHostInterfaceDeviceDescriptor (
   HOST_INTERFACE_BMC_USB_NIC_INFO  *ThisInstance;
   REDFISH_INTERFACE_DATA           *InterfaceData;
 
-  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry\n", __func__));
 
   if (IsListEmpty (&mBmcUsbNic)) {
     return EFI_NOT_FOUND;
@@ -166,7 +166,7 @@ RedfishPlatformHostInterfaceProtocolData (
   UINT8                              HostNameLength;
   CHAR8                              *HostNameString;
 
-  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry\n", __func__));
 
   if (IsListEmpty (&mBmcUsbNic) || (IndexOfProtocolData > 0)) {
     return EFI_NOT_FOUND;
@@ -300,7 +300,7 @@ RetrievedBmcUsbNicInfo (
   IPMI_LAN_VLAN_ID                                *LanVlanId;
   EFI_USB_DEVICE_DESCRIPTOR                       UsbDeviceDescriptor;
 
-  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry\n", __func__));
 
   if (IsListEmpty (&mBmcUsbNic)) {
     return EFI_NOT_FOUND;
@@ -605,7 +605,7 @@ HostInterfaceIpmiCheckMacAddress (
   EFI_MAC_ADDRESS                                 IpmiLanChannelMacAddress;
   BOOLEAN                                         AlreadyCached;
 
-  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry.\n", __func__));
 
   GetLanConfigReps = NULL;
   AlreadyCached    = FALSE;
@@ -823,7 +823,7 @@ UsbNicSearchUsbIo (
   EFI_DEVICE_PATH_PROTOCOL  *ThisUsbDevicePath;
   EFI_DEVICE_PATH_PROTOCOL  *ThisUsbDevicePathEnd;
 
-  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry.\n", __func__));
   DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, "Device path on the EFI handle which has UsbIo and SNP instaleld on it.\n"));
   DevicePathStr = ConvertDevicePathToText (UsbDevicePath, FALSE, FALSE);
   if (DevicePathStr != NULL) {
@@ -987,7 +987,7 @@ IdentifyUsbNicBmcChannel (
   EFI_USB_IO_PROTOCOL              *UsbIo;
   HOST_INTERFACE_BMC_USB_NIC_INFO  *BmcUsbNic;
 
-  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry.\n", __func__));
   Status = gBS->HandleProtocol (
                   Handle,
                   &gEfiSimpleNetworkProtocolGuid,
@@ -1074,7 +1074,7 @@ CheckBmcUsbNicOnHandles (
     return EFI_INVALID_PARAMETER;
   }
 
-  DEBUG ((DEBUG_INFO, "%a: Entry, #%d SNP handle\n", __func__, HandleNumer));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry, #%d SNP handle\n", __func__, HandleNumer));
 
   GotOneUsbNIc = FALSE;
   for (Index = 0; Index < HandleNumer; Index++) {
@@ -1137,7 +1137,7 @@ CheckBmcUsbNic (
   UINTN       BufferSize;
   EFI_HANDLE  *HandleBuffer;
 
-  DEBUG ((DEBUG_INFO, "%a: Entry, the registration key - 0x%08x.\n", __func__, Registration));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry, the registration key - 0x%08x.\n", __func__, Registration));
 
   Handle     = NULL;
   Status     = EFI_SUCCESS;
@@ -1213,7 +1213,7 @@ PlatformHostInterfaceSnpCallback (
   IN  VOID       *Context
   )
 {
-  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry.\n", __func__));
 
   CheckBmcUsbNic (mPlatformHostInterfaceSnpRegistration);
   return;
@@ -1241,7 +1241,7 @@ RedfishPlatformHostInterfaceNotification (
 {
   EFI_STATUS  Status;
 
-  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry\n", __func__));
 
   *InformationReadinessGuid = NULL;
   InitializeListHead (&mBmcUsbNic);
diff --git a/RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPlatformCredentialIpmiLib.c b/RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPlatformCredentialIpmiLib.c
index 3b34dafbaf6..47a40d9c464 100644
--- a/RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPlatformCredentialIpmiLib.c
+++ b/RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPlatformCredentialIpmiLib.c
@@ -66,7 +66,7 @@ LibStopRedfishService (
     DEBUG ((DEBUG_ERROR, "%a: fail to remove bootstrap credential: %r\n", __func__, Status));
   }
 
-  DEBUG ((DEBUG_INFO, "%a: bootstrap credential service stopped\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: bootstrap credential service stopped\n", __func__));
 
   return EFI_SUCCESS;
 }
@@ -216,7 +216,7 @@ GetBootstrapAccountCredentials (
     }
   }
 
-  DEBUG ((DEBUG_INFO, "%a: get bootstrap credential via IPMI: %r\n", __func__, Status));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: get bootstrap credential via IPMI: %r\n", __func__, Status));
 
   return Status;
 }
@@ -284,7 +284,7 @@ GetBootstrapAccountCredentialsFromVariable (
 
   FreePool (Data);
 
-  DEBUG ((DEBUG_INFO, "%a: get bootstrap credential from variable\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: get bootstrap credential from variable\n", __func__));
 
   return EFI_SUCCESS;
 }
@@ -446,7 +446,7 @@ LibCredentialGetAuthInfo (
   }
 
   if (DisableCredentialService) {
-    DEBUG ((DEBUG_INFO, "%a: credential bootstrapping control disabled\n", __func__));
+    DEBUG ((DEBUG_MANAGEABILITY, "%a: credential bootstrapping control disabled\n", __func__));
   }
 
   Status = SetBootstrapAccountCredentialsToVariable (*UserId, *Password, FALSE);
diff --git a/RedfishPkg/PrivateLibrary/RedfishCrtLib/RedfishCrtLib.c b/RedfishPkg/PrivateLibrary/RedfishCrtLib/RedfishCrtLib.c
index f240dfba131..57a997f351f 100644
--- a/RedfishPkg/PrivateLibrary/RedfishCrtLib/RedfishCrtLib.c
+++ b/RedfishPkg/PrivateLibrary/RedfishCrtLib/RedfishCrtLib.c
@@ -548,7 +548,7 @@ strtod (
   char **__restrict       endptr
   )
 {
-  DEBUG ((DEBUG_INFO, "We don't supprot double type on edk2 yet!"));
+  DEBUG ((DEBUG_ERROR, "We don't supprot double type on edk2 yet!"));
   ASSERT (FALSE);
   return (double)0;
 }
diff --git a/RedfishPkg/PrivateLibrary/RedfishLib/RedfishLib.c b/RedfishPkg/PrivateLibrary/RedfishLib/RedfishLib.c
index 0a0a4e64587..cca0ea77489 100644
--- a/RedfishPkg/PrivateLibrary/RedfishLib/RedfishLib.c
+++ b/RedfishPkg/PrivateLibrary/RedfishLib/RedfishLib.c
@@ -946,7 +946,7 @@ RedfishDumpJsonStringFractions (
     return;
   }
 
-  DEBUG ((DEBUG_INFO, "JSON text:\n"));
+  DEBUG ((DEBUG_MANAGEABILITY, "JSON text:\n"));
   NextFraction = String;
   StrLen       = AsciiStrLen (String);
   if (StrLen == 0) {
@@ -956,13 +956,13 @@ RedfishDumpJsonStringFractions (
   for (Count = 0; Count < (StrLen / StringFractionSize); Count++) {
     BackupChar                           = *(NextFraction + StringFractionSize);
     *(NextFraction + StringFractionSize) = 0;
-    DEBUG ((DEBUG_INFO, "%a", NextFraction));
+    DEBUG ((DEBUG_MANAGEABILITY, "%a", NextFraction));
     *(NextFraction + StringFractionSize) = BackupChar;
     NextFraction                        += StringFractionSize;
   }
 
   if ((StrLen % StringFractionSize) != 0) {
-    DEBUG ((DEBUG_INFO, "%a\n\n", NextFraction));
+    DEBUG ((DEBUG_MANAGEABILITY, "%a\n\n", NextFraction));
   }
 }
 
@@ -1101,7 +1101,7 @@ RedfishIsValidOdataType (
     }
   }
 
-  DEBUG ((DEBUG_INFO, "%a: This Odata type is not in the list.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: This Odata type is not in the list.\n", __func__));
   return FALSE;
 }
 
diff --git a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c
index 206094d87d0..286f298e6a3 100644
--- a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c
+++ b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c
@@ -428,7 +428,7 @@ getUriFromService (
     return NULL;
   }
 
-  DEBUG ((DEBUG_INFO, "libredfish: getUriFromService(): %a\n", url));
+  DEBUG ((DEBUG_MANAGEABILITY, "libredfish: getUriFromService(): %a\n", url));
 
   //
   // Step 1: Create HTTP request message with 4 headers:
@@ -587,7 +587,7 @@ patchUriFromService (
     return NULL;
   }
 
-  DEBUG ((DEBUG_INFO, "libredfish: patchUriFromService(): %a\n", url));
+  DEBUG ((DEBUG_MANAGEABILITY, "libredfish: patchUriFromService(): %a\n", url));
 
   //
   // Step 1: Create HTTP request message with 4 headers:
@@ -660,7 +660,7 @@ patchUriFromService (
     ret = NULL;
     goto ON_EXIT;
   } else if (Status == EFI_UNSUPPORTED) {
-    DEBUG ((DEBUG_INFO, "No content coding for %a! Use raw data instead.\n", HTTP_CONTENT_ENCODING_GZIP));
+    DEBUG ((DEBUG_MANAGEABILITY, "No content coding for %a! Use raw data instead.\n", HTTP_CONTENT_ENCODING_GZIP));
     Status = HttpIoSetHeader (HttpIoHeader, "Content-Encoding", HTTP_CONTENT_ENCODING_IDENTITY);
     ASSERT_EFI_ERROR (Status);
   } else {
@@ -769,7 +769,7 @@ postUriFromService (
     return NULL;
   }
 
-  DEBUG ((DEBUG_INFO, "libredfish: postUriFromService(): %a\n", url));
+  DEBUG ((DEBUG_MANAGEABILITY, "libredfish: postUriFromService(): %a\n", url));
 
   if (contentLength == 0) {
     contentLength = strlen (content);
@@ -954,7 +954,7 @@ deleteUriFromServiceEx (
     return NULL;
   }
 
-  DEBUG ((DEBUG_INFO, "libredfish: deleteUriFromService(): %a\n", url));
+  DEBUG ((DEBUG_MANAGEABILITY, "libredfish: deleteUriFromService(): %a\n", url));
 
   //
   // Step 1: Create HTTP request message with 4 headers:
diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c
index b51b558a487..bc1ba598359 100644
--- a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c
+++ b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c
@@ -122,7 +122,7 @@ RedfishConfigCommonInit (
   //
   Status = gBS->LocateProtocol (&gEdkIIRedfishCredentialProtocolGuid, NULL, (VOID **)&gCredential);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_INFO, "%a: No Redfish Credential Protocol is installed on system.", __func__));
+    DEBUG ((DEBUG_ERROR, "%a: No Redfish Credential Protocol is installed on system.", __func__));
     return Status;
   }
 
diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c
index 161731b2113..f987cc67a69 100644
--- a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c
+++ b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c
@@ -362,7 +362,7 @@ RedfishDiscoverProtocolInstalled (
   EFI_REDFISH_DISCOVERED_TOKEN            *ThisRedfishDiscoveredToken;
   UINTN                                   NumberOfNetworkInterfaces;
 
-  DEBUG ((DEBUG_INFO, "%a: New network interface is installed on system by EFI Redfish discover driver.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: New network interface is installed on system by EFI Redfish discover driver.\n", __func__));
 
   BufferSize = sizeof (EFI_HANDLE);
   Status     = gBS->LocateHandle (
diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
index 0b86a7b5cc4..470b4c9e006 100644
--- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
+++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
@@ -272,7 +272,7 @@ Tcp6GetSubnetInfo (
   }
 
   if (IpModedata.AddressCount == 0) {
-    DEBUG ((DEBUG_INFO, "%a: No IPv6 address configured.\n", __func__));
+    DEBUG ((DEBUG_MANAGEABILITY, "%a: No IPv6 address configured.\n", __func__));
     Instance->SubnetAddrInfoIPv6Number = 0;
     return EFI_SUCCESS;
   }
@@ -684,7 +684,7 @@ AddAndSignalNewRedfishService (
   RestExOpened = FALSE;
   DeleteRestEx = FALSE;
 
-  DEBUG ((DEBUG_INFO, "%a:Add this instance to Redfish instance list.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a:Add this instance to Redfish instance list.\n", __func__));
 
   if (Uuid != NULL) {
     Char16Uuid = (CHAR16 *)AllocateZeroPool (AsciiStrSize ((const CHAR8 *)Uuid) * sizeof (CHAR16));
@@ -720,7 +720,7 @@ AddAndSignalNewRedfishService (
             {
               InfoRefresh        = TRUE;
               DiscoveredInstance = DiscoveredList->Instance;
-              DEBUG ((DEBUG_INFO, "*** This Redfish Service information refresh ***\n"));
+              DEBUG ((DEBUG_MANAGEABILITY, "*** This Redfish Service information refresh ***\n"));
             }
 
             break;
@@ -770,30 +770,30 @@ AddAndSignalNewRedfishService (
       }
     }
 
-    DEBUG ((DEBUG_INFO, "*** Redfish Service Information ***\n"));
+    DEBUG ((DEBUG_MANAGEABILITY, "*** Redfish Service Information ***\n"));
 
     DiscoveredInstance->Information.UseHttps = UseHttps;
     if (RedfishVersion != NULL) {
       DiscoveredInstance->Information.RedfishVersion = *RedfishVersion;
-      DEBUG ((DEBUG_INFO, "Redfish service version: %d.\n", DiscoveredInstance->Information.RedfishVersion));
+      DEBUG ((DEBUG_MANAGEABILITY, "Redfish service version: %d.\n", DiscoveredInstance->Information.RedfishVersion));
     }
 
     if (RedfishLocation != NULL) {
       DiscoveredInstance->Information.Location = (CHAR16 *)AllocatePool (AsciiStrSize ((const CHAR8 *)RedfishLocation) * sizeof (CHAR16));
       AsciiStrToUnicodeStrS ((const CHAR8 *)RedfishLocation, DiscoveredInstance->Information.Location, AsciiStrSize ((const CHAR8 *)RedfishLocation) * sizeof (CHAR16));
-      DEBUG ((DEBUG_INFO, "Redfish service location: %s.\n", DiscoveredInstance->Information.Location));
+      DEBUG ((DEBUG_MANAGEABILITY, "Redfish service location: %s.\n", DiscoveredInstance->Information.Location));
     }
 
     if (Uuid != NULL) {
       DiscoveredInstance->Information.Uuid = (CHAR16 *)AllocatePool (AsciiStrSize ((const CHAR8 *)Uuid) * sizeof (CHAR16));
       AsciiStrToUnicodeStrS ((const CHAR8 *)Uuid, DiscoveredInstance->Information.Uuid, AsciiStrSize ((const CHAR8 *)Uuid) * sizeof (CHAR16));
-      DEBUG ((DEBUG_INFO, "Service UUID: %s.\n", DiscoveredInstance->Information.Uuid));
+      DEBUG ((DEBUG_MANAGEABILITY, "Service UUID: %s.\n", DiscoveredInstance->Information.Uuid));
     }
 
     if (Os != NULL) {
       DiscoveredInstance->Information.Os = (CHAR16 *)AllocatePool (AsciiStrSize ((const CHAR8 *)Os) * sizeof (CHAR16));
       AsciiStrToUnicodeStrS ((const CHAR8 *)Os, DiscoveredInstance->Information.Os, AsciiStrSize ((const CHAR8 *)Os) * sizeof (CHAR16));
-      DEBUG ((DEBUG_INFO, "Redfish service OS: %s, Version:%s.\n", DiscoveredInstance->Information.Os, DiscoveredInstance->Information.OsVersion));
+      DEBUG ((DEBUG_MANAGEABILITY, "Redfish service OS: %s, Version:%s.\n", DiscoveredInstance->Information.Os, DiscoveredInstance->Information.OsVersion));
     }
 
     if (OsVer != NULL) {
@@ -806,7 +806,7 @@ AddAndSignalNewRedfishService (
       AsciiStrToUnicodeStrS ((const CHAR8 *)Product, DiscoveredInstance->Information.Product, AsciiStrSize ((const CHAR8 *)Product) * sizeof (CHAR16));
       DiscoveredInstance->Information.ProductVer = (CHAR16 *)AllocatePool (AsciiStrSize ((const CHAR8 *)ProductVer) * sizeof (CHAR16));
       AsciiStrToUnicodeStrS ((const CHAR8 *)ProductVer, DiscoveredInstance->Information.ProductVer, AsciiStrSize ((const CHAR8 *)ProductVer) * sizeof (CHAR16));
-      DEBUG ((DEBUG_INFO, "Redfish service product: %s, Version:%s.\n", DiscoveredInstance->Information.Product, DiscoveredInstance->Information.ProductVer));
+      DEBUG ((DEBUG_MANAGEABILITY, "Redfish service product: %s, Version:%s.\n", DiscoveredInstance->Information.Product, DiscoveredInstance->Information.ProductVer));
     }
 
     if (RedfishLocation == NULL) {
@@ -824,11 +824,11 @@ AddAndSignalNewRedfishService (
     DiscoveredInstance->Status = EFI_SUCCESS;
   } else {
     if (DiscoveredList != NULL) {
-      DEBUG ((DEBUG_INFO, "*** This Redfish Service was already found ***\n"));
+      DEBUG ((DEBUG_MANAGEABILITY, "*** This Redfish Service was already found ***\n"));
       if (DiscoveredInstance->Information.Uuid != NULL) {
-        DEBUG ((DEBUG_INFO, "Service UUID: %s.\n", DiscoveredInstance->Information.Uuid));
+        DEBUG ((DEBUG_MANAGEABILITY, "Service UUID: %s.\n", DiscoveredInstance->Information.Uuid));
       } else {
-        DEBUG ((DEBUG_INFO, "Service UUID: unknown.\n"));
+        DEBUG ((DEBUG_MANAGEABILITY, "Service UUID: unknown.\n"));
       }
     }
   }
@@ -1002,7 +1002,7 @@ NetworkInterfaceGetSubnetInfo (
       DEBUG ((DEBUG_ERROR, "%a:Failed to get Subnet infomation.\n", __func__));
       return Status;
     } else {
-      DEBUG ((DEBUG_INFO, "%a:MAC address: %s\n", __func__, Instance->StrMacAddr));
+      DEBUG ((DEBUG_MANAGEABILITY, "%a:MAC address: %s\n", __func__, Instance->StrMacAddr));
       if (CheckIsIpVersion6 (Instance)) {
         if (Instance->SubnetAddrInfoIPv6Number == 0) {
           DEBUG ((DEBUG_ERROR, "%a: There is no Subnet infomation for IPv6 network interface.\n", __func__));
@@ -1013,7 +1013,7 @@ NetworkInterfaceGetSubnetInfo (
         IP6_COPY_ADDRESS (&Instance->SubnetAddr.v6, &ThisSubnetAddrInfoIPv6->Address);
         Instance->SubnetPrefixLength = ThisSubnetAddrInfoIPv6->PrefixLength;
         DEBUG ((
-          DEBUG_INFO,
+          DEBUG_MANAGEABILITY,
           "   IPv6 Subnet ID:%d, Prefix length: %d.\n",
           ThisSubnetAddrInfoIPv6->Address.Addr[7] + (UINT16)ThisSubnetAddrInfoIPv6->Address.Addr[6] * 256,
           ThisSubnetAddrInfoIPv6->PrefixLength
@@ -1038,7 +1038,7 @@ NetworkInterfaceGetSubnetInfo (
             ThisSubnetAddrInfoIPv6++;
             mNumNetworkInterface++;
             DEBUG ((
-              DEBUG_INFO,
+              DEBUG_MANAGEABILITY,
               "   IPv6 Subnet ID:%d, Prefix length: %d.\n",
               ThisSubnetAddrInfoIPv6->Address.Addr[7] + (UINT16)ThisSubnetAddrInfoIPv6->Address.Addr[6] * 256,
               ThisSubnetAddrInfoIPv6->PrefixLength
@@ -1050,7 +1050,7 @@ NetworkInterfaceGetSubnetInfo (
         }
       } else {
         DEBUG ((
-          DEBUG_INFO,
+          DEBUG_MANAGEABILITY,
           "   IPv4 Subnet:%d.%d.%d.%d Subnet mask: %d.%d.%d.%d.\n",
           Instance->SubnetAddr.v4.Addr[0],
           Instance->SubnetAddr.v4.Addr[1],
@@ -1204,7 +1204,7 @@ RedfishServiceAcquireService (
   UINTN                                            NetworkInterfacesIndex;
   EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL  *TargetNetworkInterfaceInternal;
 
-  DEBUG ((DEBUG_INFO, "%a:Entry.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a:Entry.\n", __func__));
 
   //
   // Validate parameters.
@@ -1238,7 +1238,7 @@ RedfishServiceAcquireService (
     NewInstance = FALSE;
     Instance    = GetInstanceByOwner (ImageHandle, TargetNetworkInterfaceInternal, Flags & ~EFI_REDFISH_DISCOVER_VALIDATION); // Check if we can re-use previous instance.
     if (Instance == NULL) {
-      DEBUG ((DEBUG_INFO, "%a:Create new EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE.\n", __func__));
+      DEBUG ((DEBUG_MANAGEABILITY, "%a:Create new EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE.\n", __func__));
       Instance = (EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE *)AllocateZeroPool (sizeof (EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE));
       if (Instance == NULL) {
         DEBUG ((DEBUG_ERROR, "%a:Memory allocation fail.\n", __func__));
@@ -1258,14 +1258,14 @@ RedfishServiceAcquireService (
     }
 
     if (TargetNetworkInterfaceInternal->StrMacAddr != NULL) {
-      DEBUG ((DEBUG_INFO, "%a:Acquire Redfish service on network interface MAC address:%s.\n", __func__, TargetNetworkInterfaceInternal->StrMacAddr));
+      DEBUG ((DEBUG_MANAGEABILITY, "%a:Acquire Redfish service on network interface MAC address:%s.\n", __func__, TargetNetworkInterfaceInternal->StrMacAddr));
     } else {
-      DEBUG ((DEBUG_INFO, "%a:WARNING: No MAC address on this network interface.\n", __func__));
+      DEBUG ((DEBUG_MANAGEABILITY, "%a:WARNING: No MAC address on this network interface.\n", __func__));
     }
 
     Instance->DiscoverToken = Token; // Always use the latest Token passed by caller.
     if ((Flags & EFI_REDFISH_DISCOVER_HOST_INTERFACE) != 0) {
-      DEBUG ((DEBUG_INFO, "%a:Redfish HOST interface discovery.\n", __func__));
+      DEBUG ((DEBUG_MANAGEABILITY, "%a:Redfish HOST interface discovery.\n", __func__));
       Instance->HostIntfValidation = FALSE;
       if ((Flags & EFI_REDFISH_DISCOVER_VALIDATION) != 0) {
         Instance->HostIntfValidation = TRUE;
@@ -1747,7 +1747,7 @@ BuildupNetworkInterface (
             DEBUG ((DEBUG_ERROR, "%a: Fail to install EFI_REDFISH_DISCOVER_PROTOCOL\n", __func__));
           }
         } else {
-          DEBUG ((DEBUG_INFO, "%a: Not REST EX, continue with next\n", __func__));
+          DEBUG ((DEBUG_MANAGEABILITY, "%a: Not REST EX, continue with next\n", __func__));
           Index++;
           if (Index == (sizeof (gRequiredProtocol) / sizeof (REDFISH_DISCOVER_REQUIRED_PROTOCOL))) {
             break;
diff --git a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c
index c4fa59193a2..55a66decfc8 100644
--- a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c
+++ b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c
@@ -221,7 +221,7 @@ RedfishCreateSmbiosTable42 (
                                              &MemArrayMappedAddrSmbiosHandle,
                                              (EFI_SMBIOS_TABLE_HEADER *)Type42Record
                                              );
-  DEBUG ((DEBUG_INFO, "RedfishPlatformDxe: Smbios->Add() - %r\n", Status));
+  DEBUG ((DEBUG_MANAGEABILITY, "RedfishPlatformDxe: Smbios->Add() - %r\n", Status));
   if (EFI_ERROR (Status)) {
     goto ON_EXIT;
   }
@@ -259,7 +259,7 @@ PlatformHostInterfaceInformationReady (
   IN  VOID       *Context
   )
 {
-  DEBUG ((DEBUG_INFO, "%a: Platform Redfish Host Interface informtion is ready\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: Platform Redfish Host Interface informtion is ready\n", __func__));
 
   RedfishCreateSmbiosTable42 ();
 
@@ -291,7 +291,7 @@ RedfishHostInterfaceDxeEntryPoint (
   EFI_STATUS  Status;
   EFI_GUID    *ReadyGuid;
 
-  DEBUG ((DEBUG_INFO, "%a: Entry\n.", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry\n.", __func__));
 
   //
   // Check if the Redfish Host Interface depends on
@@ -299,8 +299,8 @@ RedfishHostInterfaceDxeEntryPoint (
   //
   Status = RedfishPlatformHostInterfaceNotification (&ReadyGuid);
   if (Status == EFI_SUCCESS) {
-    DEBUG ((DEBUG_INFO, "    Create protocol install notification to know the installation of platform Redfish host interface readiness\n"));
-    DEBUG ((DEBUG_INFO, "    Protocol GUID: %g\n", ReadyGuid));
+    DEBUG ((DEBUG_MANAGEABILITY, "    Create protocol install notification to know the installation of platform Redfish host interface readiness\n"));
+    DEBUG ((DEBUG_MANAGEABILITY, "    Protocol GUID: %g\n", ReadyGuid));
     //
     // Register event for ReadyGuid protocol installed by
     // platform Redfish host interface library.
diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c b/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c
index 41f2b29c83b..838e24f7e7e 100644
--- a/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c
+++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c
@@ -28,7 +28,7 @@ ResetHttpTslSession (
 {
   EFI_STATUS  Status;
 
-  DEBUG ((DEBUG_INFO, "%a: TCP connection is finished. Could be TSL session closure, reset HTTP instance for the new TLS session.\n", __func__));
+  DEBUG ((DEBUG_MANAGEABILITY, "%a: TCP connection is finished. Could be TSL session closure, reset HTTP instance for the new TLS session.\n", __func__));
 
   Status = Instance->HttpIo.Http->Configure (Instance->HttpIo.Http, NULL);
   if (EFI_ERROR (Status)) {
diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c b/RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c
index 3722e1f7956..d8f2c73f8ef 100644
--- a/RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c
+++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c
@@ -250,17 +250,17 @@ ReSendRequest:;
       goto ReSendRequest;
     }
   } else if (ResponseData->Response.StatusCode == HTTP_STATUS_204_NO_CONTENT) {
-    DEBUG ((DEBUG_INFO, "HTTP_STATUS_204_NO_CONTENT\n"));
+    DEBUG ((DEBUG_MANAGEABILITY, "HTTP_STATUS_204_NO_CONTENT\n"));
 
     if (FixedPcdGetBool (PcdRedfishRestExChunkRequestMode) && (SendChunkProcess == HttpIoSendChunkHeaderZeroContent)) {
-      DEBUG ((DEBUG_INFO, "This is chunk transfer, start to send all chunks - %d.", ResponseData->Response.StatusCode));
+      DEBUG ((DEBUG_MANAGEABILITY, "This is chunk transfer, start to send all chunks - %d.", ResponseData->Response.StatusCode));
       SendChunkProcess++;
       goto ReSendRequest;
     }
   } else if (ResponseData->Response.StatusCode == HTTP_STATUS_201_CREATED) {
-    DEBUG ((DEBUG_INFO, "HTTP_STATUS_201_CREATED\n"));
+    DEBUG ((DEBUG_MANAGEABILITY, "HTTP_STATUS_201_CREATED\n"));
   } else if (ResponseData->Response.StatusCode == HTTP_STATUS_202_ACCEPTED) {
-    DEBUG ((DEBUG_INFO, "HTTP_STATUS_202_ACCEPTED\n"));
+    DEBUG ((DEBUG_MANAGEABILITY, "HTTP_STATUS_202_ACCEPTED\n"));
   } else if (ResponseData->Response.StatusCode == HTTP_STATUS_413_REQUEST_ENTITY_TOO_LARGE) {
     DEBUG ((DEBUG_REDFISH_NETWORK, "HTTP_STATUS_413_REQUEST_ENTITY_TOO_LARGE\n"));
 
-- 
2.37.1.windows.1


             reply	other threads:[~2023-05-30  7:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30  7:09 Chang, Abner [this message]
2023-05-30  7:15 ` [PATCH] RedfishPkg: Use DEBUG_MANAGEABILITY Nickle Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230530070915.731-1-abner.chang@amd.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox