summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
AgeCommit message (Collapse)Author
2017-01-14Revert aml_rdpciaddr changes; breaks several machines that were workingMark Kettenis
before.
2017-01-11Increase the size of the buffers used for _HID and _CID strings to beJonathan Gray
able to fit "Hyper_V_Gen_Counter_V1". ok mlarkin@ deraadt@
2017-01-10Hyper-V hosts make 64 bytes of entropy available to guests in the formJonathan Gray
of a OEM0 ACPI table. acpihve(4) feeds this data into the kernel entropy pool. This is less interesting for machines with rdrand, but there are still pre ivy bridge machines running Hyper-V (including parts of Azure). ok mikeb@ reyk@ deraadt@ mlarkin@
2017-01-08Make aml_rdpciaddr() work for for devices behind bridges. The code nowMark Kettenis
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@
2016-12-23Add missing sentinel.Mark Kettenis
ok deraadt@
2016-12-18Remove comparison of array which is always non-NULL. Fixes clang warning.Mark Kettenis
ok jca@ (a while back)
2016-10-25Deduplicate the CRS parsing code and handle broken ACPI implementations.Paul Irofti
This change was prompted by a report from Ilya Kaliman where acpiec(4) failed to initialize on his Acer Aspire S7. Further investigations showed that the machine had 4 instead of 2 resources defined inside the EC device which is a violation of all existing ACPI revisions. We now handle such machines by using the aml resource parser directly, which lead to the removal of the existing one from acpiec.c, and ignoring extra resources (although they are reported in the dmesg). In the process I also done a couple of more style(9) fixes. Suggested by and ok guenther@
2016-10-25Add the resource index to aml_parse_resource() callback function.Paul Irofti
This is needed by an upcoming acpiec commit that handles machines breaking the current ACPI specifications. Change suggested by and ok kettenis@, guenther@
2016-10-21Add support for the ACPI timer opcode.Joris Vink
ok kettenis@
2016-10-04At acpithinkpad attach time determine the value of the mute, and deferTheo de Raadt
telling the audio subsystem about this later on in boot. (Mute state is maintained by the BIOS over a suspend, hibernate, reboot, etc -- this may be last missing piece of the puzzle we tore our hair out in Brisbane) diagnosis and code by Anton Lindqvist, ok ratchov
2016-09-27Print the type of operation space that failed as there seem to be more ofMike Larkin
these occurring recently.
2016-09-18If the APIC table (MADT) isn't present then ci_acpi_proc_id won't be setPhilip Guenther
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@
2016-09-17Report a LAPIC address override entry in the dmesg if it doesn't matchPhilip Guenther
the normal one ok kettenis@ mlarkin@
2016-09-16Suppress debugging output about CSD entries that say nothing we care aboutPhilip Guenther
and improve the output for those we might. output examples from mikeb@ ok kettenis@
2016-09-07revert part of 1.18 which caused a regression with at least one ikbdJoshua Stein
device reported by Callum R. Davies
2016-09-03Write the system time back to the RTC every 30 minutes.Christian Weisgerber
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@
2016-09-02Remove unused argument in aml_showvalue().Paul Irofti
The second argument of aml_showvalue() was probably supposed to set the verbosity level through dnprintf() but in fact it does nothing. OK deraadt@
2016-09-01add iatp(4), a driver for the i2c touchpad and touchscreen found onJoshua Stein
the chromebook pixel
2016-09-01for broadwell HIDs, apply a magic write found in linux that isJoshua Stein
required in order to talk to certain i2c slave devices behind dwiic
2016-09-01- disable controller when we're done using itJoshua Stein
- read CLR_INTR register when disabling interrupts
2016-09-01- separate hid and ihidev attachment for upcoming driversJoshua Stein
- move power control into a dedicated function - sprinkle aml_freevalue
2016-08-31Don't put a device in the wake device list if _STA says it's not there.Mike Larkin
Fixes at least one machine that woke up from sleep / poweroff immediately. ok kettenis@, tested by kettenis and martijn@
2016-08-23don't enter burst mode for single-byte reads and writes.Joshua Stein
avoids problems on hardware with broken or unimplemented burst mode and isn't really necessary for such small transactions anyway. matches what linux and freebsd have done for a long time. tested in snaps ok deraadt kettenis
2016-08-03add a minimal TPM 1.2 driver just to issue a "save state" commandJoshua Stein
before suspending, in order to fix suspend/resume on some newer machines. more cleanup and TPM 2.0 support coming later. earlier version ok pirofti ok deraadt
2016-07-30add acpials(4), an acpi driver for ambient light sensorsJoshua Stein
hw.sensors.acpials0.illuminance0=11.00 lx (ambient light sensor)
2016-07-28Store the acpi processor ID/UID in struct cpu_info, and use it to attachMark Kettenis
acpicpu(4) drivers to the right cpu(4). ok mlarkin@, guenther@
2016-07-27after system resume, re-write backlight levelJoshua Stein
2016-07-10Pay attention to Processor Local X2APIC structures. ACPI 6.0 allows theseMark Kettenis
even for APIC ID values less than 255. Makes secondary CPUs attach on the HP DL360 gen 9. tested by jung@ ok guenther@
2016-07-10Rename apic_proc_uid field to acpi_proc_uid in the acpi_madt_x2apic struct.Mark Kettenis
It is the ACPI processor UID that is stored here. ok guenther@
2016-07-01add a simple keyboard backlight driver for some chromebooks,Joshua Stein
adjustable with wsconsctl keyboard.backlight ok bmercer, kettenis
2016-06-16enable suspend/hibernate fn keysGiovanni Bechis
ok mlarkin@
2016-06-10The power management timer has been made optional in ACPI 5.0A, so don'tMark Kettenis
attempt to attach acpitimer(4) if the timer isn't present. Pointed out by jcs@ ok jcs@
2016-06-08attach acpitoshiba(4) on more Toshiba laptopsGiovanni Bechis
ok pirofti@
2016-05-24Disabling active cooling trip points when we lack the right method to operate.Sebastien Marie
Problem reported by James Hastings. ok dcoppa@ mlarkin@
2016-05-08Add support for level, active low gpio interrupts.Mark Kettenis
2016-05-08Add support for writing gpio pins.Mark Kettenis
2016-05-08Make sure devices listed by a device's _DEP method are attached beforeMark Kettenis
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@
2016-05-08Call _REG to register GeneralPuproseIo address space support.Mark Kettenis
2016-05-08Plug some memory leaks and do proper cleanup in error paths.Mark Kettenis
2016-05-08Add macros for interrupt trigger mode as encoded in GPIO resources.Mark Kettenis
2016-05-07Add chvgpio(4), a driver for the GPIO controllers found on Intel's Cherry ViewMark Kettenis
SoC.
2016-05-07Implement ACPI 5.0 GeneralPurposeIo OpRegion support. This basically allowsMark Kettenis
AML to peek and poke at GPIO pins as if it were reading and writing registers. For now this only implements peeking at pins. It will print a message if AML attempt to poke at a pin. And it will panic if the assumptions made in the code are violated. ok mlarkin@
2016-05-07Add defines for Operation Region Address Space Identifiers and use them whenMark Kettenis
acpiec(4) calls the _REG method. ok mlarkin@
2016-05-05Return ENOTTY in acpithinkpad backlight get/set ioctls if the maximumJonathan Gray
value is 0 to match the behaviour when the callbacks are not set. Prevents a divide by zero in wsconsctl(8) reported by Caspar Schutijser. earlier version ok jung@ deraadt@ kettenis@
2016-05-04Don't mask pins configured as direct IRQ. Those are tied directly to the APICMark Kettenis
and don't generate a GPIO controller interrupt. Masking them menas devices relying on those APIC interrupts will break. Unbreaks the keyboard on the Asus x205ta, which got broken in rev 1.6.
2016-05-03Print missing newline if we bail out because of a uid mismatch.Mark Kettenis
2016-04-30Mask all gpio interrupts when we attach. Fixes interrupt storm on the LenovoMark Kettenis
Ideacentre Stick 300.
2016-04-30Implement DMA support. Bits and pieces taken from NetBSD, but we onlyMark Kettenis
support ADMA2. The older SDMA mode has too many limitations to be really usable. Gives us only moderate speed improvements, bus reduces the CPU load considerably. We will reap the full benefits once we implement wider bus widths and high speed modes. There is a remining issue with simultanious use of eMMC and external SD card on (some) Intel Bay Trail hardware. Still under investigation. ok patrick@, stsp@, deraadt@
2016-04-26Remove debug printfs, but do print "gpio" to indicate that card detection isMark Kettenis
done through a gpio pin instead of the standard register.
2016-04-26corrects acpitz problem with active cooling and hysterisisSebastien Marie
"if the temperature is below the active cooling level for a tz, turn the fan off regardless of what state it is currently in" ok mlarkin@