summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
AgeCommit message (Collapse)Author
2018-03-27Add acpicmos(4), a driver that implements SystemCMOS OperationRegionMark Kettenis
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@
2018-03-14On newer machines IPMI attaches only using the ACPI tables instead ofPatrick Wildt
the SMBIOS table. Some machines even have IPMI defined in both tables. This attachment driver makes ipmi(4) available via ACPI. There can only attach one ipmi(4) device, either on ACPI or SMBIOS. Akin to the SMBIOS-attached ipmi(4) this driver is disabled by default. Feedback from jsg@ ok deraadt@
2018-02-19Remove almost unused `flags' argument of suser().Martin Pieuchot
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@
2018-02-10Syncronize filesystems to disk when suspending. Each mountpoint's vnodesTheo de Raadt
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.
2018-02-08After flushing disks, try again to release all memory. We don't need toTheo de Raadt
save dirty memory to the hibernate space.
2018-02-08Toss all releaseable memory, because fragmentation can get in the wayTheo de Raadt
of allocating the hibernate playpen.
2018-02-08sr_quiesce() is a new approach for ensuring that softraid drainsTheo de Raadt
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...
2018-01-19dwiic: cleanup function prototypes after ACPI/PCI splitJoshua Stein
2018-01-17Disable ACPI burst mode on the 2015 Chromebook Pixel, where it freezes.Anthony J. Bentley
Diff from jcs@, ok pirofti@
2018-01-04Implement support for calling EFI runtime services and use it to implementMark Kettenis
a time-of-day clock device based on the GetTime() and SetTime() services. The virtual memory mappings for the runtime services calls are implemented through a separate pmap that is only activated when we make a runtime services call. ok tom@, visa@ tested by naddy@
2017-12-03Enumerate all i2c devices on the bus. Mark their nodes as attached evenMark Kettenis
if we didn't attach a device driver to avoid enumerating them again in the acpi device tree walk. ok deraadt@
2017-11-30Per https://patchwork.kernel.org/patch/5838821/, the documented check of ACPIPhilip Guenther
mwait info against CPUID is wrong; loosen the test per Intel's suggestion. While here, fix the wrapping of dmesg lines when reporting bogus C-state info. ok mlarkin@ kettenis@ (who pointed out the email from Intel)
2017-11-29Add support for GPIO-signaled events.Mark Kettenis
ok mlarkin@
2017-11-29Revise OperatingRegion code to make it extensible and have chvgpio(4)Mark Kettenis
provide the OEM defined regions that are used by the AML on some Cherryview-based machines. ok mlarkin@
2017-11-16Add PCI attachment for dwiic(4) needed by Intel 100 Series machinesJoshua Stein
ok kettenis
2017-11-14Add a few more PNP IDs to the skip lists.Mark Kettenis
ok deraadt@, mpi@
2017-10-12Add missing size to free(); ok deraadt@ mpi@anton
2017-10-06Recalibrate TSC timecounter with HPET and PM timerMike Belopuhov
If frequency of an invariant (non-stop) time stamp counter is measured using an independent working timecounter that has a known frequency, we can assume that the measured TSC frequency is as good as the resolution of the timecounter that we use to perform the measurement. This lets us switch from this high quality but expensive source to the cheaper TSC without sacrificing precision on a wide range of modern CPUs. From Adam Steen <adam@adamsteen.com.au> with tweaks from reyk@ and myself. Tested by brynet@, sthen@ and others, OK mlarkin, sthen
2017-09-07In toshiba_hotkey() initialize the ret value to failure as it isAlexander Bluhm
not set in all code paths. found by clang -Wuninitialized; OK deraadt@
2017-09-06fix commentJoshua Stein
2017-09-04Don't require exactly 20 elements in the _BIX package if at least 20Joshua Stein
are returned since extras may be OEM-specific values we end up ignoring anyway, such as on the Lenovo X1C 5th Gen which returns 21 elements. ok mpi
2017-08-17Mark the nodes for acpi devices that attach to dwiic(4) as attached such thatMark Kettenis
we don't try to attach them again. ok jcs@, mlarkin@, stsp@
2017-08-17Make dwiic(4) attach its ACPI parent dependencies.Stefan Sperling
This change makes the Asus E200HA keyboard work. Original analysis and patch by Cesare Gargano ok kettenis@
2017-08-12ignore unknown/boring events by default, which modern thinkpads haveJoshua Stein
a lot of. put the spam behind an ACPITHINKPAD_DEBUG define which can be used when adding support for actually useful buttons. previous version ok deraadt, phessler, and kettenis
2017-08-09Add "PNP0303" (8042 PS/2 Controller) to acpi_isa_hids[]David Coppa
ok kettenis@
2017-07-25fallback on _BIF properly when _BIX exists and returns a packageJoshua Stein
successfully but has an unexpected length, as on the X1C gen 5 tested by naddy
2017-07-22acpibat: look for _BIX first before falling back on _BIFJoshua Stein
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
2017-07-20Start a list of isa(4) device names such that we can avoid printing themMark Kettenis
as "not configured". ok mikeb@, millert@, deraadt@
2017-06-30Fix a format string specifier error in a debug printf.Mike Larkin
Noticed and reported by Fasse: fasse dot f2 at gmail dot com Thanks.
2017-05-28Remove a redundant assignment introduced in revision 1.219 but favor theanton
assignment outside of the conditional. ok stsp@
2017-05-25Add a header with EFI/UEFI-related definitions for use by the kernel. ForMark Kettenis
now this only contains definitions for parsing the EFI memory map. I anticipate adding limited support for the EFI system table and some of the EFI runtime services, but not much more. ok mlarkin@, patrick@, tom@
2017-04-27track size of pss allocation, so that length can be passed to free(9)Theo de Raadt
ok mlarkin
2017-04-15Fix format string in ACPI_MEMDEBUG blockPhilip Guenther
From Anton Lindqvist (anton.lindqvist(at)gmail.com)
2017-04-08Sensors are run as callbacks inside tasks. During suspend a sensorTheo de Raadt
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
2017-04-08Two prototypes for acpi_maptable; merge to one placeTheo de Raadt
2017-04-07Simplify the size calculation for memset()Philip Guenther
From Anton Lindqvist (anton.lindqvist(at)gmail.com)
2017-04-02normalize order of arguments to if ()Theo de Raadt
2017-03-27Now that hibernate_alloc() only has clean success/failure, don'tTheo de Raadt
need to call hibernate_free() to clean up a partial mess. ok mlarkin kettenis
2017-03-13Don't attach on Apple hardware, asmc(4) is already providing anJoshua Stein
ambient light sensor. ok jung
2017-03-13Register for notifications on the subsystem (parent device) insteadJoshua Stein
of the HID device, gets SCI events working properly. But still keep ACPIDEV_POLL enabled just in case some systems never generate these, like acpibat does.
2017-03-13allow ramdisks to build; ok jcsTheo de Raadt
2017-03-12add const to struct cfattachJoerg Jung
ok jcs
2017-03-12try to attach acpisbs first and if successful, don't attach acpibatJoshua Stein
2017-03-11Revert 1.54, go back to always trying to enable burst modeJoshua Stein
Selectively enabling burst mode seems to have broken more machines than it helped. On MacBooks, EC_STAT_OBF occasionally won't show up when trying to read a byte of data when bursting hasn't been enabled, so acpiec_wait can spin forever. This again breaks on ECs that don't do burst at all, like the Chrome EC, but those are much more scarce than MacBooks at this time. A machine/bios-dependent check could be added later to disable bursting on certain machines. Discussed with deraadt
2017-03-07move a TODO to the topJoshua Stein
2017-03-02Add a new sysctl machdep.lidaction. The sysctl works as follows:Martin Natano
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
2017-02-28Untangle abstract sleep modes from ACPI sleep states. This paves the wayMartin Natano
for further work in the area. idea and ok deraadt ok mlarkin
2017-02-25move vendor HIDs into their drivers, clean up some unused definesJoshua Stein
ok kettenis
2017-02-25attach acpithinkpad to LEN0268 HID found on newer thinkpadsJoshua Stein
2017-02-22fix timeout loopJoshua Stein
from Anton Lindqvist