-/**\r
+/** @file\r
IORT table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
// Local variables\r
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
\r
-/** The EIORT_NODE enum describes the IORT Node types.\r
-*/\r
+/**\r
+ The EIORT_NODE enum describes the IORT Node types.\r
+**/\r
typedef enum IortNode {\r
EIORT_NODE_ITS_GROUP, ///< ITS Group node\r
EIORT_NODE_NAMED_COMPONENT, ///< Named Component node\r
\r
STATIC CONST UINT32* ItsCount;\r
\r
-/** This function validates the ID Mapping array count for the ITS node.\r
+/**\r
+ This function validates the ID Mapping array count for the ITS node.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
IN VOID* Context\r
);\r
\r
-/** This function validates the ID Mapping array offset for the ITS node.\r
+/**\r
+ This function validates the ID Mapping array offset for the ITS node.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
IN VOID* Context\r
);\r
\r
-/** Helper Macro for populating the IORT Node header in the ACPI_PARSER\r
- array.\r
+/**\r
+ Helper Macro for populating the IORT Node header in the ACPI_PARSER array.\r
\r
@param [out] ValidateIdMappingCount Optional pointer to a function for\r
validating the ID Mapping count.\r
@param [out] ValidateIdArrayReference Optional pointer to a function for\r
validating the ID Array reference.\r
-*/\r
+**/\r
#define PARSE_IORT_NODE_HEADER(ValidateIdMappingCount, \\r
ValidateIdArrayReference) \\r
{ L"Type", 1, 0, L"%d", NULL, (VOID**)&IortNodeType, NULL, NULL }, \\r
{ L"Reference to ID Array", 4, 12, L"0x%x", NULL, \\r
(VOID**)&IortIdMappingOffset, ValidateIdArrayReference, NULL }\r
\r
-/** An ACPI_PARSER array describing the ACPI IORT Table\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the ACPI IORT Table\r
+**/\r
STATIC CONST ACPI_PARSER IortParser[] = {\r
PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
{L"Number of IORT Nodes", 4, 36, L"%d", NULL,\r
{L"Reserved", 4, 44, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT node header structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the IORT node header structure.\r
+**/\r
STATIC CONST ACPI_PARSER IortNodeHeaderParser[] = {\r
PARSE_IORT_NODE_HEADER (NULL, NULL)\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT SMMUv1/2 node.\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"SMMU_NSgCfgIrpt interrupt flags", 4, 72, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the SMMUv1/2 Node Interrupt Array.\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
};\r
\r
-/** An ACPI_PARSER array describing the IORT ID Mapping.\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" Flags", 4, 16, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT SMMUv3 node.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the IORT SMMUv3 node.\r
+**/\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"Sync", 4, 56, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT ITS node.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the IORT ITS node.\r
+**/\r
STATIC CONST ACPI_PARSER IortNodeItsParser[] = {\r
PARSE_IORT_NODE_HEADER (\r
ValidateItsIdMappingCount,\r
{L" Number of ITSs", 4, 16, L"%d", NULL, (VOID**)&ItsCount, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the ITS ID.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the ITS ID.\r
+**/\r
STATIC CONST ACPI_PARSER ItsIdParser[] = {\r
{ L" GIC ITS Identifier", 4, 0, L"%d", NULL, NULL, NULL }\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT Names Component node.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the IORT Names Component node.\r
+**/\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"Device memory address size limit", 1, 28, L"%d", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT Root Complex node.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the IORT Root Complex node.\r
+**/\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"PCI Segment number", 4, 28, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the IORT PMCG node.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the IORT PMCG node.\r
+**/\r
STATIC CONST ACPI_PARSER IortNodePmcgParser[] = {\r
PARSE_IORT_NODE_HEADER (NULL, NULL),\r
{L"Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL},\r
{L"Node reference", 4, 28, L"0x%x", NULL, NULL, NULL, NULL},\r
};\r
\r
-/** This function validates the ID Mapping array count for the ITS node.\r
+/**\r
+ This function validates the ID Mapping array count for the ITS node.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
ValidateItsIdMappingCount (\r
IN UINT8* Ptr,\r
- VOID* Context\r
+ IN VOID* Context\r
)\r
{\r
if (*(UINT32*)Ptr != 0) {\r
}\r
}\r
\r
-/** This function validates the ID Mapping array offset for the ITS node.\r
+/**\r
+ This function validates the ID Mapping array offset for the ITS node.\r
\r
@param [in] Ptr Pointer to the start of the field data.\r
@param [in] Context Pointer to context specific information e.g. this\r
could be a pointer to the ACPI table header.\r
-*/\r
+**/\r
STATIC\r
VOID\r
EFIAPI\r
}\r
}\r
\r
-/** This function parses the IORT Node Id Mapping array.\r
+/**\r
+ This function parses the IORT Node Id Mapping array.\r
\r
@param [in] Ptr Pointer to the start of the IORT Table.\r
@param [in] MappingCount The ID Mapping count.\r
@param [in] MappingOffset The offset of the ID Mapping array\r
from the start of the IORT table.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpIortNodeIdMappings (\r
}\r
}\r
\r
-/** This function parses the IORT SMMUv1/2 node.\r
+/**\r
+ This function parses the IORT SMMUv1/2 node.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Length Length of the buffer.\r
@param [in] MappingCount The ID Mapping count.\r
@param [in] MappingOffset The offset of the ID Mapping array\r
from the start of the IORT table.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpIortNodeSmmuV1V2 (\r
}\r
}\r
\r
-/** This function parses the IORT SMMUv3 node.\r
+/**\r
+ This function parses the IORT SMMUv3 node.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Length Length of the buffer.\r
@param [in] MappingCount The ID Mapping count.\r
@param [in] MappingOffset The offset of the ID Mapping array\r
from the start of the IORT table.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpIortNodeSmmuV3 (\r
}\r
}\r
\r
-/** This function parses the IORT ITS node.\r
+/**\r
+ This function parses the IORT ITS node.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Length Length of the buffer.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpIortNodeIts (\r
// Note: ITS does not have the ID Mappings Array\r
}\r
\r
-/** This function parses the IORT Named Component node.\r
+/**\r
+ This function parses the IORT Named Component node.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Length Length of the buffer.\r
@param [in] MappingCount The ID Mapping count.\r
@param [in] MappingOffset The offset of the ID Mapping array\r
from the start of the IORT table.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpIortNodeNamedComponent (\r
}\r
}\r
\r
-/** This function parses the IORT Root Complex node.\r
+/**\r
+ This function parses the IORT Root Complex node.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Length Length of the buffer.\r
@param [in] MappingCount The ID Mapping count.\r
@param [in] MappingOffset The offset of the ID Mapping array\r
from the start of the IORT table.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpIortNodeRootComplex (\r
}\r
}\r
\r
-/** This function parses the IORT PMCG node.\r
+/**\r
+ This function parses the IORT PMCG node.\r
\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] Length Length of the buffer.\r
@param [in] MappingCount The ID Mapping count.\r
@param [in] MappingOffset The offset of the ID Mapping array\r
from the start of the IORT table.\r
-*/\r
+**/\r
STATIC\r
VOID\r
DumpIortNodePmcg (\r
}\r
}\r
\r
-/** This function parses the ACPI IORT table.\r
- When trace is enabled this function parses the IORT table and\r
- traces the ACPI fields.\r
+/**\r
+ This function parses the ACPI IORT table.\r
+ When trace is enabled this function parses the IORT table and traces the ACPI fields.\r
\r
This function also parses the following nodes:\r
- ITS Group\r
@param [in] Ptr Pointer to the start of the buffer.\r
@param [in] AcpiTableLength Length of the ACPI table.\r
@param [in] AcpiTableRevision Revision of the ACPI table.\r
-*/\r
+**/\r
VOID\r
EFIAPI\r
ParseAcpiIort (\r