-/**\r
+/** @file\r
MADT table parser\r
\r
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
STATIC CONST UINT8* MadtInterruptControllerLength;\r
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
\r
-// Forward declarations\r
+/**\r
+ This function validates the System Vector Base in the GICD.\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
STATIC\r
VOID\r
EFIAPI\r
ValidateGICDSystemVectorBase (\r
IN UINT8* Ptr,\r
IN VOID* Context\r
-);\r
+ );\r
\r
-/** An ACPI_PARSER array describing the GICC Interrupt\r
- Controller Structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the GICC Interrupt Controller Structure.\r
+**/\r
STATIC CONST ACPI_PARSER GicCParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},\r
{L"Reserved", 3, 77, L"%x %x %x", Dump3Chars, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the GICD Interrupt\r
- Controller Structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the GICD Interrupt Controller Structure.\r
+**/\r
STATIC CONST ACPI_PARSER GicDParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},\r
{L"Reserved", 3, 21, L"%x %x %x", Dump3Chars, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the MSI Frame Interrupt\r
- Controller Structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the MSI Frame Interrupt Controller Structure.\r
+**/\r
STATIC CONST ACPI_PARSER GicMSIFrameParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},\r
{L"SPI Base", 2, 22, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the GICR Interrupt\r
- Controller Structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the GICR Interrupt Controller Structure.\r
+**/\r
STATIC CONST ACPI_PARSER GicRParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},\r
{L"Discovery Range Length", 4, 12, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the GIC ITS Interrupt\r
- Controller Structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the GIC ITS Interrupt Controller Structure.\r
+**/\r
STATIC CONST ACPI_PARSER GicITSParser[] = {\r
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},\r
{L"Reserved", 4, 16, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the ACPI MADT Table.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the ACPI MADT Table.\r
+**/\r
STATIC CONST ACPI_PARSER MadtParser[] = {\r
PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
{L"Local Interrupt Controller Address", 4, 36, L"0x%x", NULL, NULL, NULL,\r
{L"Flags", 4, 40, L"0x%x", NULL, NULL, NULL, NULL}\r
};\r
\r
-/** An ACPI_PARSER array describing the MADT Interrupt\r
- Controller Structure Header Structure.\r
-*/\r
+/**\r
+ An ACPI_PARSER array describing the MADT Interrupt Controller Structure Header Structure.\r
+**/\r
STATIC CONST ACPI_PARSER MadtInterruptControllerHeaderParser[] = {\r
{NULL, 1, 0, NULL, NULL, (VOID**)&MadtInterruptControllerType, NULL, NULL},\r
{L"Length", 1, 1, NULL, NULL, (VOID**)&MadtInterruptControllerLength, NULL,\r
{L"Reserved", 2, 2, NULL, NULL, NULL, NULL, NULL}\r
};\r
\r
-/** This function validates the System Vector Base in the GICD.\r
+/**\r
+ This function validates the System Vector Base in the GICD.\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 ACPI MADT table.\r
+/**\r
+ This function parses the ACPI MADT table.\r
When trace is enabled this function parses the MADT table and\r
traces the ACPI table fields.\r
\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
ParseAcpiMadt (\r
{\r
UINT32 Offset;\r
UINT8* InterruptContollerPtr;\r
- UINT32 GICDCount = 0;\r
+ UINT32 GICDCount;\r
+\r
+ GICDCount = 0;\r
\r
if (!Trace) {\r
return;\r
IncrementErrorCount ();\r
Print (\r
L"ERROR: Invalid Interrupt Controller Length,"\r
- " Type = %d, Length = %d\n",\r
+ L" Type = %d, Length = %d\n",\r
*MadtInterruptControllerType,\r
*MadtInterruptControllerLength\r
);\r
IncrementErrorCount ();\r
Print (\r
L"ERROR: Only one GICD must be present,"\r
- " GICDCount = %d\n",\r
+ L" GICDCount = %d\n",\r
GICDCount\r
);\r
}\r
IncrementErrorCount ();\r
Print (\r
L"ERROR: Unknown Interrupt Controller Structure,"\r
- " Type = %d, Length = %d\n",\r
+ L" Type = %d, Length = %d\n",\r
*MadtInterruptControllerType,\r
*MadtInterruptControllerLength\r
);\r