--- /dev/null
+/**\r
+ Header file for ACPI parser\r
+\r
+ Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
+ This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+**/\r
+\r
+#ifndef ACPIPARSER_H_\r
+#define ACPIPARSER_H_\r
+\r
+#define OUTPUT_FIELD_COLUMN_WIDTH 36\r
+\r
+/// The RSDP table signature is "RSD PTR " (8 bytes)\r
+/// However The signature for ACPI tables is 4 bytes.\r
+/// To work around this oddity define a signature type\r
+/// that allows us to process the log options.\r
+#define RSDP_TABLE_INFO SIGNATURE_32('R', 'S', 'D', 'P')\r
+\r
+/** This function increments the ACPI table error counter.\r
+*/\r
+VOID\r
+EFIAPI\r
+IncrementErrorCount (\r
+ VOID\r
+ );\r
+\r
+/** This function increments the ACPI table warning counter.\r
+*/\r
+VOID\r
+EFIAPI\r
+IncrementWarningCount (\r
+ VOID\r
+ );\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
+\r
+ @param [in] Log If TRUE log the status of the checksum.\r
+ @param [in] Ptr Pointer to the start of the table buffer.\r
+ @param [in] Length The length of the buffer.\r
+\r
+ @retval TRUE The checksum is OK.\r
+ @retval FALSE The checksum failed.\r
+*/\r
+BOOLEAN\r
+EFIAPI\r
+VerifyChecksum (\r
+ IN BOOLEAN Log,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 Length\r
+ );\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
+VOID\r
+EFIAPI\r
+DumpRaw (\r
+ IN UINT8* Ptr,\r
+ IN UINT32 Length\r
+ );\r
+\r
+/** This function traces 1 byte of datum as specified in the\r
+ 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
+VOID\r
+EFIAPI\r
+DumpUint8 (\r
+ IN CONST CHAR16* Format,\r
+ IN UINT8* Ptr\r
+ );\r
+\r
+/** This function traces 2 bytes of data as specified in the\r
+ 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
+VOID\r
+EFIAPI\r
+DumpUint16 (\r
+ IN CONST CHAR16* Format,\r
+ IN UINT8* Ptr\r
+ );\r
+\r
+/** This function traces 4 bytes of data as specified in the\r
+ 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
+VOID\r
+EFIAPI\r
+DumpUint32 (\r
+ IN CONST CHAR16* Format,\r
+ IN UINT8* Ptr\r
+ );\r
+\r
+/** This function traces 8 bytes of data as specified by the\r
+ 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
+VOID\r
+EFIAPI\r
+DumpUint64 (\r
+ IN CONST CHAR16* Format,\r
+ IN UINT8* Ptr\r
+ );\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
+VOID\r
+EFIAPI\r
+Dump3Chars (\r
+ IN CONST CHAR16* Format OPTIONAL,\r
+ IN UINT8* Ptr\r
+ );\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
+VOID\r
+EFIAPI\r
+Dump4Chars (\r
+ IN CONST CHAR16* Format OPTIONAL,\r
+ IN UINT8* Ptr\r
+ );\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
+VOID\r
+EFIAPI\r
+Dump6Chars (\r
+ IN CONST CHAR16* Format OPTIONAL,\r
+ IN UINT8* Ptr\r
+ );\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
+VOID\r
+EFIAPI\r
+Dump8Chars (\r
+ IN CONST CHAR16* Format OPTIONAL,\r
+ IN UINT8* Ptr\r
+ );\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\r
+ indent. The global table indent is 0 by default;\r
+ however this value is updated on entry to the\r
+ ParseAcpi() by adding the indent value provided to\r
+ ParseAcpi() and restored back on exit. Therefore\r
+ the total indent in the output is dependent on from\r
+ where this function is called.\r
+ @param [in] FieldName Pointer to the Field Name.\r
+*/\r
+VOID\r
+EFIAPI\r
+PrintFieldName (\r
+ IN UINT32 Indent,\r
+ IN CONST CHAR16* FieldName\r
+);\r
+\r
+/** This function pointer is the template for customizing the trace output\r
+\r
+ @param [in] Format Format string for tracing the data as specified by\r
+ the 'Format' member of ACPI_PARSER.\r
+ @param [in] Ptr Pointer to the start of the buffer.\r
+*/\r
+typedef VOID (EFIAPI *FNPTR_PRINT_FORMATTER)(CONST CHAR16* Format, UINT8* Ptr);\r
+\r
+/** This function pointer is the template for validating an ACPI table field.\r
+\r
+ @param [in] Ptr Pointer to the start of the field data.\r
+ @param [in] Context Pointer to context specific information as specified by\r
+ the 'Context' member of the ACPI_PARSER.\r
+ e.g. this could be a pointer to the ACPI table header.\r
+*/\r
+typedef VOID (EFIAPI *FNPTR_FIELD_VALIDATOR)(UINT8* Ptr, VOID* Context);\r
+\r
+/** The ACPI_PARSER structure describes the fields of an ACPI table and\r
+ provides means for the parser to interpret and trace appropriately.\r
+\r
+ The first three members are populated based on information present in\r
+ in the ACPI table specifications. The remaining members describe how\r
+ the parser should report the field information, validate the field data\r
+ and/or update an external pointer to the field (ItemPtr).\r
+\r
+ ParseAcpi() uses the format string specified by 'Format' for tracing\r
+ the field data. If the field is more complex and requires additional\r
+ processing for formatting and representation a print formatter function\r
+ can be specified in 'PrintFormatter'.\r
+ The PrintFormatter function may choose to use the format string\r
+ specified by 'Format' or use its own internal format string.\r
+\r
+ The 'Format' and 'PrintFormatter' members allow flexibility for\r
+ representing the field data.\r
+*/\r
+typedef struct AcpiParser {\r
+\r
+ /// String describing the ACPI table field\r
+ /// (Field column from ACPI table spec)\r
+ CONST CHAR16* NameStr;\r
+\r
+ /// The length of the field.\r
+ /// (Byte Length column from ACPI table spec)\r
+ UINT32 Length;\r
+\r
+ /// The offset of the field from the start of the table.\r
+ /// (Byte Offset column from ACPI table spec)\r
+ UINT32 Offset;\r
+\r
+ /// Optional Print() style format string for tracing the data. If not\r
+ /// used this must be set to NULL.\r
+ CONST CHAR16* Format;\r
+\r
+ /// Optional pointer to a print formatter function which\r
+ /// is typically used to trace complex field information.\r
+ /// If not used this must be set to NULL.\r
+ /// The Format string is passed to the PrintFormatter function\r
+ /// but may be ignored by the implementation code.\r
+ FNPTR_PRINT_FORMATTER PrintFormatter;\r
+\r
+ /// Optional pointer which may be set to request the parser to update\r
+ /// a pointer to the field data. If unused this must be set to NULL.\r
+ VOID** ItemPtr;\r
+\r
+ /// Optional pointer to a field validator function.\r
+ /// The function should directly report any appropriate error or warning\r
+ /// and invoke the appropriate counter update function.\r
+ /// If not used this parameter must be set to NULL.\r
+ FNPTR_FIELD_VALIDATOR FieldValidator;\r
+\r
+ /// Optional pointer to context specific information,\r
+ /// which the Field Validator function can use to determine\r
+ /// additional information about the ACPI table and make\r
+ /// decisions about the field being validated.\r
+ /// e.g. this could be a pointer to the ACPI table header\r
+ VOID* Context;\r
+} ACPI_PARSER;\r
+\r
+/** A structure used to store the pointers to the members of the\r
+ ACPI description header structure that was parsed.\r
+*/\r
+typedef struct AcpiDescriptionHeaderInfo {\r
+ /// ACPI table signature\r
+ UINT32* Signature;\r
+ /// Length of the ACPI table\r
+ UINT32* Length;\r
+ /// Revision\r
+ UINT8* Revision;\r
+ /// Checksum\r
+ UINT8* Checksum;\r
+ /// OEM Id - length is 6 bytes\r
+ UINT8* OemId;\r
+ /// OEM table Id\r
+ UINT64* OemTableId;\r
+ /// OEM revision Id\r
+ UINT32* OemRevision;\r
+ /// Creator Id\r
+ UINT32* CreatorId;\r
+ /// Creator revision\r
+ UINT32* CreatorRevision;\r
+} ACPI_DESCRIPTION_HEADER_INFO;\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
+ function iterates through each item on the ACPI_PARSER array and logs the\r
+ ACPI table fields.\r
+\r
+ This function can optionally be used to parse ACPI tables and fetch specific\r
+ field values. The ItemPtr member of the ACPI_PARSER structure (where used)\r
+ is updated by this parser function to point to the selected field data\r
+ (e.g. useful for variable length nested fields).\r
+\r
+ @param [in] Trace Trace the ACPI fields TRUE else only parse the\r
+ table.\r
+ @param [in] Indent Number of spaces to indent the output.\r
+ @param [in] AsciiName Optional pointer to an ASCII string that describes\r
+ the table being parsed.\r
+ @param [in] Ptr Pointer to the start of the buffer.\r
+ @param [in] Length Length of the buffer pointed by Ptr.\r
+ @param [in] Parser Pointer to an array of ACPI_PARSER structure that\r
+ describes the table being parsed.\r
+ @param [in] ParserItems Number of items in the ACPI_PARSER array.\r
+\r
+ @retval Number of bytes parsed.\r
+*/\r
+UINT32\r
+EFIAPI\r
+ParseAcpi (\r
+ IN BOOLEAN Trace,\r
+ IN UINT32 Indent,\r
+ IN CONST CHAR8* AsciiName OPTIONAL,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 Length,\r
+ IN CONST ACPI_PARSER* Parser,\r
+ IN UINT32 ParserItems\r
+);\r
+\r
+/** This is a helper macro to pass parameters to the Parser functions.\r
+\r
+ @param [in] Parser The name of the ACPI_PARSER array describing the\r
+ ACPI table fields.\r
+*/\r
+#define PARSER_PARAMS(Parser) Parser, sizeof (Parser) / sizeof (Parser[0])\r
+\r
+/** This is a helper macro for describing the ACPI header fields.\r
+\r
+ @param [out] Info Pointer to retrieve the ACPI table header information.\r
+*/\r
+#define PARSE_ACPI_HEADER(Info) \\r
+ { L"Signature", 4, 0, NULL, Dump4Chars, \\r
+ (VOID**)&(Info)->Signature , NULL, NULL }, \\r
+ { L"Length", 4, 4, L"%d", NULL, \\r
+ (VOID**)&(Info)->Length, NULL, NULL }, \\r
+ { L"Revision", 1, 8, L"%d", NULL, \\r
+ (VOID**)&(Info)->Revision, NULL, NULL }, \\r
+ { L"Checksum", 1, 9, L"0x%X", NULL, \\r
+ (VOID**)&(Info)->Checksum, NULL, NULL }, \\r
+ { L"Oem ID", 6, 10, NULL, Dump6Chars, \\r
+ (VOID**)&(Info)->OemId, NULL, NULL }, \\r
+ { L"Oem Table ID", 8, 16, NULL, Dump8Chars, \\r
+ (VOID**)&(Info)->OemTableId, NULL, NULL }, \\r
+ { L"Oem Revision", 4, 24, L"0x%X", NULL, \\r
+ (VOID**)&(Info)->OemRevision, NULL, NULL }, \\r
+ { L"Creator ID", 4, 28, NULL, Dump4Chars, \\r
+ (VOID**)&(Info)->CreatorId, NULL, NULL }, \\r
+ { L"Creator Revision", 4, 32, L"0x%X", NULL, \\r
+ (VOID**)&(Info)->CreatorRevision, NULL, NULL }\r
+\r
+/** Length of the ACPI GAS structure.\r
+\r
+ NOTE: This might normally be defined as\r
+ sizeof (EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE).\r
+ However, we deliberately minimise any reference to the EDK2 ACPI\r
+ headers in an attempt to provide cross checking.\r
+*/\r
+#define GAS_LENGTH 12\r
+\r
+/** Length of the ACPI Header structure.\r
+\r
+ NOTE: This might normally be defined as\r
+ sizeof (EFI_ACPI_DESCRIPTION_HEADER).\r
+ However, we deliberately minimise any reference to the EDK2 ACPI\r
+ headers in an attempt to provide cross checking.\r
+*/\r
+#define ACPI_DESCRIPTION_HEADER_LENGTH 36\r
+\r
+/** This function indents and traces the GAS structure as described\r
+ 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
+VOID\r
+EFIAPI\r
+DumpGasStruct (\r
+ IN UINT8* Ptr,\r
+ IN UINT32 Indent\r
+ );\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
+VOID\r
+EFIAPI\r
+DumpGas (\r
+ IN CONST CHAR16* Format OPTIONAL,\r
+ IN UINT8* Ptr\r
+ );\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
+UINT32\r
+EFIAPI\r
+DumpAcpiHeader (\r
+ IN UINT8* Ptr\r
+ );\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
+\r
+ @param [in] Ptr Pointer to the start of the buffer.\r
+ @param [out] Signature Gets location of the ACPI table signature.\r
+ @param [out] Length Gets location of the length of the ACPI table.\r
+ @param [out] Revision Gets location of the revision of the ACPI table.\r
+\r
+ @retval Number of bytes parsed.\r
+*/\r
+UINT32\r
+EFIAPI\r
+ParseAcpiHeader (\r
+ IN UINT8* Ptr,\r
+ OUT CONST UINT32** Signature,\r
+ OUT CONST UINT32** Length,\r
+ OUT CONST UINT8** Revision\r
+ );\r
+\r
+/** This function parses the ACPI BGRT table.\r
+ When trace is enabled this function parses the BGRT table and\r
+ traces the ACPI table fields.\r
+\r
+ This function also performs validation of the ACPI table fields.\r
+\r
+ @param [in] Trace If TRUE, trace the ACPI fields.\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
+VOID\r
+EFIAPI\r
+ParseAcpiBgrt (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
+ );\r
+\r
+/** This function parses the ACPI DBG2 table.\r
+ When trace is enabled this function parses the DBG2 table and\r
+ traces the ACPI table fields.\r
+\r
+ This function also performs validation of the ACPI table fields.\r
+\r
+ @param [in] Trace If TRUE, trace the ACPI fields.\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
+VOID\r
+EFIAPI\r
+ParseAcpiDbg2 (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
+ );\r
+\r
+/** This function parses the ACPI DSDT table.\r
+ When trace is enabled this function parses the DSDT table and\r
+ traces the ACPI table fields.\r
+ For the DSDT table only the ACPI header fields are parsed and\r
+ traced.\r
+\r
+ @param [in] Trace If TRUE, trace the ACPI fields.\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
+VOID\r
+EFIAPI\r
+ParseAcpiDsdt (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
+ );\r
+\r
+/** This function parses the ACPI FADT table.\r
+ This function parses the FADT table and optionally traces the ACPI\r
+ table fields.\r
+\r
+ This function also performs validation of the ACPI table fields.\r
+\r
+ @param [in] Trace If TRUE, trace the ACPI fields.\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
+VOID\r
+EFIAPI\r
+ParseAcpiFadt (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
+ );\r
+\r
+/** This function parses the ACPI GTDT table.\r
+ When trace is enabled this function parses the GTDT table and\r
+ traces the ACPI table fields.\r
+\r
+ This function also parses the following platform timer structures:\r
+ - GT Block timer\r
+ - Watchdog timer\r
+\r
+ This function also performs validation of the ACPI table fields.\r
+\r
+ @param [in] Trace If TRUE, trace the ACPI fields.\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
+VOID\r
+EFIAPI\r
+ParseAcpiGtdt (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\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 also parses the following nodes:\r
+ - ITS Group\r
+ - Named Component\r
+ - Root Complex\r
+ - SMMUv1/2\r
+ - SMMUv3\r
+ - PMCG\r
+\r
+ This function also performs validation of the ACPI table fields.\r
+\r
+ @param [in] Trace If TRUE, trace the ACPI fields.\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
+VOID\r
+EFIAPI\r
+ParseAcpiIort (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
+ );\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
+ This function currently parses the following Interrupt Controller\r
+ Structures:\r
+ - GICC\r
+ - GICD\r
+ - GIC MSI Frame\r
+ - GICR\r
+ - GIC ITS\r
+\r
+ This function also performs validation of the ACPI table fields.\r
+\r
+ @param [in] Trace If TRUE, trace the ACPI fields.\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
+VOID\r
+EFIAPI\r
+ParseAcpiMadt (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
+ );\r
+\r
+/** This function parses the ACPI MCFG table.\r
+ When trace is enabled this function parses the MCFG table and\r
+ traces the ACPI table fields.\r
+\r
+ This function also performs validation of the ACPI table fields.\r
+\r
+ @param [in] Trace If TRUE, trace the ACPI fields.\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
+VOID\r
+EFIAPI\r
+ParseAcpiMcfg (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
+ );\r
+\r
+/** This function parses the ACPI RSDP table.\r
+\r
+ This function invokes the parser for the XSDT table.\r
+ * Note - This function does not support parsing of RSDT table.\r
+\r
+ This function also performs a RAW dump of the ACPI table and\r
+ validates the checksum.\r
+\r
+ @param [in] Trace If TRUE, trace the ACPI fields.\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
+VOID\r
+EFIAPI\r
+ParseAcpiRsdp (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
+ );\r
+\r
+/** This function parses the ACPI SLIT table.\r
+ When trace is enabled this function parses the SLIT table and\r
+ traces the ACPI table fields.\r
+\r
+ This function also validates System Localities for the following:\r
+ - Diagonal elements have a normalized value of 10\r
+ - Relative distance from System Locality at i*N+j is same as\r
+ j*N+i\r
+\r
+ @param [in] Trace If TRUE, trace the ACPI fields.\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
+VOID\r
+EFIAPI\r
+ParseAcpiSlit (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
+ );\r
+\r
+/** This function parses the ACPI SPCR table.\r
+ When trace is enabled this function parses the SPCR table and\r
+ traces the ACPI table fields.\r
+\r
+ This function also performs validations of the ACPI table fields.\r
+\r
+ @param [in] Trace If TRUE, trace the ACPI fields.\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
+VOID\r
+EFIAPI\r
+ParseAcpiSpcr (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
+ );\r
+\r
+/** This function parses the ACPI SRAT table.\r
+ When trace is enabled this function parses the SRAT table and\r
+ traces the ACPI table fields.\r
+\r
+ This function parses the following Resource Allocation Structures:\r
+ - Processor Local APIC/SAPIC Affinity Structure\r
+ - Memory Affinity Structure\r
+ - Processor Local x2APIC Affinity Structure\r
+ - GICC Affinity Structure\r
+\r
+ This function also performs validation of the ACPI table fields.\r
+\r
+ @param [in] Trace If TRUE, trace the ACPI fields.\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
+VOID\r
+EFIAPI\r
+ParseAcpiSrat (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
+ );\r
+\r
+/** This function parses the ACPI SSDT table.\r
+ When trace is enabled this function parses the SSDT table and\r
+ traces the ACPI table fields.\r
+ For the SSDT table only the ACPI header fields are\r
+ parsed and traced.\r
+\r
+ @param [in] Trace If TRUE, trace the ACPI fields.\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
+VOID\r
+EFIAPI\r
+ParseAcpiSsdt (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
+ );\r
+\r
+/** This function parses the ACPI XSDT table\r
+ and optionally traces the ACPI table fields.\r
+\r
+ This function also performs validation of the XSDT table.\r
+\r
+ @param [in] Trace If TRUE, trace the ACPI fields.\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
+VOID\r
+EFIAPI\r
+ParseAcpiXsdt (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
+ );\r
+\r
+#endif // ACPIPARSER_H_\r