summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpi/acpi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Revert aml_rdpciaddr changes; breaks several machines that were workingkettenis2017-01-141-9/+13
| | | | before.
* Increase the size of the buffers used for _HID and _CID strings to bejsg2017-01-111-4/+4
| | | | | | able to fit "Hyper_V_Gen_Counter_V1". ok mlarkin@ deraadt@
* Make aml_rdpciaddr() work for for devices behind bridges. The code nowkettenis2017-01-081-13/+9
| | | | | | | | | | uses the mapping between AML nodes and PCI devices that we establish. Because _INIT methods may end up calling aml_rdpciaddr(), make sure we create that mapping early. Also handle devices that aren't actually present. These devices are now included in the mapping and reads will return an all-ones patterm whereas writes are a no-op.. ok mlarkin@
* Add the resource index to aml_parse_resource() callback function.pirofti2016-10-251-3/+3
| | | | | | | This is needed by an upcoming acpiec commit that handles machines breaking the current ACPI specifications. Change suggested by and ok kettenis@, guenther@
* If the APIC table (MADT) isn't present then ci_acpi_proc_id won't be setguenther2016-09-181-5/+1
| | | | | | | | | | | | when acpicpu tries to attach, leading to a NULL dereference. The ACPI processor object on the Dells where this was reported is bogus and useless anyway so apply the same test when deciding whether to attach to processor objects as acpicpu would when matching them to cpus. Problem reported by Eivind Eide (xenofil (at) gmail.com) and Johan Huldtgren (johan+openbsd-bugs (at) huldtgren.com). Testing by Eivind Eide. ok kettenis@ mlarkin@
* Write the system time back to the RTC every 30 minutes.naddy2016-09-031-1/+5
| | | | | | | This fixes the problem that long-running machines which were not shut down properly would reboot with a badly offset system time. hints and ok kettenis@
* Don't put a device in the wake device list if _STA says it's not there.mlarkin2016-08-311-1/+8
| | | | | | Fixes at least one machine that woke up from sleep / poweroff immediately. ok kettenis@, tested by kettenis and martijn@
* Store the acpi processor ID/UID in struct cpu_info, and use it to attachkettenis2016-07-281-3/+8
| | | | | | acpicpu(4) drivers to the right cpu(4). ok mlarkin@, guenther@
* The power management timer has been made optional in ACPI 5.0A, so don'tkettenis2016-06-101-2/+3
| | | | | | | | attempt to attach acpitimer(4) if the timer isn't present. Pointed out by jcs@ ok jcs@
* Make sure devices listed by a device's _DEP method are attached beforekettenis2016-05-081-2/+34
| | | | | | | | | | | we attach the device itself. The _DEP methode, introduced in ACPI 5.0, is a hint that the device in question depends on OpRegion support from the devices listed by _DEP, so we have to order them the proper way. To prevent us from attaching those devices again when we encounter them later walking down the device tree, keep track of our attempts to attach a device driver to them using aflag in the aml_node structure. ok guenther@
* We attach acpihpet(4) and acpiec(4) without using the HID, so do notpirofti2016-04-251-1/+3
| | | | | | report it in the dmesg. OK deraadt@, mlarkin@.
* Reduce dmesg spam by knocking out some acpi hardware IDs that don't need akettenis2016-04-021-2/+22
| | | | | | driver. ok mpi@
* Check if a device is present (using _STA) in acpi_foundhid. This preventskettenis2016-03-291-1/+8
| | | | | | | us from reporting devices as "not configured" that aren't actually present, and allows us to remove duplicated code from several drivers. ok deraadt@, ok jsg@
* Implement a cleaner way to prevent acpivout(4) from attaching if we havekettenis2016-03-291-21/+3
| | | | | | a platform-specific method of controlling the backlight. ok millert@, mlarkin@, jung@
* Adding each and every new acpi device driver to acpi_foundhid() iskettenis2016-03-281-25/+5
| | | | | | | | | | | | | | gettinga bit of the burden. And it really isn't how our autoconf framework is supposed to work for busses that can be enumerated. All the drivers already check for a matching _HID in their attach function. So we can just drop the checks in acpi_foundhid() and let the drivers sort themselves out. Print a "not configured" line for devices for which we don't attach adriver. This may be a bit much as there are devices for which we will not have a driver. This will be removed if it causes too much dmesg spam. ok deraadt@, mlarkin@
* Take acpi_foundhid() outside of #ifndef SMALL_KERNEL so the ramdiskjsg2016-01-171-9/+11
| | | | kernel can find and attach dwiic(4) and sdhc(4).
* remove an unused global variablejsg2016-01-171-2/+1
|
* Attach dwiic(4) on the Intel Bay Trail i2c controllers as well.kettenis2016-01-141-2/+3
|
* Improve emulation of PM registers on Hardware-redcued ACPI by emulatingkettenis2016-01-121-6/+56
| | | | | | | | SPL_TYPx, SLP_EN and WAK_STS using the new SLEEP_STATUS_REG and SLEEP_CONTROL_REG registers. Makes the transition into S5 (powerdown) work on the ASUS X205TA. ok deraadt@, mlarkin@
* Add dwiic, a driver for the Synopsys DesignWare i2c controller foundjcs2016-01-121-23/+45
| | | | | | | | | | | | | on the Samsung ATIV Book 9 laptop. This initial version only supports ACPI config/attachment. Add ihidev, a HID-over-i2c driver largely based on uhidev. dwiic handles attaching ihidev devices found in ACPI. Add ims, a HID-over-i2c mouse/trackpad driver to get basic cursor and button functionality from HID-compliant i2c trackpads. ok kettenis deraadt
* Make sdhc(4) attach to hardware IDs "80860F14" and "PNP0FFF".kettenis2016-01-111-2/+3
|
* Initial support for Hardware-Reduced ACPI. This skips the legacy mode checkskettenis2016-01-091-2/+21
| | | | | | | by emulating the PM_CNT register such that SCI_EN is always enabled. It also skip attaching acpitimer(4) since the relevant registers are no longer there. ok deraadt@, mlarkin@
* Follow the spec and check the SCI_EN bit to see if ACPI has alreadykettenis2016-01-061-7/+23
| | | | | | | | been enabled and don't bother enabling it again if it is. This should fix systems that don't implement legacy mode and therefore set ACPI_ENABLE and ACPI_DISABLE to zero. ok mlarkin@, yasuoka@