]> xenbits.xensource.com Git - ovmf.git/commitdiff
DynamicTablesPkg: Reduce log output from TableHelperLib
authorSami Mujawar <sami.mujawar@arm.com>
Wed, 25 May 2022 17:56:25 +0000 (18:56 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 29 Mar 2023 13:48:54 +0000 (13:48 +0000)
Reduce the log output from Configuration Manager Object Parser
in TableHelperLib by enabling the logs only if DEBUG_INFO is
enabled.

Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c

index 5e4b88e8cc754ea72157ea4a0c6d0f5b9eae2495..99d6032510a5e912c9189df82c4d2b4398458d2d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Configuration Manager Object parser.\r
 \r
-  Copyright (c) 2021 - 2022, ARM Limited. All rights reserved.<BR>\r
+  Copyright (c) 2021 - 2023, ARM Limited. All rights reserved.<BR>\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -787,7 +787,7 @@ PrintOemId (
   )\r
 {\r
   DEBUG ((\r
-    DEBUG_ERROR,\r
+    DEBUG_INFO,\r
     (Format != NULL) ? Format : "%C%C%C%C%C%C",\r
     Ptr[0],\r
     Ptr[1],\r
@@ -855,7 +855,7 @@ PrintCmObjDesc (
     *RemainingSize -= Parser[Index].Length;\r
     if (*RemainingSize < 0) {\r
       DEBUG ((\r
-        DEBUG_ERROR,\r
+        DEBUG_INFO,\r
         "\nERROR: %a: Buffer overrun\n",\r
         Parser[Index].NameStr\r
         ));\r
@@ -865,11 +865,11 @@ PrintCmObjDesc (
 \r
     // Indentation\r
     for (IndentIndex = 0; IndentIndex < IndentLevel; IndentIndex++) {\r
-      DEBUG ((DEBUG_ERROR, "  "));\r
+      DEBUG ((DEBUG_INFO, "  "));\r
     }\r
 \r
     DEBUG ((\r
-      DEBUG_ERROR,\r
+      DEBUG_INFO,\r
       "%-*a :",\r
       OUTPUT_FIELD_COLUMN_WIDTH - 2 * IndentLevel,\r
       Parser[Index].NameStr\r
@@ -879,20 +879,20 @@ PrintCmObjDesc (
     } else if (Parser[Index].Format != NULL) {\r
       switch (Parser[Index].Length) {\r
         case 1:\r
-          DEBUG ((DEBUG_ERROR, Parser[Index].Format, *(UINT8 *)Data));\r
+          DEBUG ((DEBUG_INFO, Parser[Index].Format, *(UINT8 *)Data));\r
           break;\r
         case 2:\r
-          DEBUG ((DEBUG_ERROR, Parser[Index].Format, *(UINT16 *)Data));\r
+          DEBUG ((DEBUG_INFO, Parser[Index].Format, *(UINT16 *)Data));\r
           break;\r
         case 4:\r
-          DEBUG ((DEBUG_ERROR, Parser[Index].Format, *(UINT32 *)Data));\r
+          DEBUG ((DEBUG_INFO, Parser[Index].Format, *(UINT32 *)Data));\r
           break;\r
         case 8:\r
-          DEBUG ((DEBUG_ERROR, Parser[Index].Format, ReadUnaligned64 (Data)));\r
+          DEBUG ((DEBUG_INFO, Parser[Index].Format, ReadUnaligned64 (Data)));\r
           break;\r
         default:\r
           DEBUG ((\r
-            DEBUG_ERROR,\r
+            DEBUG_INFO,\r
             "\nERROR: %a: CANNOT PARSE THIS FIELD, Field Length = %d\n",\r
             Parser[Index].NameStr,\r
             Parser[Index].Length\r
@@ -901,7 +901,7 @@ PrintCmObjDesc (
     } else if (Parser[Index].SubObjParser != NULL) {\r
       SubStructSize = Parser[Index].Length;\r
 \r
-      DEBUG ((DEBUG_ERROR, "\n"));\r
+      DEBUG ((DEBUG_INFO, "\n"));\r
       PrintCmObjDesc (\r
         Data,\r
         Parser[Index].SubObjParser,\r
@@ -912,14 +912,14 @@ PrintCmObjDesc (
     } else {\r
       ASSERT (0);\r
       DEBUG ((\r
-        DEBUG_ERROR,\r
+        DEBUG_INFO,\r
         "\nERROR: %a: CANNOT PARSE THIS FIELD, Field Length = %d\n",\r
         Parser[Index].NameStr,\r
         Parser[Index].Length\r
         ));\r
     }\r
 \r
-    DEBUG ((DEBUG_ERROR, "\n"));\r
+    DEBUG ((DEBUG_INFO, "\n"));\r
     Data = (UINT8 *)Data + Parser[Index].Length;\r
   } // for\r
 }\r
@@ -978,7 +978,7 @@ ParseCmObjDesc (
 \r
   for (ObjIndex = 0; ObjIndex < ObjectCount; ObjIndex++) {\r
     DEBUG ((\r
-      DEBUG_ERROR,\r
+      DEBUG_INFO,\r
       "\n%-*a [%d/%d]:\n",\r
       OUTPUT_FIELD_COLUMN_WIDTH,\r
       ParserArray->ObjectName,\r