summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpivar.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-09-23 15:42:35 +0000
committerjhb <jhb@FreeBSD.org>2009-09-23 15:42:35 +0000
commit3f9fa059d728aa84a279591b28ace3f492381d74 (patch)
tree819cd5a8387fa2c662b3e881f117275815b84f54 /sys/dev/acpica/acpivar.h
parentdb540265723b7c60fa06a887e9443e08f2bc2fc0 (diff)
downloadFreeBSD-src-3f9fa059d728aa84a279591b28ace3f492381d74.zip
FreeBSD-src-3f9fa059d728aa84a279591b28ace3f492381d74.tar.gz
Extract the code to find and map the MADT ACPI table during early kernel
startup and genericize it so it can be reused to map other tables as well: - Add a routine to walk a list of ACPI subtables such as those used in the APIC and SRAT tables in the MI acpi(4) driver. - Move the routines for mapping and unmapping an ACPI table as well as mapping the RSDT or XSDT and searching for a table with a given signature out into acpica_machdep.c for both amd64 and i386.
Diffstat (limited to 'sys/dev/acpica/acpivar.h')
-rw-r--r--sys/dev/acpica/acpivar.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h
index 63eadea..f4d27e4 100644
--- a/sys/dev/acpica/acpivar.h
+++ b/sys/dev/acpica/acpivar.h
@@ -307,6 +307,9 @@ void acpi_EnterDebugger(void);
ACPI_DEVINFO_PRESENT(x, ACPI_STA_PRESENT | ACPI_STA_FUNCTIONAL | \
ACPI_STA_BATT_PRESENT)
+/* Callback function type for walking subtables within a table. */
+typedef void acpi_subtable_handler(ACPI_SUBTABLE_HEADER *, void *);
+
BOOLEAN acpi_DeviceIsPresent(device_t dev);
BOOLEAN acpi_BatteryIsPresent(device_t dev);
ACPI_STATUS acpi_GetHandleInScope(ACPI_HANDLE parent, char *path,
@@ -340,6 +343,8 @@ void acpi_UserNotify(const char *subsystem, ACPI_HANDLE h,
int acpi_bus_alloc_gas(device_t dev, int *type, int *rid,
ACPI_GENERIC_ADDRESS *gas, struct resource **res,
u_int flags);
+void acpi_walk_subtables(void *first, void *end,
+ acpi_subtable_handler *handler, void *arg);
struct acpi_parse_resource_set {
void (*set_init)(device_t dev, void *arg, void **context);
OpenPOWER on IntegriCloud