2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 * Copyright (c) 2021 Beckhoff Automation GmbH & Co. KG
5 * Author: Corvin Köhne <c.koehne@beckhoff.com>
10 #pragma GCC diagnostic push
11 #pragma GCC diagnostic ignored "-Wunused-parameter"
12 #include <contrib/dev/acpica/include/acpi.h>
13 #pragma GCC diagnostic pop
20 * Creates an ACPI device.
22 * @param[out] new_dev Returns the newly create ACPI device.
23 * @param[in] vm_ctx VM context the ACPI device is created in.
24 * @param[in] name Name of the ACPI device. Should always be a NULL
26 * @param[in] hid Hardware ID of the ACPI device. Should always be a NULL
29 int acpi_device_create(struct acpi_device **const new_dev,
30 struct vmctx *const vm_ctx, const char *const name, const char *const hid);
31 void acpi_device_destroy(struct acpi_device *const dev);
33 int acpi_device_add_res_fixed_ioport(struct acpi_device *const dev,
34 const UINT16 port, UINT8 length);
35 int acpi_device_add_res_fixed_memory32(struct acpi_device *const dev,
36 const UINT8 write_protected, const UINT32 address, const UINT32 length);
38 void acpi_device_write_dsdt(const struct acpi_device *const dev);