#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 UINT32* IortNodeCount;\r
-STATIC CONST UINT32* IortNodeOffset;\r
+STATIC CONST UINT32 *IortNodeCount;\r
+STATIC CONST UINT32 *IortNodeOffset;\r
\r
-STATIC CONST UINT8* IortNodeType;\r
-STATIC CONST UINT16* IortNodeLength;\r
-STATIC CONST UINT32* IortIdMappingCount;\r
-STATIC CONST UINT32* IortIdMappingOffset;\r
+STATIC CONST UINT8 *IortNodeType;\r
+STATIC CONST UINT16 *IortNodeLength;\r
+STATIC CONST UINT32 *IortIdMappingCount;\r
+STATIC CONST UINT32 *IortIdMappingOffset;\r
\r
-STATIC CONST UINT32* InterruptContextCount;\r
-STATIC CONST UINT32* InterruptContextOffset;\r
-STATIC CONST UINT32* PmuInterruptCount;\r
-STATIC CONST UINT32* PmuInterruptOffset;\r
+STATIC CONST UINT32 *InterruptContextCount;\r
+STATIC CONST UINT32 *InterruptContextOffset;\r
+STATIC CONST UINT32 *PmuInterruptCount;\r
+STATIC CONST UINT32 *PmuInterruptOffset;\r
\r
-STATIC CONST UINT32* ItsCount;\r
+STATIC CONST UINT32 *ItsCount;\r
\r
/**\r
This function validates the ID Mapping array count for the ITS node.\r
VOID\r
EFIAPI\r
ValidateItsIdMappingCount (\r
- IN UINT8* Ptr,\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
VOID\r
EFIAPI\r
ValidatePmcgIdMappingCount (\r
- IN UINT8* Ptr,\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
VOID\r
EFIAPI\r
ValidateItsIdArrayReference (\r
- IN UINT8* Ptr,\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
/**\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
STATIC\r
VOID\r
DumpIortNodeIdMappings (\r
- IN UINT8* Ptr,\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
STATIC\r
VOID\r
DumpIortNodeSmmuV1V2 (\r
- IN UINT8* Ptr,\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
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
}\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
}\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
STATIC\r
VOID\r
DumpIortNodeSmmuV3 (\r
- IN UINT8* Ptr,\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
STATIC\r
VOID\r
DumpIortNodeIts (\r
- IN UINT8* Ptr,\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
Index = 0;\r
\r
while ((Index < *ItsCount) &&\r
- (Offset < Length)) {\r
+ (Offset < Length))\r
+ {\r
AsciiSPrint (\r
Buffer,\r
sizeof (Buffer),\r
}\r
\r
// Note: ITS does not have the ID Mappings Array\r
-\r
}\r
\r
/**\r
STATIC\r
VOID\r
DumpIortNodeNamedComponent (\r
- IN UINT8* Ptr,\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
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
STATIC\r
VOID\r
DumpIortNodeRootComplex (\r
- IN UINT8* Ptr,\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
STATIC\r
VOID\r
DumpIortNodePmcg (\r
- IN UINT8* Ptr,\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
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
- UINT8* NodePtr;\r
+ UINT32 Offset;\r
+ UINT32 Index;\r
+ UINT8 *NodePtr;\r
\r
if (!Trace) {\r
return;\r
// 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
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
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
\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
*IortNodeLength,\r
*IortIdMappingCount,\r
*IortIdMappingOffset\r
- );\r
+ );\r
break;\r
\r
default:\r
} // switch\r
\r
NodePtr += (*IortNodeLength);\r
- Offset += (*IortNodeLength);\r
+ Offset += (*IortNodeLength);\r
} // while\r
}\r