summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpi/acpipwrres.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Our ACPI namerefs are pointers to the byte structures for ACPI names.patrick2021-03-101-2/+3
| | | | | | | | | | | | These are not in a printable format, hence printing them as string is wrong. Additionally, aml_searchrel()/aml_searchname() expect the name to be passed in a printable format as well. Passing a nameref can lead to an out-of-bounds read, and the comparison can fail. Hence make sure that namerefs are passed to aml_getname() first, which returns printable strings. Note that aml_getname() uses a static buffer, so there are a few restrictions how the string can be used. ok kettenis@
* Fix some issues with referencing named ACPI nodes from Packages.kettenis2020-12-171-3/+3
| | | | | | | | | | | | | | | | | These references need to be resolved at runtime rather than when they're parsed such that they pick up the right values for those nodes which can be changed when for example _INI methods run. The current approach is to replace these reference with a string that names the node in question. The problem with that is that packages can also contain normal strings. Which means that we need special code that depends on the context where the package is used. This diff takes a different approach by retaining a reference when parsing. Code that uses a package will need to resolve this reference but there is no ambiguiety anymore. ok patrick@
* Update my email address.pirofti2020-04-061-2/+2
|
* remove uneeded proc.h includesjsg2014-09-141-2/+1
| | | | ok mpi@ kspillner@
* do not put a second : in a dmesg line, use , insteadderaadt2013-12-171-2/+2
|
* Add support for Power Resources for Dx states and the necessary hookmpi2013-11-061-64/+176
| | | | | | | | | | | | | | | | for PCI devices. This hook should be called twice, before and after changing the power state of a PCI device. Before setting the device to the new state, the ACPI layer will notify every power resources linked to the device for that state and make sure they are turned "_ON". After changing the state of the device, it will decrement the reference of every power resources linked to that device for the old state and turn them "_OFF" if they are no longer referenced. This fixes the no-USB after resume problem seen on various ThinkPad, problem initialy diagnosed with Alexander Polakov. ok kettenis@, deraadt@
* spacing and indents that are driving me crazyderaadt2010-07-211-10/+10
|
* Cleanup aml_find_node callsjordan2010-06-271-5/+5
|
* Invoke malloc() with the correct sizeof value in acpipwrres_foundcons().miod2009-09-021-2/+2
| | | | | | This was harmless but eating too much memory. ok pirofti@
* Import acpi power resource driver. This is needed for suspend/resume logic.pirofti2009-06-031-0/+210
Okay jordan@ and marco@.