]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c
ShellPkg: Apply uncrustify changes
[mirror_edk2.git] / ShellPkg / Library / UefiShellAcpiViewCommandLib / Parsers / Iort / IortParser.c
index f7447947b2308d35d4d2890373778f0fd2f97f9e..81bfacd83added87a867cf365a56d4b7a1410ef2 100644 (file)
 #include "AcpiViewConfig.h"\r
 \r
 // Local variables\r
-STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
+STATIC ACPI_DESCRIPTION_HEADER_INFO  AcpiHdrInfo;\r
 \r
-STATIC CONST UINT32IortNodeCount;\r
-STATIC CONST UINT32IortNodeOffset;\r
+STATIC CONST UINT32  *IortNodeCount;\r
+STATIC CONST UINT32  *IortNodeOffset;\r
 \r
-STATIC CONST UINT8*  IortNodeType;\r
-STATIC CONST UINT16IortNodeLength;\r
-STATIC CONST UINT32IortIdMappingCount;\r
-STATIC CONST UINT32IortIdMappingOffset;\r
+STATIC CONST UINT8   *IortNodeType;\r
+STATIC CONST UINT16  *IortNodeLength;\r
+STATIC CONST UINT32  *IortIdMappingCount;\r
+STATIC CONST UINT32  *IortIdMappingOffset;\r
 \r
-STATIC CONST UINT32InterruptContextCount;\r
-STATIC CONST UINT32InterruptContextOffset;\r
-STATIC CONST UINT32PmuInterruptCount;\r
-STATIC CONST UINT32PmuInterruptOffset;\r
+STATIC CONST UINT32  *InterruptContextCount;\r
+STATIC CONST UINT32  *InterruptContextOffset;\r
+STATIC CONST UINT32  *PmuInterruptCount;\r
+STATIC CONST UINT32  *PmuInterruptOffset;\r
 \r
-STATIC CONST UINT32ItsCount;\r
+STATIC CONST UINT32  *ItsCount;\r
 \r
 /**\r
   This function validates the ID Mapping array count for the ITS node.\r
@@ -44,11 +44,11 @@ STATIC
 VOID\r
 EFIAPI\r
 ValidateItsIdMappingCount (\r
-  IN UINT8Ptr,\r
-  IN VOID*  Context\r
+  IN UINT8  *Ptr,\r
+  IN VOID   *Context\r
   )\r
 {\r
-  if (*(UINT32*)Ptr != 0) {\r
+  if (*(UINT32 *)Ptr != 0) {\r
     IncrementErrorCount ();\r
     Print (L"\nERROR: IORT ID Mapping count must be zero.");\r
   }\r
@@ -66,11 +66,11 @@ STATIC
 VOID\r
 EFIAPI\r
 ValidatePmcgIdMappingCount (\r
-  IN UINT8Ptr,\r
-  IN VOID*  Context\r
+  IN UINT8  *Ptr,\r
+  IN VOID   *Context\r
   )\r
 {\r
-  if (*(UINT32*)Ptr > 1) {\r
+  if (*(UINT32 *)Ptr > 1) {\r
     IncrementErrorCount ();\r
     Print (L"\nERROR: IORT ID Mapping count must not be greater than 1.");\r
   }\r
@@ -87,11 +87,11 @@ STATIC
 VOID\r
 EFIAPI\r
 ValidateItsIdArrayReference (\r
-  IN UINT8Ptr,\r
-  IN VOID*  Context\r
+  IN UINT8  *Ptr,\r
+  IN VOID   *Context\r
   )\r
 {\r
-  if (*(UINT32*)Ptr != 0) {\r
+  if (*(UINT32 *)Ptr != 0) {\r
     IncrementErrorCount ();\r
     Print (L"\nERROR: IORT ID Mapping offset must be zero.");\r
   }\r
@@ -119,135 +119,135 @@ ValidateItsIdArrayReference (
 /**\r
   An ACPI_PARSER array describing the ACPI IORT Table\r
 **/\r
-STATIC CONST ACPI_PARSER IortParser[] = {\r
+STATIC CONST ACPI_PARSER  IortParser[] = {\r
   PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
-  {L"Number of IORT Nodes", 4, 36, L"%d", NULL,\r
-   (VOID**)&IortNodeCount, NULL, NULL},\r
-  {L"Offset to Array of IORT Nodes", 4, 40, L"0x%x", NULL,\r
-   (VOID**)&IortNodeOffset, NULL, NULL},\r
-  {L"Reserved", 4, 44, L"0x%x", NULL, NULL, NULL, NULL}\r
+  { L"Number of IORT Nodes",       4,     36, L"%d",   NULL,\r
+    (VOID **)&IortNodeCount,       NULL,  NULL },\r
+  { L"Offset to Array of IORT Nodes",4,     40, L"0x%x", NULL,\r
+    (VOID **)&IortNodeOffset,      NULL,  NULL },\r
+  { L"Reserved",                   4,     44, L"0x%x", NULL,NULL,NULL, NULL }\r
 };\r
 \r
 /**\r
   An ACPI_PARSER array describing the IORT node header structure.\r
 **/\r
-STATIC CONST ACPI_PARSER IortNodeHeaderParser[] = {\r
+STATIC CONST ACPI_PARSER  IortNodeHeaderParser[] = {\r
   PARSE_IORT_NODE_HEADER (NULL, NULL)\r
 };\r
 \r
 /**\r
   An ACPI_PARSER array describing the IORT SMMUv1/2 node.\r
 **/\r
-STATIC CONST ACPI_PARSER IortNodeSmmuV1V2Parser[] = {\r
-  PARSE_IORT_NODE_HEADER (NULL, NULL),\r
-  {L"Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL},\r
-  {L"Span", 8, 24, L"0x%lx", NULL, NULL, NULL, NULL},\r
-  {L"Model", 4, 32, L"%d", NULL, NULL, NULL, NULL},\r
-  {L"Flags", 4, 36, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Reference to Global Interrupt Array", 4, 40, L"0x%x", NULL, NULL, NULL,\r
-   NULL},\r
-  {L"Number of context interrupts", 4, 44, L"%d", NULL,\r
-   (VOID**)&InterruptContextCount, NULL, NULL},\r
-  {L"Reference to Context Interrupt Array", 4, 48, L"0x%x", NULL,\r
-   (VOID**)&InterruptContextOffset, NULL, NULL},\r
-  {L"Number of PMU Interrupts", 4, 52, L"%d", NULL,\r
-   (VOID**)&PmuInterruptCount, NULL, NULL},\r
-  {L"Reference to PMU Interrupt Array", 4, 56, L"0x%x", NULL,\r
-   (VOID**)&PmuInterruptOffset, NULL, NULL},\r
+STATIC CONST ACPI_PARSER  IortNodeSmmuV1V2Parser[] = {\r
+  PARSE_IORT_NODE_HEADER (NULL,       NULL),\r
+  { L"Base Address",                  8,    16,  L"0x%lx", NULL, NULL, NULL, NULL },\r
+  { L"Span",                          8,    24,  L"0x%lx", NULL, NULL, NULL, NULL },\r
+  { L"Model",                         4,    32,  L"%d",    NULL, NULL, NULL, NULL },\r
+  { L"Flags",                         4,    36,  L"0x%x",  NULL, NULL, NULL, NULL },\r
+  { L"Reference to Global Interrupt Array",4,    40,  L"0x%x",  NULL, NULL, NULL,\r
+    NULL },\r
+  { L"Number of context interrupts",  4,    44,  L"%d",    NULL,\r
+    (VOID **)&InterruptContextCount,  NULL, NULL },\r
+  { L"Reference to Context Interrupt Array",4,    48,  L"0x%x",  NULL,\r
+    (VOID **)&InterruptContextOffset, NULL, NULL },\r
+  { L"Number of PMU Interrupts",      4,    52,  L"%d",    NULL,\r
+    (VOID **)&PmuInterruptCount,      NULL, NULL },\r
+  { L"Reference to PMU Interrupt Array",4,    56,  L"0x%x",  NULL,\r
+    (VOID **)&PmuInterruptOffset,     NULL, NULL },\r
 \r
   // Interrupt Array\r
-  {L"SMMU_NSgIrpt", 4, 60, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"SMMU_NSgIrpt interrupt flags", 4, 64, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"SMMU_NSgCfgIrpt", 4, 68, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"SMMU_NSgCfgIrpt interrupt flags", 4, 72, L"0x%x", NULL, NULL, NULL, NULL}\r
+  { L"SMMU_NSgIrpt",                  4,    60,  L"0x%x",  NULL, NULL, NULL, NULL },\r
+  { L"SMMU_NSgIrpt interrupt flags",  4,    64,  L"0x%x",  NULL, NULL, NULL, NULL },\r
+  { L"SMMU_NSgCfgIrpt",               4,    68,  L"0x%x",  NULL, NULL, NULL, NULL },\r
+  { L"SMMU_NSgCfgIrpt interrupt flags",4,    72,  L"0x%x",  NULL, NULL, NULL, NULL }\r
 };\r
 \r
 /**\r
   An ACPI_PARSER array describing the SMMUv1/2 Node Interrupt Array.\r
 **/\r
-STATIC CONST ACPI_PARSER InterruptArrayParser[] = {\r
-  {L"Interrupt GSIV", 4, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Flags", 4, 4, L"0x%x", NULL, NULL, NULL, NULL}\r
+STATIC CONST ACPI_PARSER  InterruptArrayParser[] = {\r
+  { L"Interrupt GSIV", 4, 0, L"0x%x", NULL, NULL, NULL, NULL },\r
+  { L"Flags",          4, 4, L"0x%x", NULL, NULL, NULL, NULL }\r
 };\r
 \r
 /**\r
   An ACPI_PARSER array describing the IORT ID Mapping.\r
 **/\r
-STATIC CONST ACPI_PARSER IortNodeIdMappingParser[] = {\r
-  {L"Input base", 4, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Number of IDs", 4, 4, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Output base", 4, 8, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Output reference", 4, 12, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Flags", 4, 16, L"0x%x", NULL, NULL, NULL, NULL}\r
+STATIC CONST ACPI_PARSER  IortNodeIdMappingParser[] = {\r
+  { L"Input base",       4, 0,  L"0x%x", NULL, NULL, NULL, NULL },\r
+  { L"Number of IDs",    4, 4,  L"0x%x", NULL, NULL, NULL, NULL },\r
+  { L"Output base",      4, 8,  L"0x%x", NULL, NULL, NULL, NULL },\r
+  { L"Output reference", 4, 12, L"0x%x", NULL, NULL, NULL, NULL },\r
+  { L"Flags",            4, 16, L"0x%x", NULL, NULL, NULL, NULL }\r
 };\r
 \r
 /**\r
   An ACPI_PARSER array describing the IORT SMMUv3 node.\r
 **/\r
-STATIC CONST ACPI_PARSER IortNodeSmmuV3Parser[] = {\r
+STATIC CONST ACPI_PARSER  IortNodeSmmuV3Parser[] = {\r
   PARSE_IORT_NODE_HEADER (NULL, NULL),\r
-  {L"Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL},\r
-  {L"Flags", 4, 24, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Reserved", 4, 28, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"VATOS Address", 8, 32, L"0x%lx", NULL, NULL, NULL, NULL},\r
-  {L"Model", 4, 40, L"%d", NULL, NULL, NULL, NULL},\r
-  {L"Event", 4, 44, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"PRI", 4, 48, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"GERR", 4, 52, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Sync", 4, 56, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Proximity domain", 4, 60, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Device ID mapping index", 4, 64, L"%d", NULL, NULL, NULL, NULL}\r
+  { L"Base Address",            8,    16,  L"0x%lx", NULL, NULL, NULL, NULL },\r
+  { L"Flags",                   4,    24,  L"0x%x",  NULL, NULL, NULL, NULL },\r
+  { L"Reserved",                4,    28,  L"0x%x",  NULL, NULL, NULL, NULL },\r
+  { L"VATOS Address",           8,    32,  L"0x%lx", NULL, NULL, NULL, NULL },\r
+  { L"Model",                   4,    40,  L"%d",    NULL, NULL, NULL, NULL },\r
+  { L"Event",                   4,    44,  L"0x%x",  NULL, NULL, NULL, NULL },\r
+  { L"PRI",                     4,    48,  L"0x%x",  NULL, NULL, NULL, NULL },\r
+  { L"GERR",                    4,    52,  L"0x%x",  NULL, NULL, NULL, NULL },\r
+  { L"Sync",                    4,    56,  L"0x%x",  NULL, NULL, NULL, NULL },\r
+  { L"Proximity domain",        4,    60,  L"0x%x",  NULL, NULL, NULL, NULL },\r
+  { L"Device ID mapping index", 4,    64,  L"%d",    NULL, NULL, NULL, NULL }\r
 };\r
 \r
 /**\r
   An ACPI_PARSER array describing the IORT ITS node.\r
 **/\r
-STATIC CONST ACPI_PARSER IortNodeItsParser[] = {\r
+STATIC CONST ACPI_PARSER  IortNodeItsParser[] = {\r
   PARSE_IORT_NODE_HEADER (\r
     ValidateItsIdMappingCount,\r
     ValidateItsIdArrayReference\r
     ),\r
-  {L"Number of ITSs", 4, 16, L"%d", NULL, (VOID**)&ItsCount, NULL}\r
+  { L"Number of ITSs",        4,16, L"%d", NULL, (VOID **)&ItsCount, NULL }\r
 };\r
 \r
 /**\r
   An ACPI_PARSER array describing the ITS ID.\r
 **/\r
-STATIC CONST ACPI_PARSER ItsIdParser[] = {\r
+STATIC CONST ACPI_PARSER  ItsIdParser[] = {\r
   { L"GIC ITS Identifier", 4, 0, L"%d", NULL, NULL, NULL }\r
 };\r
 \r
 /**\r
   An ACPI_PARSER array describing the IORT Names Component node.\r
 **/\r
-STATIC CONST ACPI_PARSER IortNodeNamedComponentParser[] = {\r
+STATIC CONST ACPI_PARSER  IortNodeNamedComponentParser[] = {\r
   PARSE_IORT_NODE_HEADER (NULL, NULL),\r
-  {L"Node Flags", 4, 16, L"%d", NULL, NULL, NULL, NULL},\r
-  {L"Memory access properties", 8, 20, L"0x%lx", NULL, NULL, NULL, NULL},\r
-  {L"Device memory address size limit", 1, 28, L"%d", NULL, NULL, NULL, NULL}\r
+  { L"Node Flags",              4,    16,  L"%d",    NULL, NULL, NULL, NULL },\r
+  { L"Memory access properties",8,    20,  L"0x%lx", NULL, NULL, NULL, NULL },\r
+  { L"Device memory address size limit",1,    28,  L"%d",    NULL, NULL, NULL, NULL }\r
 };\r
 \r
 /**\r
   An ACPI_PARSER array describing the IORT Root Complex node.\r
 **/\r
-STATIC CONST ACPI_PARSER IortNodeRootComplexParser[] = {\r
+STATIC CONST ACPI_PARSER  IortNodeRootComplexParser[] = {\r
   PARSE_IORT_NODE_HEADER (NULL, NULL),\r
-  {L"Memory access properties", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL},\r
-  {L"ATS Attribute", 4, 24, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"PCI Segment number", 4, 28, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Memory access size limit", 1, 32, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Reserved", 3, 33, L"%x %x %x", Dump3Chars, NULL, NULL, NULL}\r
+  { L"Memory access properties",8,    16,  L"0x%lx",    NULL,       NULL, NULL, NULL },\r
+  { L"ATS Attribute",           4,    24,  L"0x%x",     NULL,       NULL, NULL, NULL },\r
+  { L"PCI Segment number",      4,    28,  L"0x%x",     NULL,       NULL, NULL, NULL },\r
+  { L"Memory access size limit",1,    32,  L"0x%x",     NULL,       NULL, NULL, NULL },\r
+  { L"Reserved",                3,    33,  L"%x %x %x", Dump3Chars, NULL, NULL, NULL }\r
 };\r
 \r
 /**\r
   An ACPI_PARSER array describing the IORT PMCG node.\r
 **/\r
-STATIC CONST ACPI_PARSER IortNodePmcgParser[] = {\r
+STATIC CONST ACPI_PARSER  IortNodePmcgParser[] = {\r
   PARSE_IORT_NODE_HEADER (ValidatePmcgIdMappingCount, NULL),\r
-  {L"Page 0 Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL},\r
-  {L"Overflow interrupt GSIV", 4, 24, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Node reference", 4, 28, L"0x%x", NULL, NULL, NULL, NULL},\r
-  {L"Page 1 Base Address", 8, 32, L"0x%lx", NULL, NULL, NULL, NULL}\r
+  { L"Page 0 Base Address",                           8,    16,  L"0x%lx", NULL, NULL, NULL, NULL },\r
+  { L"Overflow interrupt GSIV",                       4,    24,  L"0x%x",  NULL, NULL, NULL, NULL },\r
+  { L"Node reference",                                4,    28,  L"0x%x",  NULL, NULL, NULL, NULL },\r
+  { L"Page 1 Base Address",                           8,    32,  L"0x%lx", NULL, NULL, NULL, NULL }\r
 };\r
 \r
 /**\r
@@ -260,20 +260,21 @@ STATIC CONST ACPI_PARSER IortNodePmcgParser[] = {
 STATIC\r
 VOID\r
 DumpIortNodeIdMappings (\r
-  IN UINT8Ptr,\r
-  IN UINT32 Length,\r
-  IN UINT32 MappingCount\r
+  IN UINT8   *Ptr,\r
+  IN UINT32  Length,\r
+  IN UINT32  MappingCount\r
   )\r
 {\r
-  UINT32 Index;\r
-  UINT32 Offset;\r
-  CHAR8  Buffer[40];  // Used for AsciiName param of ParseAcpi\r
+  UINT32  Index;\r
+  UINT32  Offset;\r
+  CHAR8   Buffer[40]; // Used for AsciiName param of ParseAcpi\r
 \r
-  Index = 0;\r
+  Index  = 0;\r
   Offset = 0;\r
 \r
   while ((Index < MappingCount) &&\r
-         (Offset < Length)) {\r
+         (Offset < Length))\r
+  {\r
     AsciiSPrint (\r
       Buffer,\r
       sizeof (Buffer),\r
@@ -304,15 +305,15 @@ DumpIortNodeIdMappings (
 STATIC\r
 VOID\r
 DumpIortNodeSmmuV1V2 (\r
-  IN UINT8Ptr,\r
-  IN UINT16 Length,\r
-  IN UINT32 MappingCount,\r
-  IN UINT32 MappingOffset\r
+  IN UINT8   *Ptr,\r
+  IN UINT16  Length,\r
+  IN UINT32  MappingCount,\r
+  IN UINT32  MappingOffset\r
   )\r
 {\r
-  UINT32 Index;\r
-  UINT32 Offset;\r
-  CHAR8  Buffer[50];  // Used for AsciiName param of ParseAcpi\r
+  UINT32  Index;\r
+  UINT32  Offset;\r
+  CHAR8   Buffer[50]; // Used for AsciiName param of ParseAcpi\r
 \r
   ParseAcpi (\r
     TRUE,\r
@@ -328,7 +329,8 @@ DumpIortNodeSmmuV1V2 (
   if ((InterruptContextCount == NULL)   ||\r
       (InterruptContextOffset == NULL)  ||\r
       (PmuInterruptCount == NULL)       ||\r
-      (PmuInterruptOffset == NULL)) {\r
+      (PmuInterruptOffset == NULL))\r
+  {\r
     IncrementErrorCount ();\r
     Print (\r
       L"ERROR: Insufficient SMMUv1/2 node length. Length = %d\n",\r
@@ -338,10 +340,11 @@ DumpIortNodeSmmuV1V2 (
   }\r
 \r
   Offset = *InterruptContextOffset;\r
-  Index = 0;\r
+  Index  = 0;\r
 \r
   while ((Index < *InterruptContextCount) &&\r
-         (Offset < Length)) {\r
+         (Offset < Length))\r
+  {\r
     AsciiSPrint (\r
       Buffer,\r
       sizeof (Buffer),\r
@@ -360,10 +363,11 @@ DumpIortNodeSmmuV1V2 (
   }\r
 \r
   Offset = *PmuInterruptOffset;\r
-  Index = 0;\r
+  Index  = 0;\r
 \r
   while ((Index < *PmuInterruptCount) &&\r
-         (Offset < Length)) {\r
+         (Offset < Length))\r
+  {\r
     AsciiSPrint (\r
       Buffer,\r
       sizeof (Buffer),\r
@@ -400,10 +404,10 @@ DumpIortNodeSmmuV1V2 (
 STATIC\r
 VOID\r
 DumpIortNodeSmmuV3 (\r
-  IN UINT8Ptr,\r
-  IN UINT16 Length,\r
-  IN UINT32 MappingCount,\r
-  IN UINT32 MappingOffset\r
+  IN UINT8   *Ptr,\r
+  IN UINT16  Length,\r
+  IN UINT32  MappingCount,\r
+  IN UINT32  MappingOffset\r
   )\r
 {\r
   ParseAcpi (\r
@@ -431,22 +435,22 @@ DumpIortNodeSmmuV3 (
 STATIC\r
 VOID\r
 DumpIortNodeIts (\r
-  IN UINT8Ptr,\r
-  IN UINT16 Length\r
+  IN UINT8   *Ptr,\r
+  IN UINT16  Length\r
   )\r
 {\r
-  UINT32 Offset;\r
-  UINT32 Index;\r
-  CHAR8  Buffer[80];  // Used for AsciiName param of ParseAcpi\r
+  UINT32  Offset;\r
+  UINT32  Index;\r
+  CHAR8   Buffer[80]; // Used for AsciiName param of ParseAcpi\r
 \r
   Offset = ParseAcpi (\r
-            TRUE,\r
-            2,\r
-            "ITS Node",\r
-            Ptr,\r
-            Length,\r
-            PARSER_PARAMS (IortNodeItsParser)\r
-            );\r
+             TRUE,\r
+             2,\r
+             "ITS Node",\r
+             Ptr,\r
+             Length,\r
+             PARSER_PARAMS (IortNodeItsParser)\r
+             );\r
 \r
   // Check if the values used to control the parsing logic have been\r
   // successfully read.\r
@@ -462,7 +466,8 @@ DumpIortNodeIts (
   Index = 0;\r
 \r
   while ((Index < *ItsCount) &&\r
-         (Offset < Length)) {\r
+         (Offset < Length))\r
+  {\r
     AsciiSPrint (\r
       Buffer,\r
       sizeof (Buffer),\r
@@ -481,7 +486,6 @@ DumpIortNodeIts (
   }\r
 \r
   // Note: ITS does not have the ID Mappings Array\r
-\r
 }\r
 \r
 /**\r
@@ -496,13 +500,13 @@ DumpIortNodeIts (
 STATIC\r
 VOID\r
 DumpIortNodeNamedComponent (\r
-  IN UINT8Ptr,\r
-  IN UINT16 Length,\r
-  IN UINT32 MappingCount,\r
-  IN UINT32 MappingOffset\r
+  IN UINT8   *Ptr,\r
+  IN UINT16  Length,\r
+  IN UINT32  MappingCount,\r
+  IN UINT32  MappingOffset\r
   )\r
 {\r
-  UINT32 Offset;\r
+  UINT32  Offset;\r
 \r
   Offset = ParseAcpi (\r
              TRUE,\r
@@ -517,10 +521,12 @@ DumpIortNodeNamedComponent (
   PrintFieldName (2, L"Device Object Name");\r
 \r
   while ((*(Ptr + Offset) != 0) &&\r
-         (Offset < Length)) {\r
+         (Offset < Length))\r
+  {\r
     Print (L"%c", *(Ptr + Offset));\r
     Offset++;\r
   }\r
+\r
   Print (L"\n");\r
 \r
   DumpIortNodeIdMappings (\r
@@ -542,10 +548,10 @@ DumpIortNodeNamedComponent (
 STATIC\r
 VOID\r
 DumpIortNodeRootComplex (\r
-  IN UINT8Ptr,\r
-  IN UINT16 Length,\r
-  IN UINT32 MappingCount,\r
-  IN UINT32 MappingOffset\r
+  IN UINT8   *Ptr,\r
+  IN UINT16  Length,\r
+  IN UINT32  MappingCount,\r
+  IN UINT32  MappingOffset\r
   )\r
 {\r
   ParseAcpi (\r
@@ -576,11 +582,11 @@ DumpIortNodeRootComplex (
 STATIC\r
 VOID\r
 DumpIortNodePmcg (\r
-  IN UINT8Ptr,\r
-  IN UINT16 Length,\r
-  IN UINT32 MappingCount,\r
-  IN UINT32 MappingOffset\r
-)\r
+  IN UINT8   *Ptr,\r
+  IN UINT16  Length,\r
+  IN UINT32  MappingCount,\r
+  IN UINT32  MappingOffset\r
+  )\r
 {\r
   ParseAcpi (\r
     TRUE,\r
@@ -620,15 +626,15 @@ DumpIortNodePmcg (
 VOID\r
 EFIAPI\r
 ParseAcpiIort (\r
-  IN BOOLEAN Trace,\r
-  IN UINT8*  Ptr,\r
-  IN UINT32  AcpiTableLength,\r
-  IN UINT8   AcpiTableRevision\r
+  IN BOOLEAN  Trace,\r
+  IN UINT8    *Ptr,\r
+  IN UINT32   AcpiTableLength,\r
+  IN UINT8    AcpiTableRevision\r
   )\r
 {\r
-  UINT32 Offset;\r
-  UINT32 Index;\r
-  UINT8NodePtr;\r
+  UINT32  Offset;\r
+  UINT32  Index;\r
+  UINT8   *NodePtr;\r
 \r
   if (!Trace) {\r
     return;\r
@@ -646,7 +652,8 @@ ParseAcpiIort (
   // Check if the values used to control the parsing logic have been\r
   // successfully read.\r
   if ((IortNodeCount == NULL) ||\r
-      (IortNodeOffset == NULL)) {\r
+      (IortNodeOffset == NULL))\r
+  {\r
     IncrementErrorCount ();\r
     Print (\r
       L"ERROR: Insufficient table length. AcpiTableLength = %d.\n",\r
@@ -655,14 +662,15 @@ ParseAcpiIort (
     return;\r
   }\r
 \r
-  Offset = *IortNodeOffset;\r
+  Offset  = *IortNodeOffset;\r
   NodePtr = Ptr + Offset;\r
-  Index = 0;\r
+  Index   = 0;\r
 \r
   // Parse the specified number of IORT nodes or the IORT table buffer length.\r
   // Whichever is minimum.\r
   while ((Index++ < *IortNodeCount) &&\r
-         (Offset < AcpiTableLength)) {\r
+         (Offset < AcpiTableLength))\r
+  {\r
     // Parse the IORT Node Header\r
     ParseAcpi (\r
       FALSE,\r
@@ -678,11 +686,12 @@ ParseAcpiIort (
     if ((IortNodeType == NULL)        ||\r
         (IortNodeLength == NULL)      ||\r
         (IortIdMappingCount == NULL)  ||\r
-        (IortIdMappingOffset == NULL)) {\r
+        (IortIdMappingOffset == NULL))\r
+    {\r
       IncrementErrorCount ();\r
       Print (\r
         L"ERROR: Insufficient remaining table buffer length to read the " \\r
-          L"IORT node header. Length = %d.\n",\r
+        L"IORT node header. Length = %d.\n",\r
         AcpiTableLength - Offset\r
         );\r
       return;\r
@@ -690,11 +699,12 @@ ParseAcpiIort (
 \r
     // Validate IORT Node length\r
     if ((*IortNodeLength == 0) ||\r
-        ((Offset + (*IortNodeLength)) > AcpiTableLength)) {\r
+        ((Offset + (*IortNodeLength)) > AcpiTableLength))\r
+    {\r
       IncrementErrorCount ();\r
       Print (\r
         L"ERROR: Invalid IORT Node length. " \\r
-          L"Length = %d. Offset = %d. AcpiTableLength = %d.\n",\r
+        L"Length = %d. Offset = %d. AcpiTableLength = %d.\n",\r
         *IortNodeLength,\r
         Offset,\r
         AcpiTableLength\r
@@ -750,7 +760,7 @@ ParseAcpiIort (
           *IortNodeLength,\r
           *IortIdMappingCount,\r
           *IortIdMappingOffset\r
-        );\r
+          );\r
         break;\r
 \r
       default:\r
@@ -759,6 +769,6 @@ ParseAcpiIort (
     } // switch\r
 \r
     NodePtr += (*IortNodeLength);\r
-    Offset += (*IortNodeLength);\r
+    Offset  += (*IortNodeLength);\r
   } // while\r
 }\r