summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpi/acpi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Print proper ACPI version number.kettenis2019-06-101-7/+9
| | | | ok mlarkin@
* When establishing the mapping between ACPI device nodes and PCI devices,kettenis2019-06-081-1/+6
| | | | | | skip PCI host bridges and devices that aren't there. ok patrick@
* Introduce acpi_getsta() and use it to eliminate some duplicated code.kettenis2019-06-071-23/+26
| | | | ok patrick@
* Make sure the extended PM register descriptions actually exist beforekettenis2019-05-121-9/+9
| | | | | | | using them. Fixes machines with ancient ACPI 1.0 (such as recent hypervisors). ok deraadt@
* Add support for mapping ACPI PM registers using the "extended" gasiokettenis2019-05-121-30/+71
| | | | | | representation from the FADT. Mostly fixes the Lanner NCA-1510. ok lteo@, mlarkin@, deraadt@
* Fix incorrect error message.lteo2019-05-111-2/+2
| | | | ok kettenis@
* free size. the allocation is the header plus the length.tedu2019-05-081-3/+3
|
* Avoid potential null-pointer dereference. Found by Kent R. Spillner.kettenis2019-04-041-3/+3
| | | | ok deraadt@, jsg@
* fix SMALL_KERNEL build after changes in rev 1.361jsg2019-01-201-1/+3
| | | | reported by naddy@ ok deraadt@
* Add a pwraction sysctl that controls what the power button does on acpi.tedu2019-01-191-2/+12
| | | | | | By default, nothing changes -- shutdown is initiated. But allows turning power button into a sleep button if desired. (grudging) ok from a few parties
* Add acpipci(4) on amd64. For now this only calls the PCI-specific _OSCkettenis2018-10-261-5/+1
| | | | method to let the ACPI implementation know what features we support.
* Move softbutton check before the check that skips attaching certain acpikettenis2018-08-301-5/+5
| | | | | | | devices. Fixes regression caused by matching on _CID in addition to matching on _HID. ok matthieu@, mlarkin@
* Match ACPI devices based on _CID if no match for _HID is found.kettenis2018-08-251-2/+9
| | | | ok mpi@
* Add support for multiple PCI segments. Only really implemented for arm64kettenis2018-08-191-11/+7
| | | | | | | for now as amd64/i386 firmware still caters for legacy OSes that only support a single PCI segment. ok patrick@
* Let ahci(4) match on _CLS instead of _HID when attaching at acpi(4). Avoidskettenis2018-08-031-4/+28
| | | | | | having to add many more _HID entries to the match table. ok deraadt@, mlarkin@
* Make legacy interrupts work in acpipci(4).kettenis2018-07-101-1/+16
| | | | ok patrick@
* Add acpipci(4), a driver that supports generic ECAM-compatible PCI hostkettenis2018-07-051-1/+5
| | | | | | bridges based on information provided by ACPI. ok mlarkin@
* Properly pass around the PCI "chipset tag" in acpi(4) and refactorkettenis2018-07-041-4/+4
| | | | | | | acpimcfg(4) to call an MD initialization functions that sets up a tag for PCI ECAM. ok guenther@, mlarkin@, krw@
* Move acpi(4) attach glue into acpi_machdep.c.kettenis2018-07-011-43/+1
| | | | ok guenther@, deraadt@
* Add support for _DSD Device Properties.kettenis2018-07-011-1/+45
| | | | ok mlarkin@
* Add intr_enable() function, intended for MI use to amd64 and i386 and usekettenis2018-06-301-5/+5
| | | | | | this in the acpi(4) suspend/resume code paths. ok deraadt@
* Use <stdint.h> types.kettenis2018-06-291-10/+10
| | | | ok mpi@, jung@, krw@, deraadt@
* ACPI: Allow (with warning) GPE handler reassignment, instead of returningmlarkin2018-06-291-6/+5
| | | | | | a failure code. ok kettenis
* knfmlarkin2018-06-261-13/+21
|
* Let acpi(4) pass down the bus dma tag.kettenis2018-06-261-1/+3
| | | | ok deraadt@
* Reorganize acpi(4) code a bit in preparation for upcoming arm64 support.kettenis2018-06-251-43/+47
| | | | ok deraadt@
* Wake up the acpi thread after scheduling a gpio event.kettenis2018-05-201-1/+2
| | | | ok mpi@
* Sprinkle some #ifndef SMALL_KERNEL such that RAMDISK kernels cuild again.kettenis2018-05-171-1/+5
| | | | pointed out by stsp@
* Implement GenericSerialBus OpRegion support.kettenis2018-05-171-1/+18
| | | | ok mlarkin@
* Add acpicmos(4), a driver that implements SystemCMOS OperationRegionkettenis2018-03-271-2/+1
| | | | | | | access support. This fixes machines where the AML doesn't check whether support for this OperationRegion type has been registered by the OS. ok mlarkin@
* Remove almost unused `flags' argument of suser().mpi2018-02-191-2/+2
| | | | | | | The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field. No objection from millert@, ok tedu@, bluhm@
* Syncronize filesystems to disk when suspending. Each mountpoint's vnodesderaadt2018-02-101-1/+7
| | | | | | | | | | are pushed to disk. Dangling vnodes (unlinked files still in use) and vnodes undergoing change by long-running syscalls are identified -- and such filesystems are marked dirty on-disk while we are suspended (in case power is lost, a fsck will be required). Filesystems without dangling or busy vnodes are marked clean, resulting in faster boots following "battery died" circumstances. Tested by numerous developers, thanks for the feedback.
* After flushing disks, try again to release all memory. We don't need toderaadt2018-02-081-1/+13
| | | | save dirty memory to the hibernate space.
* Toss all releaseable memory, because fragmentation can get in the wayderaadt2018-02-081-2/+6
| | | | of allocating the hibernate playpen.
* sr_quiesce() is a new approach for ensuring that softraid drainsderaadt2018-02-081-1/+8
| | | | | | | | output to the disks. This is part of a larger suspend/resume filesystem-safety diff, which has been worked on for a couple of months already. Tests by job, krw, beck, benno, and others. Sometimes even by snapshot users...
* Add support for GPIO-signaled events.kettenis2017-11-291-1/+83
| | | | ok mlarkin@
* Add PCI attachment for dwiic(4) needed by Intel 100 Series machinesjcs2017-11-161-3/+7
| | | | ok kettenis
* Add a few more PNP IDs to the skip lists.kettenis2017-11-141-2/+9
| | | | ok deraadt@, mpi@
* Make dwiic(4) attach its ACPI parent dependencies.stsp2017-08-171-2/+2
| | | | | | | This change makes the Asus E200HA keyboard work. Original analysis and patch by Cesare Gargano ok kettenis@
* Add "PNP0303" (8042 PS/2 Controller) to acpi_isa_hids[]dcoppa2017-08-091-1/+2
| | | | ok kettenis@
* acpibat: look for _BIX first before falling back on _BIFjcs2017-07-221-3/+3
| | | | | | | | | | ACPI 4.0 deprecated _BIF for battery status so some newer machines are exporting _BIX which extends _BIF's package with a few extra fields. When using _BIX, export the new discharge cycle count as a sensor. feedback from kettenis and anton ok deraadt
* Start a list of isa(4) device names such that we can avoid printing themkettenis2017-07-201-2/+9
| | | | | | as "not configured". ok mikeb@, millert@, deraadt@
* Sensors are run as callbacks inside tasks. During suspend a sensorderaadt2017-04-081-1/+3
| | | | | | | | | could be running inside a driver that will be force-detached, or due to tsleep end up disrupting the softstate/hardstate contract. At suspend time, quisce all these callbacks by waiting for completion. This issue has never been observed for real, but may be implicated in suspend/resume failures. ok kettenis guenther mlarkin
* Two prototypes for acpi_maptable; merge to one placederaadt2017-04-081-4/+1
|
* Now that hibernate_alloc() only has clean success/failure, don'tderaadt2017-03-271-2/+2
| | | | | need to call hibernate_free() to clean up a partial mess. ok mlarkin kettenis
* allow ramdisks to build; ok jcsderaadt2017-03-131-2/+4
|
* try to attach acpisbs first and if successful, don't attach acpibatjcs2017-03-121-1/+43
|
* Add a new sysctl machdep.lidaction. The sysctl works as follows:natano2017-03-021-3/+3
| | | | | | | | | | | | | | | machdep.lidaction=0 # do nothing machdep.lidaction=1 # suspend machdep.lidaction=2 # hibernate lidsuspend is just an alias for lidaction, so if you change one, the other one will have the same value. The plan is to remove machdep.lidsuspend eventually when people have upgraded their /ets/sysctl.conf. discussed with deraadt, who came up with the new MIB name no objections mlarkin ok stsp halex jcs
* Untangle abstract sleep modes from ACPI sleep states. This paves the waynatano2017-02-281-15/+17
| | | | | | | for further work in the area. idea and ok deraadt ok mlarkin
* add acpisbs, an acpi smart battery subsystem driver reading datajcs2017-02-221-5/+34
| | | | | | | | over smbus currently disabled because it conflicts with acpibat ok deraadt, kettenis