Home | History | Annotate | only in /src/sys/dev/acpi/wmi
History log of /src/sys/dev/acpi/wmi
RevisionDateAuthorComments
 1.8 16-Feb-2011  jruoho Add a skeleton driver for Asus EeePC acpiwmi(4) mappings.
 1.7 24-Oct-2010  jruoho branches: 1.7.2; 1.7.4;
Add acpiwmi(4) mappings for MSI laptops.

XXX: It may be necessary to fix PR # 43659 before this works on all models.
 1.6 06-Aug-2010  jruoho branches: 1.6.2;
Remove the acpiwmi(4) dump from the ACPIVERBOSE module. Instead of this
complex solution, just use aprint_debug(9) in the driver.
 1.5 19-Jul-2010  jakllsch correct an obvious typo: acpwmi -> acpiwmi
 1.4 31-May-2010  pgoyette Extract ACPIVERBOSE into a kernel module. The module can be builtin
by defining 'options ACPIVERBOSE' in the kernel config file (no change
from current behavior), or it can be loaded at boot time on those
architectures that support the boot loader's "load" command.

ACPIVERBOSE also includes code to dump acpi/wmi data.
 1.3 08-Apr-2010  jruoho branches: 1.3.2; 1.3.4;
Add WMI mappings for HP laptops. Requested by cegger@.
Thanks to apb@ and cegger@ for initial testing.

XXX: This conflicts with hpqlb(4). Someone with the suitable hardware needs
to complete the list of hotkeys before -- and if -- this can replace
hpqlb(4). For now, the driver was left uncommented in the GENERICs.
 1.2 08-Apr-2010  jruoho Move acpiwmi(4) to the "sys/dev/acpi/wmi" -subdirectory.
 1.1 08-Apr-2010  jruoho Add WMI mappings for Dell laptops. Requested and tested by mrg@.
 1.3.4.4 05-Mar-2011  rmind sync with head
 1.3.4.3 03-Jul-2010  rmind sync with head
 1.3.4.2 30-May-2010  rmind sync with head
 1.3.4.1 08-Apr-2010  rmind file files.wmi was added on branch rmind-uvmplock on 2010-05-30 05:17:18 +0000
 1.3.2.3 06-Nov-2010  uebayasi Sync with HEAD.
 1.3.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.3.2.1 08-Apr-2010  uebayasi file files.wmi was added on branch uebayasi-xip on 2010-04-30 14:43:07 +0000
 1.6.2.2 11-Aug-2010  yamt sync with head.
 1.6.2.1 06-Aug-2010  yamt file files.wmi was added on branch yamt-nfs-mp on 2010-08-11 22:53:17 +0000
 1.7.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.7.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.23 11-Aug-2023  riastradh acpiwmi(4): Fix abuse of char buffer for struct guid_t content.

Nothing guarantees alignment, so this is all undefined behaviour,
even if we don't touch the uninitialized members.

XXX pullup-10
XXX pullup-9
XXX pullup-8
 1.22 10-Aug-2023  mrg don't assign struct pointers to smaller then structure regions of memory.

in all cases here, the later parts of the structure are not actually
accessed, so there are no existing bugs here beyond general UB. for the
ufs ones, this also removes some casts.

found by GCC 12.
 1.21 10-May-2023  riastradh acpiwmi(4): Use config_detach_children.
 1.20 12-Dec-2021  andvar fix various typos in comments.
 1.19 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.18 24-Apr-2021  thorpej branches: 1.18.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.17 29-Jan-2021  thorpej branches: 1.17.2;
Use acpi_compatible_match().
 1.16 03-Dec-2017  bouyer branches: 1.16.18;
- make sure strtoul() is called with a NULL-terminated string.
- acpi_wmi_input(): a valid data block may have flags set to 0.
 1.15 01-Jun-2017  chs remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.14 14-Aug-2012  jruoho branches: 1.14.2; 1.14.16;
Use KM_SLEEP.
 1.13 17-Jul-2011  jakllsch branches: 1.13.2;
- Fix wmieeepc(4) hotkeys on Eee PC 1215T
- Rework wmi_event_enable into appropriately seperate versions for enabling
events and collection.
- Enable all events, not just ones tagged as expensive.
 1.12 16-Feb-2011  jruoho Convert the homegrown module declarations to use ioconf.
 1.11 28-Oct-2010  jruoho branches: 1.11.2; 1.11.4;
Install EC space handler and pass everything to acpiec(4).
Should fix PR # 43659.
 1.10 25-Oct-2010  jruoho Fix build failure.
 1.9 24-Oct-2010  jmcneill add support for building as a module
 1.8 24-Oct-2010  jmcneill add rescan support
 1.7 06-Aug-2010  jruoho branches: 1.7.2;
Remove the acpiwmi(4) dump from the ACPIVERBOSE module. Instead of this
complex solution, just use aprint_debug(9) in the driver.
 1.6 29-Jul-2010  jruoho Add "pnp0c14" to the list of HIDs. Required for LG X110. As valid EISA IDs
should be all upper case, leave this as a onetime quirk specific to acpiwmi(4).
 1.5 31-May-2010  pgoyette Extract ACPIVERBOSE into a kernel module. The module can be builtin
by defining 'options ACPIVERBOSE' in the kernel config file (no change
from current behavior), or it can be loaded at boot time on those
architectures that support the boot loader's "load" command.

ACPIVERBOSE also includes code to dump acpi/wmi data.
 1.4 15-Apr-2010  jruoho branches: 1.4.2; 1.4.4;
As discussed with jmcneill@, install a global "bus notification handler"
that receives all notifications and deliver notifications to drivers via it.
 1.3 09-Apr-2010  jruoho Fix a potential NULL pointer dereference.
 1.2 08-Apr-2010  jruoho Semantics.
 1.1 08-Apr-2010  jruoho Move acpiwmi(4) to the "sys/dev/acpi/wmi" -subdirectory.
 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 15-Apr-2010  rmind file wmi_acpi.c was added on branch rmind-uvmplock on 2010-05-30 05:17:18 +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 15-Apr-2010  uebayasi file wmi_acpi.c was added on branch uebayasi-xip on 2010-04-30 14:43:07 +0000
 1.7.2.2 11-Aug-2010  yamt sync with head.
 1.7.2.1 06-Aug-2010  yamt file wmi_acpi.c was added on branch yamt-nfs-mp on 2010-08-11 22:53:17 +0000
 1.11.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.11.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.13.2.1 30-Oct-2012  yamt sync with head
 1.14.16.1 28-Aug-2017  skrll Sync with HEAD
 1.14.2.1 03-Dec-2017  jdolecek update from HEAD
 1.16.18.1 03-Apr-2021  thorpej Sync with HEAD.
 1.17.2.1 24-Mar-2021  thorpej Don't filter interface attributes in rescan functions for devices that
carry only a single interface attribute. The autoconfiguration machinery
already considers interface attributes when searching for possible parents.
 1.18.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.7 16-Apr-2020  rin Revert previous for now:
http://mail-index.netbsd.org/source-changes/2020/04/16/msg116278.html

The reasoning turned out to be wrong; __KERNEL_RCSID() in header files
does *not* overwrite RCSID in main source files. The real problem is that
it inserts its RCSID into *every* object files. However, it can be still
useful even if heavily duplicated.
 1.6 16-Apr-2020  rin Stop using __KERNEL_RCSID() in header files; it confuses ident(1) by
overwriting RCSID in main source files.

XXX
The first argument of __KERNEL_RCSID() is neglected for ELF. If we wish
to have RCSID of header files in kernel binary, we need something like
__FBSDID() macro in FreeBSD.
 1.5 28-Oct-2010  jruoho branches: 1.5.72;
Install EC space handler and pass everything to acpiec(4).
Should fix PR # 43659.
 1.4 05-Jun-2010  jruoho branches: 1.4.2;
Remove trailing white space.
 1.3 31-May-2010  pgoyette Extract ACPIVERBOSE into a kernel module. The module can be builtin
by defining 'options ACPIVERBOSE' in the kernel config file (no change
from current behavior), or it can be loaded at boot time on those
architectures that support the boot loader's "load" command.

ACPIVERBOSE also includes code to dump acpi/wmi data.
 1.2 08-Apr-2010  jruoho branches: 1.2.2; 1.2.4;
Semantics.
 1.1 08-Apr-2010  jruoho Move acpiwmi(4) to the "sys/dev/acpi/wmi" -subdirectory.
 1.2.4.4 05-Mar-2011  rmind sync with head
 1.2.4.3 03-Jul-2010  rmind sync with head
 1.2.4.2 30-May-2010  rmind sync with head
 1.2.4.1 08-Apr-2010  rmind file wmi_acpivar.h was added on branch rmind-uvmplock on 2010-05-30 05:17:18 +0000
 1.2.2.4 06-Nov-2010  uebayasi Sync with HEAD.
 1.2.2.3 17-Aug-2010  uebayasi Sync with HEAD.
 1.2.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.2.2.1 08-Apr-2010  uebayasi file wmi_acpivar.h was added on branch uebayasi-xip on 2010-04-30 14:43:07 +0000
 1.4.2.2 11-Aug-2010  yamt sync with head.
 1.4.2.1 05-Jun-2010  yamt file wmi_acpivar.h was added on branch yamt-nfs-mp on 2010-08-11 22:53:17 +0000
 1.5.72.1 20-Apr-2020  bouyer Sync with HEAD
 1.12 04-Dec-2019  bouyer Finally fix problem discussed in this old thread:
http://mail-index.netbsd.org/tech-kern/2017/12/03/msg022661.html

Dell's radio hotkey sends a PMFE_RADIO_TOGGLE event, but nothing actually
listen to it.
Turn it into a PSWITCH_HK_WIRELESS_BUTTON hotkey, similar to
what thinkpad_acpi.c does.
Add type/subtypes seen on a Dell lattitude 5480 laptop.
XXX we need a PMFE_AUDIO_MICRO_TOGGLE, and something to handle it.
 1.11 03-Dec-2017  christos branches: 1.11.4;
make this compile again and:
- remove extra space
- use alternate form %x printing
- use aprint_debug_dev instead of printf
 1.10 03-Dec-2017  bouyer Fix dell WMI mappings:
- query the descriptor to get the interface version, needed to workaround
a bug in the BIOS/ACPI
- properly decode the event buffer in type/subtype, and handle multiple events
per handler call
- record some known type/subtype in a table, with associated actions.

Informations mostly from linux. Tested on a Dell 5480 laptop.
 1.9 23-Apr-2015  pgoyette Update module dependencies for all the existing modules that depend on sysmon components.
 1.8 16-Feb-2011  jruoho branches: 1.8.14; 1.8.32;
Make the WMI modules depend on the parent mapper.
 1.7 16-Feb-2011  jruoho Convert the homegrown module declarations to use ioconf.
 1.6 25-Oct-2010  jruoho branches: 1.6.2; 1.6.4;
Bump WARNS to 4.
 1.5 24-Oct-2010  jmcneill add support for building as modules
 1.4 30-Jun-2010  jruoho branches: 1.4.2;
Initialize pointers to NULL. Otherwise we may try to free garbage.
Tries to address a panic reported by David Demelier in PR kern/43504.
 1.3 08-Apr-2010  jruoho branches: 1.3.2; 1.3.4;
Move acpiwmi(4) to the "sys/dev/acpi/wmi" -subdirectory.
 1.2 08-Apr-2010  jruoho Add a dummy acpi_wmi_event_deregister() to match existing conventions.
 1.1 08-Apr-2010  jruoho Add WMI mappings for Dell laptops. Requested and tested by mrg@.
 1.3.4.4 05-Mar-2011  rmind sync with head
 1.3.4.3 03-Jul-2010  rmind sync with head
 1.3.4.2 30-May-2010  rmind sync with head
 1.3.4.1 08-Apr-2010  rmind file wmi_dell.c was added on branch rmind-uvmplock on 2010-05-30 05:17:18 +0000
 1.3.2.4 06-Nov-2010  uebayasi Sync with HEAD.
 1.3.2.3 17-Aug-2010  uebayasi Sync with HEAD.
 1.3.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.3.2.1 08-Apr-2010  uebayasi file wmi_dell.c was added on branch uebayasi-xip on 2010-04-30 14:43:07 +0000
 1.4.2.2 11-Aug-2010  yamt sync with head.
 1.4.2.1 30-Jun-2010  yamt file wmi_dell.c was added on branch yamt-nfs-mp on 2010-08-11 22:53:17 +0000
 1.6.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.6.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.8.32.1 06-Jun-2015  skrll Sync with HEAD
 1.8.14.1 03-Dec-2017  jdolecek update from HEAD
 1.11.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2 06-Aug-2010  jruoho Remove the acpiwmi(4) dump from the ACPIVERBOSE module. Instead of this
complex solution, just use aprint_debug(9) in the driver.
 1.1 31-May-2010  pgoyette branches: 1.1.2;
Extract ACPIVERBOSE into a kernel module. The module can be builtin
by defining 'options ACPIVERBOSE' in the kernel config file (no change
from current behavior), or it can be loaded at boot time on those
architectures that support the boot loader's "load" command.

ACPIVERBOSE also includes code to dump acpi/wmi data.
 1.1.2.3 05-Mar-2011  rmind sync with head
 1.1.2.2 03-Jul-2010  rmind sync with head
 1.1.2.1 31-May-2010  rmind file wmi_dump.c was added on branch rmind-uvmplock on 2010-07-03 01:19:35 +0000
 1.4 23-Apr-2015  pgoyette Update module dependencies for all the existing modules that depend on sysmon components.
 1.3 22-Jul-2011  jakllsch branches: 1.3.12; 1.3.30;
Implement recognition of more wmieeepc(4) hotkey events.
 1.2 16-Feb-2011  jruoho branches: 1.2.2; 1.2.4; 1.2.8;
Make the WMI modules depend on the parent mapper.
 1.1 16-Feb-2011  jruoho Add a skeleton driver for Asus EeePC acpiwmi(4) mappings.
 1.2.8.2 06-Jun-2011  jruoho Sync with HEAD.
 1.2.8.1 16-Feb-2011  jruoho file wmi_eeepc.c was added on branch jruoho-x86intr on 2011-06-06 09:07:44 +0000
 1.2.4.2 05-Mar-2011  rmind sync with head
 1.2.4.1 16-Feb-2011  rmind file wmi_eeepc.c was added on branch rmind-uvmplock on 2011-03-05 20:53:05 +0000
 1.2.2.2 17-Feb-2011  bouyer Sync with HEAD
 1.2.2.1 16-Feb-2011  bouyer file wmi_eeepc.c was added on branch bouyer-quota2 on 2011-02-17 12:00:10 +0000
 1.3.30.1 06-Jun-2015  skrll Sync with HEAD
 1.3.12.1 03-Dec-2017  jdolecek update from HEAD
 1.11 06-Jun-2018  maya Remove duplicate ;
 1.10 01-Jun-2017  chs branches: 1.10.8;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.9 23-Apr-2015  pgoyette Update module dependencies for all the existing modules that depend on sysmon components.
 1.8 25-Feb-2014  pooka branches: 1.8.6;
Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.
 1.7 12-Oct-2012  cegger branches: 1.7.2;
Add support for various things:
- hddtemp sensor
- ambient light sensor on/off (via sysctl)
- display info
- docking station info
 1.6 16-Feb-2011  jruoho branches: 1.6.4; 1.6.14;
Make the WMI modules depend on the parent mapper.
 1.5 16-Feb-2011  jruoho Convert the homegrown module declarations to use ioconf.
 1.4 25-Oct-2010  jruoho branches: 1.4.2; 1.4.4;
Bump WARNS to 4.
 1.3 24-Oct-2010  jmcneill add support for building as modules
 1.2 30-Jun-2010  jruoho branches: 1.2.2;
Initialize pointers to NULL. Otherwise we may try to free garbage.
Tries to address a panic reported by David Demelier in PR kern/43504.
 1.1 08-Apr-2010  jruoho branches: 1.1.2; 1.1.4;
Add WMI mappings for HP laptops. Requested by cegger@.
Thanks to apb@ and cegger@ for initial testing.

XXX: This conflicts with hpqlb(4). Someone with the suitable hardware needs
to complete the list of hotkeys before -- and if -- this can replace
hpqlb(4). For now, the driver was left uncommented in the GENERICs.
 1.1.4.4 05-Mar-2011  rmind sync with head
 1.1.4.3 03-Jul-2010  rmind sync with head
 1.1.4.2 30-May-2010  rmind sync with head
 1.1.4.1 08-Apr-2010  rmind file wmi_hp.c was added on branch rmind-uvmplock on 2010-05-30 05:17:18 +0000
 1.1.2.4 06-Nov-2010  uebayasi Sync with HEAD.
 1.1.2.3 17-Aug-2010  uebayasi Sync with HEAD.
 1.1.2.2 30-Apr-2010  uebayasi Sync with HEAD.
 1.1.2.1 08-Apr-2010  uebayasi file wmi_hp.c was added on branch uebayasi-xip on 2010-04-30 14:43:07 +0000
 1.2.2.2 11-Aug-2010  yamt sync with head.
 1.2.2.1 30-Jun-2010  yamt file wmi_hp.c was added on branch yamt-nfs-mp on 2010-08-11 22:53:17 +0000
 1.4.4.1 17-Feb-2011  bouyer Sync with HEAD
 1.4.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.6.14.3 03-Dec-2017  jdolecek update from HEAD
 1.6.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.14.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.4.1 30-Oct-2012  yamt sync with head
 1.7.2.1 18-May-2014  rmind sync with head
 1.8.6.2 28-Aug-2017  skrll Sync with HEAD
 1.8.6.1 06-Jun-2015  skrll Sync with HEAD
 1.10.8.1 25-Jun-2018  pgoyette Sync with HEAD
 1.5 16-Feb-2011  jruoho branches: 1.5.2;
Make the WMI modules depend on the parent mapper.
 1.4 16-Feb-2011  jruoho Convert the homegrown module declarations to use ioconf.
 1.3 25-Oct-2010  jruoho branches: 1.3.2; 1.3.4; 1.3.6;
Bump WARNS to 4.
 1.2 24-Oct-2010  jmcneill add support for building as modules
 1.1 24-Oct-2010  jruoho Add acpiwmi(4) mappings for MSI laptops.

XXX: It may be necessary to fix PR # 43659 before this works on all models.
 1.3.6.1 17-Feb-2011  bouyer Sync with HEAD
 1.3.4.1 06-Jun-2011  jruoho Sync with HEAD.
 1.3.2.2 06-Nov-2010  uebayasi Sync with HEAD.
 1.3.2.1 25-Oct-2010  uebayasi file wmi_msi.c was added on branch uebayasi-xip on 2010-11-06 08:08:28 +0000
 1.5.2.2 05-Mar-2011  rmind sync with head
 1.5.2.1 16-Feb-2011  rmind file wmi_msi.c was added on branch rmind-uvmplock on 2011-03-05 20:53:05 +0000

RSS XML Feed