summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpivar.h
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-06-13 22:52:30 +0000
committernjl <njl@FreeBSD.org>2004-06-13 22:52:30 +0000
commitd49f147c3f337c27d40d40e625f0b8895b9c6c0f (patch)
treed2dac6905b64b7bcc7fe4fdc69df38b6c7dc9629 /sys/dev/acpica/acpivar.h
parent05af3d5b81d06efd1f5a8cf33121efd504b922c0 (diff)
downloadFreeBSD-src-d49f147c3f337c27d40d40e625f0b8895b9c6c0f.zip
FreeBSD-src-d49f147c3f337c27d40d40e625f0b8895b9c6c0f.tar.gz
Add support to ACPI to manage its own resources. Previously, resource
allocation was passed up to nexus. Now, we probe sysresource objects and manage the resources they describe in a local rman pool. This helps devices which attach/detach varying resources (like the _CST object) and module loads/unloads. The allocation/release routines now check to see if the resource is described in a child sysresource object and if so, allocate from the local rman. Sysresource objects add their resources to the pool and reserve them upon boot. This means sysresources need to be probed before other ACPI devices. Changes include: * Add ordering to the child device probe. The current order is: system resource objects, embedded controllers, then everything else. * Make acpi_MatchHid take a handle instead of a device_t arg. * Replace acpi_{get,set}_resource with the generic equivalents.
Diffstat (limited to 'sys/dev/acpica/acpivar.h')
-rw-r--r--sys/dev/acpica/acpivar.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h
index 69b84af..959681d 100644
--- a/sys/dev/acpica/acpivar.h
+++ b/sys/dev/acpica/acpivar.h
@@ -215,7 +215,7 @@ void acpi_EnterDebugger(void);
#define ACPI_DEVINFO_PRESENT(x) (((x) & 0x9) == 9)
BOOLEAN acpi_DeviceIsPresent(device_t dev);
BOOLEAN acpi_BatteryIsPresent(device_t dev);
-BOOLEAN acpi_MatchHid(device_t dev, char *hid);
+BOOLEAN acpi_MatchHid(ACPI_HANDLE h, char *hid);
ACPI_STATUS acpi_GetHandleInScope(ACPI_HANDLE parent, char *path,
ACPI_HANDLE *result);
uint32_t acpi_TimerDelta(uint32_t end, uint32_t start);
@@ -270,6 +270,8 @@ struct acpi_parse_resource_set {
extern struct acpi_parse_resource_set acpi_res_parse_set;
ACPI_STATUS acpi_parse_resources(device_t dev, ACPI_HANDLE handle,
struct acpi_parse_resource_set *set, void *arg);
+extern struct rman acpi_rman_io, acpi_rman_mem;
+struct resource_list_entry *acpi_sysres_find(int type, u_long addr);
/* ACPI event handling */
UINT32 acpi_event_power_button_sleep(void *context);
OpenPOWER on IntegriCloud