diff options
author | Nate Lawson <njl@FreeBSD.org> | 2004-06-13 22:52:30 +0000 |
---|---|---|
committer | Nate Lawson <njl@FreeBSD.org> | 2004-06-13 22:52:30 +0000 |
commit | 9123341378d5a7506257bbe6a317037a7a43a9e9 (patch) | |
tree | d2dac6905b64b7bcc7fe4fdc69df38b6c7dc9629 /sys/dev/acpica/acpivar.h | |
parent | a10ab60930630c0f2bf234eea3e1721dc08c3045 (diff) | |
download | src-9123341378d5a7506257bbe6a317037a7a43a9e9.tar.gz src-9123341378d5a7506257bbe6a317037a7a43a9e9.zip |
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.
Notes
Notes:
svn path=/head/; revision=130439
Diffstat (limited to 'sys/dev/acpica/acpivar.h')
-rw-r--r-- | sys/dev/acpica/acpivar.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 69b84af5e141..959681d5826d 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); |