]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c
ShellPkg/UefiShellAcpiViewCommandLib: Fix ECC issues
[mirror_edk2.git] / ShellPkg / Library / UefiShellAcpiViewCommandLib / AcpiParser.c
index 318f386fda165146bad49f9edbc111d4e218db98..088575d0144becab944b2cfe61e3e0c7f6795f0c 100644 (file)
@@ -1,4 +1,4 @@
-/**\r
+/** @file\r
   ACPI parser\r
 \r
   Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
@@ -21,8 +21,9 @@ STATIC UINT32   gIndent;
 STATIC UINT32   mTableErrorCount;\r
 STATIC UINT32   mTableWarningCount;\r
 \r
-/** This function resets the ACPI table error counter to Zero.\r
-*/\r
+/**\r
+  This function resets the ACPI table error counter to Zero.\r
+**/\r
 VOID\r
 ResetErrorCount (\r
   VOID\r
@@ -31,10 +32,11 @@ ResetErrorCount (
   mTableErrorCount = 0;\r
 }\r
 \r
-/** This function returns the ACPI table error count.\r
+/**\r
+  This function returns the ACPI table error count.\r
 \r
   @retval Returns the count of errors detected in the ACPI tables.\r
-*/\r
+**/\r
 UINT32\r
 GetErrorCount (\r
   VOID\r
@@ -43,8 +45,9 @@ GetErrorCount (
   return mTableErrorCount;\r
 }\r
 \r
-/** This function resets the ACPI table warning counter to Zero.\r
-*/\r
+/**\r
+  This function resets the ACPI table warning counter to Zero.\r
+**/\r
 VOID\r
 ResetWarningCount (\r
   VOID\r
@@ -53,10 +56,11 @@ ResetWarningCount (
   mTableWarningCount = 0;\r
 }\r
 \r
-/** This function returns the ACPI table warning count.\r
+/**\r
+  This function returns the ACPI table warning count.\r
 \r
   @retval Returns the count of warning detected in the ACPI tables.\r
-*/\r
+**/\r
 UINT32\r
 GetWarningCount (\r
   VOID\r
@@ -65,8 +69,9 @@ GetWarningCount (
   return mTableWarningCount;\r
 }\r
 \r
-/** This function increments the ACPI table error counter.\r
-*/\r
+/**\r
+  This function increments the ACPI table error counter.\r
+**/\r
 VOID\r
 EFIAPI\r
 IncrementErrorCount (\r
@@ -76,8 +81,9 @@ IncrementErrorCount (
   mTableErrorCount++;\r
 }\r
 \r
-/** This function increments the ACPI table warning counter.\r
-*/\r
+/**\r
+  This function increments the ACPI table warning counter.\r
+**/\r
 VOID\r
 EFIAPI\r
 IncrementWarningCount (\r
@@ -87,7 +93,8 @@ IncrementWarningCount (
   mTableWarningCount++;\r
 }\r
 \r
-/** This function verifies the ACPI table checksum.\r
+/**\r
+  This function verifies the ACPI table checksum.\r
 \r
   This function verifies the checksum for the ACPI table and optionally\r
   prints the status.\r
@@ -98,7 +105,7 @@ IncrementWarningCount (
 \r
   @retval TRUE        The checksum is OK.\r
   @retval FALSE       The checksum failed.\r
-*/\r
+**/\r
 BOOLEAN\r
 EFIAPI\r
 VerifyChecksum (\r
@@ -146,11 +153,12 @@ VerifyChecksum (
   return (Checksum == 0);\r
 }\r
 \r
-/** This function performs a raw data dump of the ACPI table.\r
+/**\r
+  This function performs a raw data dump of the ACPI table.\r
 \r
   @param [in] Ptr     Pointer to the start of the table buffer.\r
   @param [in] Length  The length of the buffer.\r
-*/\r
+**/\r
 VOID\r
 EFIAPI\r
 DumpRaw (\r
@@ -205,12 +213,12 @@ DumpRaw (
   Print (L"  %a", AsciiBuffer);\r
 }\r
 \r
-/** This function traces 1 byte of data as specified in the\r
-    format string.\r
+/**\r
+  This function traces 1 byte of data as specified in the format string.\r
 \r
   @param [in] Format  The format string for tracing the data.\r
   @param [in] Ptr     Pointer to the start of the buffer.\r
-*/\r
+**/\r
 VOID\r
 EFIAPI\r
 DumpUint8 (\r
@@ -221,12 +229,12 @@ DumpUint8 (
   Print (Format, *Ptr);\r
 }\r
 \r
-/** This function traces 2 bytes of data as specified in the\r
-    format string.\r
+/**\r
+  This function traces 2 bytes of data as specified in the format string.\r
 \r
   @param [in] Format  The format string for tracing the data.\r
   @param [in] Ptr     Pointer to the start of the buffer.\r
-*/\r
+**/\r
 VOID\r
 EFIAPI\r
 DumpUint16 (\r
@@ -237,12 +245,12 @@ DumpUint16 (
   Print (Format, *(UINT16*)Ptr);\r
 }\r
 \r
-/** This function traces 4 bytes of data as specified in the\r
-    format string.\r
+/**\r
+  This function traces 4 bytes of data as specified in the format string.\r
 \r
   @param [in] Format  The format string for tracing the data.\r
   @param [in] Ptr     Pointer to the start of the buffer.\r
-*/\r
+**/\r
 VOID\r
 EFIAPI\r
 DumpUint32 (\r
@@ -253,12 +261,12 @@ DumpUint32 (
   Print (Format, *(UINT32*)Ptr);\r
 }\r
 \r
-/** This function traces 8 bytes of data as specified by the\r
-    format string.\r
+/**\r
+  This function traces 8 bytes of data as specified by the format string.\r
 \r
   @param [in] Format  The format string for tracing the data.\r
   @param [in] Ptr     Pointer to the start of the buffer.\r
-*/\r
+**/\r
 VOID\r
 EFIAPI\r
 DumpUint64 (\r
@@ -276,14 +284,15 @@ DumpUint64 (
   Print (Format, Val);\r
 }\r
 \r
-/** This function traces 3 characters which can be optionally\r
-   formated using the format string if specified.\r
+/**\r
+  This function traces 3 characters which can be optionally\r
+  formated using the format string if specified.\r
 \r
   If no format string is specified the Format must be NULL.\r
 \r
   @param [in] Format  Optional format string for tracing the data.\r
   @param [in] Ptr     Pointer to the start of the buffer.\r
-*/\r
+**/\r
 VOID\r
 EFIAPI\r
 Dump3Chars (\r
@@ -299,14 +308,15 @@ Dump3Chars (
     );\r
 }\r
 \r
-/** This function traces 4 characters which can be optionally\r
-   formated using the format string if specified.\r
+/**\r
+  This function traces 4 characters which can be optionally\r
+  formated using the format string if specified.\r
 \r
   If no format string is specified the Format must be NULL.\r
 \r
   @param [in] Format  Optional format string for tracing the data.\r
   @param [in] Ptr     Pointer to the start of the buffer.\r
-*/\r
+**/\r
 VOID\r
 EFIAPI\r
 Dump4Chars (\r
@@ -323,14 +333,15 @@ Dump4Chars (
     );\r
 }\r
 \r
-/** This function traces 6 characters which can be optionally\r
-   formated using the format string if specified.\r
+/**\r
+  This function traces 6 characters which can be optionally\r
+  formated using the format string if specified.\r
 \r
   If no format string is specified the Format must be NULL.\r
 \r
   @param [in] Format  Optional format string for tracing the data.\r
   @param [in] Ptr     Pointer to the start of the buffer.\r
-*/\r
+**/\r
 VOID\r
 EFIAPI\r
 Dump6Chars (\r
@@ -349,14 +360,15 @@ Dump6Chars (
     );\r
 }\r
 \r
-/** This function traces 8 characters which can be optionally\r
-   formated using the format string if specified.\r
+/**\r
+  This function traces 8 characters which can be optionally\r
+  formated using the format string if specified.\r
 \r
   If no format string is specified the Format must be NULL.\r
 \r
   @param [in] Format  Optional format string for tracing the data.\r
   @param [in] Ptr     Pointer to the start of the buffer.\r
-*/\r
+**/\r
 VOID\r
 EFIAPI\r
 Dump8Chars (\r
@@ -377,7 +389,8 @@ Dump8Chars (
     );\r
 }\r
 \r
-/** This function indents and prints the ACPI table Field Name.\r
+/**\r
+  This function indents and prints the ACPI table Field Name.\r
 \r
   @param [in] Indent      Number of spaces to add to the global table indent.\r
                           The global table indent is 0 by default; however\r
@@ -387,7 +400,7 @@ Dump8Chars (
                           Therefore the total indent in the output is\r
                           dependent on from where this function is called.\r
   @param [in] FieldName   Pointer to the Field Name.\r
-*/\r
+**/\r
 VOID\r
 EFIAPI\r
 PrintFieldName (\r
@@ -404,7 +417,8 @@ PrintFieldName (
     );\r
 }\r
 \r
-/** This function is used to parse an ACPI table buffer.\r
+/**\r
+  This function is used to parse an ACPI table buffer.\r
 \r
   The ACPI table buffer is parsed using the ACPI table parser information\r
   specified by a pointer to an array of ACPI_PARSER elements. This parser\r
@@ -428,7 +442,7 @@ PrintFieldName (
   @param [in] ParserItems  Number of items in the ACPI_PARSER array.\r
 \r
   @retval Number of bytes parsed.\r
-*/\r
+**/\r
 UINT32\r
 EFIAPI\r
 ParseAcpi (\r
@@ -540,10 +554,11 @@ ParseAcpi (
   return Offset;\r
 }\r
 \r
-/** An array describing the ACPI Generic Address Structure.\r
+/**\r
+  An array describing the ACPI Generic Address Structure.\r
   The GasParser array is used by the ParseAcpi function to parse and/or trace\r
   the GAS structure.\r
-*/\r
+**/\r
 STATIC CONST ACPI_PARSER GasParser[] = {\r
   {L"Address Space ID", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
   {L"Register Bit Width", 1, 1, L"0x%x", NULL, NULL, NULL, NULL},\r
@@ -552,12 +567,12 @@ STATIC CONST ACPI_PARSER GasParser[] = {
   {L"Address", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL}\r
 };\r
 \r
-/** This function indents and traces the GAS structure as described\r
-    by the GasParser.\r
+/**\r
+  This function indents and traces the GAS structure as described by the GasParser.\r
 \r
   @param [in] Ptr     Pointer to the start of the buffer.\r
   @param [in] Indent  Number of spaces to indent the output.\r
-*/\r
+**/\r
 VOID\r
 EFIAPI\r
 DumpGasStruct (\r
@@ -576,11 +591,12 @@ DumpGasStruct (
     );\r
 }\r
 \r
-/** This function traces the GAS structure as described by the GasParser.\r
+/**\r
+  This function traces the GAS structure as described by the GasParser.\r
 \r
   @param [in] Format  Optional format string for tracing the data.\r
   @param [in] Ptr     Pointer to the start of the buffer.\r
-*/\r
+**/\r
 VOID\r
 EFIAPI\r
 DumpGas (\r
@@ -591,12 +607,13 @@ DumpGas (
   DumpGasStruct (Ptr, 2);\r
 }\r
 \r
-/** This function traces the ACPI header as described by the AcpiHeaderParser.\r
+/**\r
+  This function traces the ACPI header as described by the AcpiHeaderParser.\r
 \r
   @param [in] Ptr          Pointer to the start of the buffer.\r
 \r
   @retval Number of bytes parsed.\r
-*/\r
+**/\r
 UINT32\r
 EFIAPI\r
 DumpAcpiHeader (\r
@@ -618,7 +635,8 @@ DumpAcpiHeader (
            );\r
 }\r
 \r
-/** This function parses the ACPI header as described by the AcpiHeaderParser.\r
+/**\r
+  This function parses the ACPI header as described by the AcpiHeaderParser.\r
 \r
   This function optionally returns the signature, length and revision of the\r
   ACPI table.\r
@@ -629,7 +647,7 @@ DumpAcpiHeader (
   @param [out] Revision   Gets location of the revision of the ACPI table.\r
 \r
   @retval Number of bytes parsed.\r
-*/\r
+**/\r
 UINT32\r
 EFIAPI\r
 ParseAcpiHeader (\r