/** @file\r
Header file for ACPI parser\r
\r
- Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.\r
+ Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
**/\r
\r
IN UINT8* Ptr\r
);\r
\r
+/**\r
+ This function traces 12 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
+Dump12Chars (\r
+ IN CONST CHAR16* Format OPTIONAL,\r
+ IN UINT8* Ptr\r
+ );\r
+\r
/**\r
This function indents and prints the ACPI table Field Name.\r
\r
{ L"Creator Revision", 4, 32, L"0x%X", NULL, \\r
(VOID**)&(Info)->CreatorRevision, NULL, NULL }\r
\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
-/**\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
/**\r
This function indents and traces the GAS structure as described 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
+ @param [in] Length Length of the GAS structure buffer.\r
+\r
+ @retval Number of bytes parsed.\r
**/\r
-VOID\r
+UINT32\r
EFIAPI\r
DumpGasStruct (\r
IN UINT8* Ptr,\r
- IN UINT32 Indent\r
+ IN UINT32 Indent,\r
+ IN UINT32 Length\r
);\r
\r
/**\r
IN UINT8 AcpiTableRevision\r
);\r
\r
+/**\r
+ This function parses the ACPI FACS table.\r
+ When trace is enabled this function parses the FACS 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
+ParseAcpiFacs (\r
+ IN BOOLEAN Trace,\r
+ IN UINT8* Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
+ );\r
+\r
/**\r
This function parses the ACPI FADT table.\r
This function parses the FADT table and optionally traces the ACPI\r