2 Header file for ACPI table parser
4 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
5 SPDX-License-Identifier: BSD-2-Clause-Patent
8 #ifndef ACPITABLEPARSER_H_
9 #define ACPITABLEPARSER_H_
12 The maximum number of ACPI table parsers.
14 #define MAX_ACPI_TABLE_PARSERS 16
16 /** An invalid/NULL signature value.
18 #define ACPI_PARSER_SIGNATURE_NULL 0
21 A function that parses the ACPI table.
23 @param [in] Trace If TRUE, trace the ACPI fields.
24 @param [in] Ptr Pointer to the start of the buffer.
25 @param [in] AcpiTableLength Length of the ACPI table.
26 @param [in] AcpiTableRevision Revision of the ACPI table.
30 (EFIAPI
* PARSE_ACPI_TABLE_PROC
) (
33 IN UINT32 AcpiTableLength
,
34 IN UINT8 AcpiTableRevision
38 The ACPI table parser information
40 typedef struct AcpiTableParser
{
41 /// ACPI table signature
44 /// The ACPI table parser function.
45 PARSE_ACPI_TABLE_PROC Parser
;
49 Register the ACPI table Parser
51 This function registers the ACPI table parser.
53 @param [in] Signature The ACPI table signature.
54 @param [in] ParserProc The ACPI table parser.
56 @retval EFI_SUCCESS The parser is registered.
57 @retval EFI_INVALID_PARAMETER A parameter is invalid.
58 @retval EFI_ALREADY_STARTED The parser for the Table
59 was already registered.
60 @retval EFI_OUT_OF_RESOURCES No space to register the
67 IN PARSE_ACPI_TABLE_PROC ParserProc
71 Deregister the ACPI table Parser
73 This function deregisters the ACPI table parser.
75 @param [in] Signature The ACPI table signature.
77 @retval EFI_SUCCESS The parser was deregistered.
78 @retval EFI_INVALID_PARAMETER A parameter is invalid.
79 @retval EFI_NOT_FOUND A registered parser was not found.
88 This function processes the ACPI tables.
89 This function calls ProcessTableReportOptions() to list the ACPI
90 tables, perform binary dump of the tables and determine if the
91 ACPI fields should be traced.
93 This function also invokes the parser for the ACPI tables.
95 This function also performs a RAW dump of the ACPI table including
96 the unknown/unparsed ACPI tables and validates the checksum.
98 @param [in] Ptr Pointer to the start of the ACPI
108 Get the ACPI table Parser
110 This function returns the ACPI table parser proc from the list of
113 @param [in] Signature The ACPI table signature.
114 @param [out] ParserProc Pointer to a ACPI table parser proc.
116 @retval EFI_SUCCESS The parser was returned successfully.
117 @retval EFI_INVALID_PARAMETER A parameter is invalid.
118 @retval EFI_NOT_FOUND A registered parser was not found.
124 OUT PARSE_ACPI_TABLE_PROC
* ParserProc
127 #endif // ACPITABLEPARSER_H_