summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpicpu.c
AgeCommit message (Collapse)Author
2022-04-06constify struct cfattachChristian Weisgerber
2022-01-09spellingJonathan Gray
feedback and ok tb@ jmc@ ok ratchov@
2021-08-01whitespaceMark Kettenis
2020-09-27Make sure acpicpu(4) doesn't attach to Processor nodes that happen to haveMark Kettenis
a _HID. Should fix the issues with broken AML that Janne Johansson reported. This issue should be fixed in a more generic way, but that is too risky for the upcoming release. tested by jmc@ ok deraadt@
2020-08-27Reorder the acpi attach process so we look at Processor() CPU nodesJonathan Matthew
after Device() ones, since we should prefer the newer node type. If we see any Device() nodes, don't attach acpicpu(4) to any Processor() nodes if they're also present. This also makes acpitz(4) and acpipwrres(4) devices attach slightly later. ok kettenis@, also tested by jmc@
2020-08-26Let aml_copyvalue() handle AML_OBJTYPE_DEVICE.Mark Kettenis
ok jmatthew@
2020-08-10Remove the acpicpu_sc array and instead locate acpicpu instances usingJonathan Matthew
the ci_acpicpudev pointer in struct cpu_info. This simplifies matters when we have lots of cpus. ok kettenis@
2020-05-27limit clflush before monitor errata workaround to IntelJonathan Gray
no functional change as clflush is currently only done on Intel
2019-10-16Remove trailing whitespace from a lineMike Larkin
2018-09-19Delete checks of the CST bit_width ('vendor') field, as new Ryzen machinesPhilip Guenther
are showing up with vendor 2 and it doesn't seem to mean anything: Linux doesn't check it at all, so this exhibits all the normal ACPI spec lossage tested in snaps for a few weeks shrug kettenis@
2018-06-29Use <stdint.h> types.Mark Kettenis
ok mpi@, jung@, krw@, 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-04-27track size of pss allocation, so that length can be passed to free(9)Theo de Raadt
ok mlarkin
2017-04-07Simplify the size calculation for memset()Philip Guenther
From Anton Lindqvist (anton.lindqvist(at)gmail.com)
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-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-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-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-03-17Replace curcpu_is_idle() by cpu_is_idle() and use it instead of rollingMartin Pieuchot
our own. From Michal Mazurek, ok mmcc@
2016-03-14Correct the value of SRT_ENDTAG: it was documented incorrectly in earlyPhilip Guenther
ACPI specs. With the correct value, it can now be used in a few places instead of hardcoding 0x79. ok kettenis@
2015-12-29Remove NULL-checks before free().mmcc
ok tb@
2015-12-23add aml_freevalue in a couple places, avoid storing a result thatJoshua Stein
would need to be freed in a couple other places with deraadt
2015-09-12Intel docs suggest that cpus in C3 may go into deeper states automaticallyPhilip Guenther
when all cores are in C3, so treat the latency+power values from ACPI as advisory and stop skipping states based on them. ok mlarkin@ kettenis@
2015-09-11Workaround broken AML by treating FFH vendor 8 the same as vendor 1 (== intel)Philip Guenther
ok millert@ kettenis@ and something like an ok mlarkin@
2015-08-04Skip C2 and C3 states from the FADT if the cpu doesn't have ARAT.Philip Guenther
problem reported by patrick keshishian (pkeshish (at) gmail.com) based on diff from mlarkin@, ok mlarkin@ deraadt@
2015-08-04If we are setting ACPI_PM1_BM_RLD do it only once, and remember toTheo de Raadt
repeat this action at resume time. ok mlarkin guenther
2015-08-04Provide the fallback C1-via-halt even when _CST can't be evaluated.Philip Guenther
Fixed systems that only provide _CST for a subset of the CPUs. Problem reported by <david.a.baer (at) gmail.com> ok mlarkin@ deraadt@
2015-07-18If _CST provides a C2 or C3 but lacks a C1 that we understand, provide aPhilip Guenther
fallback C1 state using 'halt' tested in snaps for a bit problem laptops noted by and oks okan@ and kettenis@
2015-06-13Parse _CST objects and use the C-states they describe when they're sane.Philip Guenther
testing by many, particularly krw@ and jcs@ tweaks by kettenis@ ok deraadt@
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2014-12-09Replace some malloc(n*size,...) calls with mallocarray().Doug Hogan
ok tedu@ deraadt@
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-11Fix invocation of _OSC. We were passing the capabilities in the wrong DWORDMark Kettenis
and specifyig the wrong DWORD count. Moreover we should not evaluate _PDC if _OSC is present. Might not be perfect yet, but what we had previously was uterrly and totally wrong. ok guenther@
2014-05-21Fix invalid / missing format specifiers in several dnprintf statementsMike Larkin
(used only when ACPI_DEBUG is enabled) From a diff on tech@ by Fabian Raetz, with a minor change by me, tested on i386 and amd64 with ACPI_DEBUG enabled and disabled.
2010-07-21spacing and indents that are driving me crazyTheo de Raadt
2009-08-29typos in commentsMiod Vallat
2009-06-23Ignore the PCT if the PSS has zero entries, only becameGordon Willem Klok
a problem after we started striking entires for containing junk and /* should never happen */ happened. Fixes PR 6175 confirmed by submiter: nick templeton nick @ nicktempleton.com ok marco@
2009-06-10Re introduce the _PDC code backed out before 4.5, in addition to evaluating theGordon Willem Klok
PDC (which tells the ACPI code what we as OSPM are capable of) we also evaluate the OSC method on the acpicpu device. Original cause of problems that resulted in this getting backed out appear to be fixed by the mp_setperf change, so hopefully the third time is the charm. Tested by many. ok marco@
2009-02-24back out est.c 1.8 and bring acpicpu.c all the way back to 1.47 because ofTheo de Raadt
hanging machines. backed out correctly this time, as pointed out by tedu.
2009-02-24Backout a backout because noone knows what the hell the backout is aTheo de Raadt
backout of. COME ON. Be exact in your commit messages.
2009-02-18Backout PDC & PPC changes because it hangs several laptops.Marco Peereboom
2008-12-22With respect to the previous diff we cannot just call acpicpu_setperfGordon Willem Klok
directly, we must call the global function pointer cpu_setperf because we might be on an MP system and if we don't, we only attempt to change the frequency on a single core. ok marco@
2008-12-22Make acpicpu_setperf behave the same as the ACPI aware EST andGordon Willem Klok
powernow drivers if the _PPC is evaluated because an external change has occured such as being disconnected from wall power and the available states in _PSS change. Have the acpicpu setperf driver register a listner for _PPC changes, that way we are not calling the setperf method twice on powernow machines when an change occurs. ok marco@
2008-11-22Re-enable ACPI PDC support and fetching cpu performance statesGordon Willem Klok
from ACPI for est on amd64. This incorporates a few changes from krw@ to fix minor nits, its unlikely to fix the problems with some machines from acer and dell but lots of machines benefit. ok krw@
2008-10-11Fix various printf constructs either missing arguments or format specifiers.Miod Vallat
2008-08-08'prey' -> 'pray' in comment as prayer rather than predation seemsKenneth R Westerback
the intended meaning.
2008-08-06Backout the acpicpu_setpdc code and the code to allow est to use acpicpuGordon Willem Klok
on amd64. Evaluating the _PDC seems to lead to instability (PR5878 and a report by jmc@) on lower end machines its too close to release and I don't have enough nickels. ok deraadt@
2008-06-15On AMD64 running on Intel processors with EST add support for retreivingGordon Willem Klok
operating points from ACPI. In support of this add evaluation of the _PDC object and give it the capability flags asserting OSPM management of CPU power states. ok marco@, canacar@
2008-06-01Re-enable new parser. Lots of testing by various folks. Fits all mediaMarco Peereboom
now too. ok kettenis deraadt