Home | History | Annotate | Download | only in acpi
History log of /src/sys/dev/acpi/acpi_util.c
RevisionDateAuthorComments
 1.35  11-Jan-2025  jmcneill acpi: i2c: only claim child devices with a _CRS or _ADR method

acpi_enter_i2c_devs is too aggressive with claiming child device nodes.
Restrict it to devices with either a _CRS or _ADR method. A driver is
free to claim more if appropriate.

Fixes missing HKEY (LEN0268) device on Thinkpad T14s Gen 6 (X1E).
 1.34  30-Dec-2024  jmcneill acpi_match_cpu_info: Skip test for 'acpi_active'.

This allows us to call this function from acpi_md_callback, which is
when CPUs are attached on Arm.
 1.33  23-Jul-2022  thorpej branches: 1.33.10;
- Handle dtlink in acpi_pack_compat_list().
- Don't pass the _HID value as the device name; always use the ACPI
node name.
 1.32  22-Jan-2022  thorpej Change the devhandle_from_*() functions to also take a "super handle",
from which the newly created handle will inherit it's implementation.
The root implementation for a new handle type is used if an invalid
"super handle" is passed.
 1.31  15-Jan-2022  jmcneill acpi: Add helper for querying DSM function 0.
 1.30  09-Jan-2022  jmcneill acpi: Add acpi_dsd_bool helper
 1.29  31-Dec-2021  jmcneill acpi: Support DT link compat string lists

A "compatible" DSD property may either be a string, or a package of
strings. Support both variants in acpi_compatible_match.
 1.28  26-Dec-2021  jmcneill acpi: Support DT link device ID

The PRP0001 device ID is used to tell the OS to match a driver against
the "compatible" _DSD property. Make acpi_compatible_match aware of this
special device ID and match device compatible entries against the
compatible property when applicable.
 1.27  20-Dec-2021  skrll Fix struct member prefix to be consistent. same code before and after.
 1.26  15-Sep-2021  thorpej Adjust the device_call() calling convention so as to provide type checking
of the arguments passed to the call, using auto-generated argument
structures and binding macros.
 1.25  09-Aug-2021  andvar fix various typos in compatibility, mainly in comments.
 1.24  05-Feb-2021  thorpej ACPI device handle implementation.
 1.23  27-Jan-2021  thorpej Introduce weighted matching for ACPI autoconfiguration, and provide
acpi_compatible_match() based around device_compatible_entry. Matches
against _HID score big, matches against _CID are weighted in the
standard most-to-least-specific ordering, less than _HID.

Also provide a maching value for _CLS, that's always less than _HID
and _CID matches, and use that in acpi_match_class().

Also provide acpi_compatible_lookup(), that returing the matching
entry based on the same criteria.
 1.22  26-Jan-2021  jmcneill build fix
 1.21  26-Jan-2021  jmcneill Add a device_t parameter to acpi_enter_i2c_devs. If non-NULL, all child
acpi_devnodes will be claimed by that device so we don't later try to
attach a duplicate device to that node at acpinodebus.
 1.20  14-Jan-2021  thorpej - Add a new routine, acpi_pack_compat_list(), that packs the _HID
and _CID device ID strings into an OpenFirmware-like string list,
analogous to how the "compatible" property is represented in
OpenFirmware and the Device Tree specifications.
- Add generic routines for evaluating Device Specific Methods (_DSM).
 1.19  23-Oct-2020  jmcneill branches: 1.19.2;
Add acpi_intr_establish_irq, which is like acpi_intr_establish except
it takes a struct acpi_irq * instead of ACPI_HANDLE. Useful if a device
has more than one IRQ resource (acpi_intr_establish always picks the
first).
 1.18  31-Dec-2019  mlelstv Free buffers only when allocated.
 1.17  29-Dec-2019  jmcneill Add support for reading _DSD string property values.
 1.16  22-Dec-2019  thorpej Add acpi_intr_mask() and acpi_intr_unmask() which, following the pre-existing
ACPI software layering model, are wrappers around acpi_md_intr_mask() and
acpi_md_intr_unmask(), which in turn are wrappers around intr_mask() and
intr_unmask().

XXX ARM and IA64 implementations of acpi_md_intr_mask() and
acpi_md_intr_unmask() are just stubs for now.
 1.15  21-Dec-2018  jmcneill Add acpi_dsd_integer, which reads an integer value from an ACPI 5.0 _DSD
key/value package list.
 1.14  16-Nov-2018  jmcneill Use acpi_md_intr_establish/disestablish to handle device IRQs. The existing
code abused AcpiOsInstallInterruptHandler, which is meant for installing
the SCI handler.
 1.13  12-Oct-2018  jmcneill Add helper function to match a PCI-defined class/subclass/interface
against a _CLS object.
 1.12  12-Oct-2018  jmcneill Pull in sys/cpu.h for struct cpu_info and CPU_INFO_ITERATOR.
 1.11  20-Mar-2018  bouyer branches: 1.11.2;
Allow registering ACPI interrupt handlers with a xname.
AcpiOsInstallInterruptHandler(), part of ACPICA API, doesn't allow passing
the xname. I extend the API with AcpiOsInstallInterruptHandler_xname()
for this purpose, and change acpi_md_OsInstallInterruptHandler() to
accept and use the xname (ia64 doens't use it).
The xname was hardcoded to "acpi SCI" in the
x86 acpi_md_OsInstallInterruptHandler(), so I make
AcpiOsInstallInterruptHandler() call
AcpiOsInstallInterruptHandler_xname with xname = "acpi SCI".

Now 'vmstat -i' shows the device's name instead of "acpi SCI" for for i2c HID
interrupts.

Proposed on tech-kern@ on Dec 29.
 1.10  10-Dec-2017  bouyer branches: 1.10.2;
Cast to uintptr_t before casting to void *; fix a warning on i386
 1.9  10-Dec-2017  bouyer Implement a ACPI helper to fill the property array expected from our I2C
framework from the ACPI tables.
Also implement acpi_intr_establish(), acpi_intr_disestablish() and
acpi_intr_string().
Needed for the upcoming HID over I2C support, proposed on tech-kern@
on Dec, 1.
 1.8  21-Jun-2011  jruoho Rename acpi_get_node() to acpi_match_node() for consistency.
 1.7  20-Jun-2011  jruoho Add two new functions, acpi_match_cpu_info() and acpi_match_cpu_handle(),
which will match a given struct cpu_info with the corresponding ACPI handle,
and vice versa.
 1.6  02-Nov-2010  gsutre branches: 1.6.6;
acpi_eval_integer: check that the evaluation produced a result.

ok jruoho@
 1.5  07-Jun-2010  jruoho branches: 1.5.2;
Use the new ACPICA functions AcpiAttachData() and AcpiGetData() to associate
all "struct acpi_devnodes" to their corresponding ACPI_HANDLEs. Anywhere in
the acpi(4) subtree, the node-structure can be obtained from a handle via
acpi_get_node(). The idea is similar to e.g. device_private().

Benefits: (a) simplifies code, (b) avoids issues with locking as ACPICA does
the serialization for us, (c) avoids the need to access the glocal softc, and
(d) avoids the O(n) loop required to search for a handle from the node queue.
 1.4  27-Apr-2010  jruoho branches: 1.4.2; 1.4.4;
Be consistent with the returned exception codes. Check for NULL pointers.
 1.3  24-Apr-2010  jruoho Add utility function acpi_get_node().

This retrieves a struct acpi_devnode from a handle. Since this requires
accessing the global softc, it is better to do it in one place alone. The
same goes for possible locking of the node-queue; it is better not to
publicize such a lock for generic device drivers.
 1.2  15-Apr-2010  jruoho Arrange some comments.
 1.1  14-Apr-2010  jruoho Reorganize the main file: add several missing prototypes, move the functions
around so that they appear in their logical order and place, etc. In
addition, split the utility functions to a separate file.

No functional change. Ok jmcneill@.
 1.4.4.4  05-Mar-2011  rmind sync with head
 1.4.4.3  03-Jul-2010  rmind sync with head
 1.4.4.2  30-May-2010  rmind sync with head
 1.4.4.1  27-Apr-2010  rmind file acpi_util.c was added on branch rmind-uvmplock on 2010-05-30 05:17:17 +0000
 1.4.2.4  06-Nov-2010  uebayasi Sync with HEAD.
 1.4.2.3  17-Aug-2010  uebayasi Sync with HEAD.
 1.4.2.2  30-Apr-2010  uebayasi Sync with HEAD.
 1.4.2.1  27-Apr-2010  uebayasi file acpi_util.c was added on branch uebayasi-xip on 2010-04-30 14:43:06 +0000
 1.5.2.2  11-Aug-2010  yamt sync with head.
 1.5.2.1  07-Jun-2010  yamt file acpi_util.c was added on branch yamt-nfs-mp on 2010-08-11 22:53:16 +0000
 1.6.6.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.10.2.4  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.10.2.3  26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.10.2.2  20-Oct-2018  pgoyette Sync with head
 1.10.2.1  22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.11.2.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.11.2.1  10-Jun-2019  christos Sync with HEAD
 1.19.2.1  03-Apr-2021  thorpej Sync with HEAD.
 1.33.10.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed