summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
Commit message (Collapse)AuthorAgeFilesLines
* Unbreak compiles with ACPI_DEBUG.kan2005-08-261-0/+2
|
* get current temperature from _TMP during passive cooling is active.ume2005-08-251-15/+33
| | | | it makes CPU freq transition smooth.
* initialize only ACPI_BUFFER to avoid race condition with passiveume2005-08-251-1/+8
| | | | | | | | | cooling thread which refers psv, tc1, tc2 and tsp. The previous code made the period where sc->tz_zone.tsp was zero, and it caused panic at msleep(). Reported by: keramida Tested by: keramida
* don't raise cpu speed over the value when passive cooling is inume2005-08-171-11/+24
| | | | | | | | effect. since CPU speed is restored by degrees, we cannot use the facility of saving cpu speed by CPUFREQ_set() effectively. so, we need to save the value when passive cooling is in effect. Repoeted by: Kevin Oberman <oberman__at__es.net>
* Modify the fix in rev 1.16 slightly. Instead of setting the cap to zero,njl2005-08-111-3/+2
| | | | | | just skip summing it if it's unknown. MFC after: 1 day
* When summing capacities, skip info from batteries that weren't present.njl2005-08-051-0/+4
| | | | | | | | Previously, we used all info (including -1 or "not present") which would keep the system from reaching 100% when charging. Reported by: Eric Anderson MFC after: 2 days
* don't do mutex locking around kthread_create() call.ume2005-08-041-4/+16
| | | | Reported by: Maxim Maximov <mcsi__at__mcsi.pp.ru>
* Add descriptions for the sysctls.njl2005-07-281-6/+10
| | | | MFC after: 1 day
* Zero the _BST, _BIF, and battinfo allocations. This is needed since wenjl2005-07-281-3/+3
| | | | | | | | later sum capacities for all batteries, even those that weren't actually present. We only need to do this for _BST but do it for all of them. Reported by: Eric Anderson MFC after: 1 day
* Correct the order of some if tests so that we don't complain about beingjhb2005-07-271-2/+2
| | | | | | unable to route an IRQ when we do route an IRQ ok but bootverbose is off. Reported by: Ben Kaduk minimarmot at gmail dot com
* Correct minor output bug. When the battery being queried is charging ornjl2005-07-251-0/+7
| | | | | | | | the overall discharge rate is 0, mark the battery remaining time as "unknown", not 0. Reported by: Eric Kjeldergaard MFC after: 4 days
* Rewrite the acpi_battery interface to allow for other battery typesnjl2005-07-235-524/+448
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (i.e., smart battery) and fix various bugs found during the cleanup. API changes: * kernel access: Access to individual batteries is now via devclass_find("battery"). Introduce new methods ACPI_BATT_GET_STATUS (for _BST-formatted data) and ACPI_BATT_GET_INFO (for _BIF-formatted data). The helper function acpi_battery_get_battinfo() now takes a device_t instead of a unit # argument. If dev is NULL, this signifies all batteries. * ioctl access: The ACPIIO_BATT_GET_TYPE and ACPIIO_BATT_GET_BATTDESC ioctls have been removed. Since there is now no need for a mapping between "virtual" unit and physical unit, usermode programs can just specify the unit directly and skip the old translation steps. In fact, acpiconf(8) was actually already doing this and virtual unit was the same as physical unit in all cases since there was previously only one battery type (acpi_cmbat). Additionally, we now map the ACPIIO_BATT_GET_BIF and ACPIIO_BATT_GET_BST ioctls for all batteries, if they provide the associated methods. * apm compatibility device/ioctls: no change * sysctl: no change Since most third-party applications use the apm(4) compat interface, there should be very few affected applications (if any). Reviewed by: bruno MFC after: 5 days
* Standardize __FBSDID identifiers.njl2005-07-2211-22/+33
| | | | MFC after: 2 days
* Implement passive cooling. It is enabled for tz0 by default whereume2005-07-181-13/+277
| | | | | | it is available. Reviewed by: njl
* Add a quirk for a motherboard whose acpi timer runs too fast.dwmalone2005-06-261-0/+8
| | | | | | Approved by: re (scottl) Approved by: nate MFC after: 2 weeks
* In newbus land, ivars can only be accessed for direct child, or whenimp2005-06-031-1/+1
| | | | | | | | | | | | | | | | | | | the driver has unholy private knowledge of its great-*cgrandchildren. The ACPI allocation routine lacked such knowledge when it tried to do a default allocation for all descendants, rather than just its immeidate children, so would access grandchild's ivar in an unsafe way. This could lead to a panic when devices were present which had no addresses setup by the BIOS, but which were later allocated in a lazy manner via pci_alloc_map. As such, only do the default allocation adjustments for immediate children. The manner that acpi_sysres_find accesses the resource list, used later in acpi_alloc_resource, is safe and proper so no additional test is needed there. This fixes a panic when probing an disabled ata controller on some newer intel blades. Reported by: dwhite
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-293-3/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* If devclass_get_devices() returns success but a count of 0, free thenjl2005-05-201-1/+4
| | | | | | | | | pointer. If kernel malloc(0) returns a valid pointer, it needs to be freed. If it returns NULL, it's ok to free this also. Submitted by: pjd Reviewed by: imp, dfr Obtained from: Coverity Prevent
* Use General definition for general notify.takawata2005-05-191-4/+2
|
* If there is a problem during probe, be sure to free up any resourcesnjl2005-05-121-2/+2
| | | | | | | | allocated for it. The normal exit case handles this correctly so we use it as well for errors. Submitted by: pjd Obtained from: Coverity Prevent
* Simplify the ACPI taskqueue implementation. Use a thread queue type insteadmarks2005-05-093-113/+38
| | | | | | | | of swi. This allows us to use the taskqueue_thread_* functions instead of rolling our own. It also avoids a double trip through the queue. Submitted by: njl Reviewed by: sam
* Add the tunable "debug.acpi.max_threads" to allow users to set thenjl2005-04-212-4/+10
| | | | | | | | | number of task threads to start on boot. Go back to a default of 3 threads to work around lost battery state problems. Users that need a setting of 1 can set this via the tunable. I am investigating the underlying issues and this tunable can be removed once they are solved. MFC after: 2 days
* Use AcpiUtStrupr() instead of strupr() as the latter will disappear inmarks2005-04-141-1/+1
| | | | | | future versions of acpica. MFC after: 2 weeks
* Probe PCI link devices early so that we turn them all off via _DIS beforejhb2005-04-141-0/+4
| | | | | | | | | we start turning any of them back on again. This works around a bug in some BIOSen that alias two different link devices for APIC vs ATPIC modes onto the same physical hardware link. Submitted by: njl Tested by: Antoine Brodin antoine dot brodin at laposte dot net
* Set CPU speed to 100% in acpi_throttle attach. This is needed for somenjl2005-04-101-1/+10
| | | | | | | | | systems that boot with this value at the lowest setting. Change the default boot config back to "leave frequency as BIOS set it". Also, fix buglet where acpi_throttle wouldn't be used if p4tcc was present but disabled by the user. MFC after: 1 week
* Advertise that we can handle unified SMP control of processor powernjl2005-04-101-2/+4
| | | | states, idling, etc. This has been supported since the cpufreq import.
* Fix support for _PDC by using the proper version/length format for thenjl2005-04-102-3/+24
| | | | | buffer. Also, reference the Intel document where the _PDC values were found. This now supports ACPI-assisted SpeedStep on my borrowed T42.
* Revert part of 1.19. We do want to set the count to 0 since otherwisenjl2005-04-071-2/+2
| | | | it would give false info to other parts of the driver.
* Don't free the _PSS buffer until after we check to see if we have no validjhb2005-04-051-2/+2
| | | | states as otherwise we will try to free the buffer twice.
* Add the acpi_get_features() method. This method is called on child driversnjl2005-04-043-28/+48
| | | | | | | | | | to see what features they may support before calling identify/probe/attach. This is necessary because the ACPI 3.0 spec requires driver support be advertised before running any methods. For now, the flags are as specified in for the _PDC and _OSC methods but we can support private flags as needed. Add an implementation of this for acpi_cpu. It checks all its children (notably cpufreq drivers) and calls the _PDC method to report the results.
* Always free the returned env pointer even it doesn't indicate we're innjl2005-03-311-2/+3
| | | | | | verbose mode. Found by: Coverity Prevent (via sam)
* Clean up resources properly if acpi_perf fails to attach. First, changenjl2005-03-272-8/+20
| | | | | | acpi_bus_alloc_gas() to delete the resource it set if alloc fails. Then, change acpi_perf to delete the resource after releasing it if alloc fails. This should make probe and attach both fully restartable if either fails.
* Serialize task queue by starting only one thread instead of three. Thisnjl2005-03-271-1/+1
| | | | | | | | may help with various interdependencies between subsystems. More testing is needed to understand what the underlying issues are here. Tested by: Juho Vuori MFC after: 2 days
* If a device_add_child fails (i.e. low memory situation), be sure to freenjl2005-03-272-0/+4
| | | | | | | the unused ivars also. Submitted by: pjd Obtained from: Coverity Prevent analysis
* Check for invalid frequencies after parsing the package. Keep a runningnjl2005-03-261-8/+19
| | | | | | | | count of valid frequencies and use that as the final package count, don't give up when the first invalid state is found. Also, add 0x9999 and expand our upper check to >= 0xffff Mhz [2]. Submitted by: Bruno Ducrot, Jung-uk Kim [2]
* Add support for bus_delete_resource() and make acpi_bus_alloc_gas() donjl2005-03-221-0/+18
| | | | this before setting a new resource.
* Attach acpi_perf early. Especially when it is being used to provide infonjl2005-03-201-1/+6
| | | | | to other devices, it needs to be attached first. (Multi-pass newbus probes would be a better solution.)
* Add the acpi_ec_read and write methods. This allows an external drivernjl2005-03-202-0/+65
| | | | | | | (like an EC/SMbus controller) to access the EC address space. Access is synchronized by the EcLock/Unlock routines in EcSpaceHandler(). Tested by: Hans Petter Selasky
* s/SLIST/STAILQ/phk2005-03-182-4/+4
| | | | | | /imp/a\ pointy hat .
* Introduce a general name for the previously cmbat-only ioctls. It has thenjl2005-03-172-20/+22
| | | | | | | same value as the previous ioctls so no binary change. Also, make a few style changes to reduce diffs to my tree. Loosely based on code from: Hans Petter Selasky
* - If we fail to find an entry in the PRT, output a warning message.jhb2005-03-081-3/+6
| | | | | | | - Fix a bug in the same condition where we forgot to drop the ACPI pcib lock. This fixes hangs after the pcib0 attach on some machines. Tested by: sos (2)
* On i386 platforms at least, ACPI throttling is accomplished by the chipsetnjl2005-03-041-1/+10
| | | | | | | | | modulating the STPCLK# pin based on the duty cycle. Since p4tcc uses the same mechanism (but internal to the CPU), we triggered a hang on some systems at low frequencies when both were in use. Now, disable acpi_throttle when p4tcc is also present. Tested by: Kevin Oberman
* Check for some impossible frequencies that some systems use to indicatenjl2005-03-041-0/+9
| | | | they don't actually support Px states.
* Fix SCM ID's.obrien2005-03-028-13/+22
|
* Protect acpivar.h with _KERNEL. No user parts inside currently.njl2005-03-021-0/+3
|
* Protect against multiple includes and use _KERNEL to protect the PCI fns.njl2005-02-283-1/+14
|
* Make a pass through all drivers checking specs for desired behavior onnjl2005-02-271-0/+5
| | | | | | | SMP systems. It appears all drivers except ichss should attach to each CPU and that settings should be performed on each CPU. Add comments about this. Also, add a guard for p4tcc's identify method being called more than once.
* Don't bother with cpufreq_register if we're info-only.njl2005-02-261-1/+2
| | | | Suggested by: Jung-uk Kim
* Remove unused variable.njl2005-02-251-2/+0
| | | | Noticed by: Coverity tool
* Instead of assuming units of bytes, it seems more likely that this isnjl2005-02-251-10/+5
| | | | a bitfield.
OpenPOWER on IntegriCloud