summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
AgeCommit message (Collapse)Author
2007-11-10do not check malloc return value against NULL, as M_WAITOK is usedCharles Longeau
ok marco@
2007-11-08Pass correct pointers to memcpy when concatanating strings/buffersCan Erkin Acar
ok weingart@, marco@
2007-11-08convert the value to a string instead of using aml_val2str()Can Erkin Acar
which returns invalid pointers if the value is not a string, causing acpibat to panic, as reported by mbalmer@ and Alexey Suslikov. tested by Alexey Suslikov, ok marco@
2007-11-06all ACPI_ENABLE kernels need acpi_interrupt()Theo de Raadt
2007-11-06move acpi_read_pmreg() and acpi_write_pmreg() out of SMALL_KERNEL soTheo de Raadt
that acpi ramdisks can compile (obvious solution)
2007-11-05Establish the acpi interrupt earlier. Fixes problems with someCan Erkin Acar
GENERIC.MP kernels not getting acpi interrupts. This is a workaround until the real issue with late establishment is fixed. ok weingart@, beck@, gwk@
2007-11-05Use the acpi_{acquire,release}_global_lock() to implement the globalTobias Weingartner
functionality for ACPI. Has not shown any regressions, and may solve some EC race conditions. Ok gwk@, canacar@, ckuethe@
2007-11-04Check for non-zero address if mapping to the extended addresses.Mike Belopuhov
Patch from Oleg Safiullin (a.k.a form@) ok kettenis canacar weingart
2007-11-03Notebook from ckuethe@ that notifies AC with 0x01, so add that in.Can Erkin Acar
cool ckuethe@
2007-11-03ACPI allows the OS to identify itself in a couple of ways and may behaveChris Kuethe
differently based on what OS is running. This diff causes us to run the RedmondOS code path in hopes that it is "better" AML, or has better settings for machine that do not support _OSI. This is the same method used by other non-Redmond operating sytems. suggestions/ok deraadt, agonized whimpers from the others.
2007-11-03Remove a useless printf, hit if acpicpu is disabled.Gordon Willem Klok
ok beck@
2007-11-03Added support for displaying wakeup devicesJordan Hargrave
ok beck@,weingart@,gwk@
2007-11-03Add missing else so that Concatanation of two buffers work.Can Erkin Acar
Noticed by robert@ while diagnosing a problem report by Johan Lindman. ok weingart@
2007-11-03Fix setting values to buffers by obeying the conversion rules.Can Erkin Acar
The values are truncated or zero extended as required. The spec is somewhat ambigious on strings and integers requiring truncation "before copy" so we try to be safe and zero terminate the buffer in case the source is string. Reported by ckuethe@, diagnosis, initial diff and feedback by kettenis@ ok kettenis@, beck@, weingart@, robert@, gwk@, ckuethe@
2007-11-03less colonsTheo de Raadt
2007-11-03Remove those words...Chris Kuethe
2007-11-03repair attach messages; ok gwk canacarTheo de Raadt
2007-11-03ACPI allows the OS to identify itself in a couple of ways and may behaveChris Kuethe
differently based on what OS is running. This diff causes us to run the WinNT code path in hopes that it is "better" AML, or has better settings for machine that do not support _OSI. This is the same method used by other non-windows operating sytems. ok gwk, beck, jordan
2007-11-03Changed aml_parselength to use incremental length calcJordan Hargrave
ok canacar@
2007-10-11When walking the tree yo find _PRT methods, check whether the device isMark Kettenis
actually enabled and functioning. Similar to what we do for _INI. ok weingart@, beck@
2007-10-08More simple memset(,0,) -> M_ZERO changes. In this batch move toKenneth R Westerback
size(*p) as the first malloc() parameter where p is declared locally and thus easy to check. Add M_ZERO to gpe_table allocation in acpi.c even though there is no obvious bzero or memset nearby.
2007-09-13Remove unnecessary memset() (see aml_evalnode(9)) and a bit of KNF.Michael Knudsen
ok toby
2007-09-13Implement ACPI 6.5.1 spec tree walk for _STA and _INI.Tobias Weingartner
Fixes mk's laptop. No regressions so far (thank you to the testers). ok gwk@, mk@, marco@
2007-09-08Case ranges e.g. case 'A' ... 'Z': are a gcc-ism not valid C. Fix these, andGordon Willem Klok
a bit of whitespace cleanup while here. ok otto, deraadt
2007-09-07Fix code that figures out the PCI bus number for a _PRT configuration object.Mark Kettenis
This should get rid of the "multiple bus 0" problem seen on some machines, and fix PCI interrupt routing on them. ok marco@ (a while ago)
2007-06-23Accept 0x00 as notify type since some notebooks (MSI-S260)Can Erkin Acar
incorrectly use it when signaling events. ok marco@
2007-06-15Check that sc_notify actually points to something before attempting to callGordon Willem Klok
it. Fixes marco@'s post c2k7 panics. ok marco
2007-05-31Make powernow-k8 on amd64 and i386 use the _PSS object from acpi toGordon Willem Klok
retreive p_state data as spelled out in the amd64 bios and kernel developers guide. This code is still a little rough around the edges but has been tested by myself on a tyan machine and by phessler at theapt dot org on an HP DL145. This diff also takes a first stab and cleaning up the acpicpu dmesg spam. ok tedu, marco
2007-05-28fix build when ACPI_DEBUG is definedRobert Nagy
2007-05-28Eliminate unsightly blank lines in dmesg.Kenneth R Westerback
ok marco@
2007-05-06at least always print a new line, even if NOPSSTed Unangst
2007-04-23When receiving an undock request, walk the list of dependant devicesMichael Knudsen
and pull their _EJ0 knobs before undocking. This ejects any dependant devices (if necessary) before actually undocking. Without this, the usb hub in my X6 gets upset when it's suddenly kicked off the system without warning, and upon redocking it attaches as uberry. Now it's behaving as it should.
2007-04-23When adding a device node to the list of dependant devices, don't addMichael Knudsen
the _EJD node. Instead, add the parent actual device node instead which makes more sense and makes sure that it doesn't matter if the _EJ0 node under a device node comes before the _EJD node.
2007-04-23In acpidock_softc, change sc_sens from being a one element long array toMichael Knudsen
simply being a single struct ksensor.
2007-04-23spacing and some really long linesGordon Willem Klok
2007-04-22Whitespace cleanup.Michael Knudsen
2007-04-22Remove unnecessary local variable in acpidock_status() and kill an XXXMichael Knudsen
by using STA_PRESENT instead of home-brewed value.
2007-04-22Add a TAILQ, aml_nodelist, of devices depending on the dock device toMichael Knudsen
struct acpidock_softc and stuff devices into it during attach. This list is not yet used, but I have code ready to handle the ACPI side of this. However, it still doesn't handle that there may in fact be multiple dock devices in a machine (e.g. on pre-60 series ThinkPads), but I need to figure out how to do so properly first. In the mean time I want this in the tree so I don't lose the code.
2007-04-17Now that acpidock no longer hangs machines during boot (at leastMichael Knudsen
according to the reports I've been getting) it should be safe to enable it again, so remove the #if 0 stuff around it. ok marco
2007-04-17Fix a really emberrassing bug: Do not unconditionally call _DCK with aMichael Knudsen
parameter of 1 (dock). This was causing acpidock to attempt to dock even if the machine was not in its dock which was causing hangs on pre-60 series ThinkPads. It was also causing my X60 to not see NOTIFY 0 (dock) messages which would initiate the docking sequence. Diff from Matthew R. Dempsky. Tested on X60 by me, on T42/43 by brad, ckuethe, reyk, Johan M:son, and on T21 by reyk. I think someone also tested on X40/41 but I don't remember who. Thanks a lot.
2007-04-16Fix debug info when docking/undocking so it tells users what they needMichael Knudsen
to know: acpidock0: undock: status undocked acpidock0: dock: status docked This gets rid of all the garbage output that I used long ago.
2007-04-11Added changes for C-StateJordan Hargrave
ok marco@
2007-04-06Fix a strange typo and don't set sc_docked in acpidock_dockctl(). It'sMichael Knudsen
being handled by acpidock_status(). From Matthew R. Dempsky who had another chunk in his diff that I didn't include. It's correct, but it seems to cause some strange regression on my X60 that I need to look into first.
2007-03-26Don't leak memory.Marco Peereboom
From giovanni <qgiovanni@gmail.com>
2007-03-26Calculate minutes left more accurately.Marco Peereboom
From giovanni <qgiovanni@gmail.com>
2007-03-23Fix set to already set localJordan Hargrave
ok marco@
2007-03-22split userland & kernel struct sensor/sensordev so that the additionTheo de Raadt
of new fields in the future is less disruptive. This is done similar to how struct proc is handled for ps(1). ok jmc (man page changes) tested fkr simon, and more suggestions from millert
2007-03-20Use aml_val2int() instead of accessing v_integer directly.Michael Knudsen
`sort of ok' marco (before lock)
2007-03-03Stop looking for acpidock until we fix that stuff that breaks all pre-60Michael Knudsen
series ThinkPads with acpidock(4) enabled.
2007-02-27please, check it compiles before you commitTheo de Raadt