2 Header file for ACPI table parser
4 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 #ifndef ACPITABLEPARSER_H_
15 #define ACPITABLEPARSER_H_
17 /** The maximum number of ACPI table parsers.
19 #define MAX_ACPI_TABLE_PARSERS 16
21 /** An invalid/NULL signature value.
23 #define ACPI_PARSER_SIGNATURE_NULL 0
25 /** A function that parses the ACPI table.
27 @param [in] Trace If TRUE, trace the ACPI fields.
28 @param [in] Ptr Pointer to the start of the buffer.
29 @param [in] AcpiTableLength Length of the ACPI table.
30 @param [in] AcpiTableRevision Revision of the ACPI table.
34 (EFIAPI
* PARSE_ACPI_TABLE_PROC
) (
37 IN UINT32 AcpiTableLength
,
38 IN UINT8 AcpiTableRevision
41 /** The ACPI table parser information
43 typedef struct AcpiTableParser
{
44 /// ACPI table signature
47 /// The ACPI table parser function.
48 PARSE_ACPI_TABLE_PROC Parser
;
51 /** Register the ACPI table Parser
53 This function registers the ACPI table parser.
55 @param [in] Signature The ACPI table signature.
56 @param [in] ParserProc The ACPI table parser.
58 @retval EFI_SUCCESS The parser is registered.
59 @retval EFI_INVALID_PARAMETER A parameter is invalid.
60 @retval EFI_ALREADY_STARTED The parser for the Table
61 was already registered.
62 @retval EFI_OUT_OF_RESOURCES No space to register the
69 IN PARSE_ACPI_TABLE_PROC ParserProc
72 /** Deregister the ACPI table Parser
74 This function deregisters the ACPI table parser.
76 @param [in] Signature The ACPI table signature.
78 @retval EFI_SUCCESS The parser was deregistered.
79 @retval EFI_INVALID_PARAMETER A parameter is invalid.
80 @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
107 /** Get the ACPI table Parser
109 This function returns the ACPI table parser proc from the list of
112 @param [in] Signature The ACPI table signature.
113 @param [out] ParserProc Pointer to a ACPI table parser proc.
115 @retval EFI_SUCCESS The parser was returned successfully.
116 @retval EFI_INVALID_PARAMETER A parameter is invalid.
117 @retval EFI_NOT_FOUND A registered parser was not found.
123 OUT PARSE_ACPI_TABLE_PROC
* ParserProc
126 #endif // ACPITABLEPARSER_H_