1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * fw_tables.h - Parsing support for ACPI and ACPI-like tables provided by
4 * platform or device firmware
7 * Copyright (C) 2023 Intel Corp.
12 union acpi_subtable_headers;
14 typedef int (*acpi_tbl_entry_handler)(union acpi_subtable_headers *header,
15 const unsigned long end);
17 typedef int (*acpi_tbl_entry_handler_arg)(union acpi_subtable_headers *header,
18 void *arg, const unsigned long end);
20 struct acpi_subtable_proc {
22 acpi_tbl_entry_handler handler;
23 acpi_tbl_entry_handler_arg handler_arg;
28 #include <linux/acpi.h>
29 #include <acpi/acpi.h>
31 union acpi_subtable_headers {
32 struct acpi_subtable_header common;
33 struct acpi_hmat_structure hmat;
34 struct acpi_prmt_module_header prmt;
35 struct acpi_cedt_header cedt;
38 int acpi_parse_entries_array(char *id, unsigned long table_size,
39 struct acpi_table_header *table_header,
40 struct acpi_subtable_proc *proc,
41 int proc_num, unsigned int max_entries);