1fb1c8f89SEric DeVolder /*
2fb1c8f89SEric DeVolder * ACPI Error Record Serialization Table, ERST, Implementation
3fb1c8f89SEric DeVolder *
4fb1c8f89SEric DeVolder * ACPI ERST introduced in ACPI 4.0, June 16, 2009.
5fb1c8f89SEric DeVolder * ACPI Platform Error Interfaces : Error Serialization
6fb1c8f89SEric DeVolder *
7fb1c8f89SEric DeVolder * Copyright (c) 2021 Oracle and/or its affiliates.
8fb1c8f89SEric DeVolder *
9fb1c8f89SEric DeVolder * SPDX-License-Identifier: GPL-2.0-or-later
10fb1c8f89SEric DeVolder */
11fb1c8f89SEric DeVolder #ifndef HW_ACPI_ERST_H
12fb1c8f89SEric DeVolder #define HW_ACPI_ERST_H
13fb1c8f89SEric DeVolder
14*7a5951f6SMarkus Armbruster #include "hw/acpi/bios-linker-loader.h"
15*7a5951f6SMarkus Armbruster #include "qom/object.h"
16*7a5951f6SMarkus Armbruster
17fb1c8f89SEric DeVolder void build_erst(GArray *table_data, BIOSLinker *linker, Object *erst_dev,
18fb1c8f89SEric DeVolder const char *oem_id, const char *oem_table_id);
19fb1c8f89SEric DeVolder
20fb1c8f89SEric DeVolder #define TYPE_ACPI_ERST "acpi-erst"
21fb1c8f89SEric DeVolder
228486f12fSEric DeVolder /* returns NULL unless there is exactly one device */
find_erst_dev(void)238486f12fSEric DeVolder static inline Object *find_erst_dev(void)
248486f12fSEric DeVolder {
258486f12fSEric DeVolder return object_resolve_path_type("", TYPE_ACPI_ERST, NULL);
268486f12fSEric DeVolder }
27fb1c8f89SEric DeVolder #endif
28