summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
Commit message (Collapse)AuthorAgeFilesLines
* Fix problem caused by previous commit where some users' buttonsnjl2004-02-192-11/+2
| | | | | | | stopped returning events. Don't disable the event when removing the handler because it still needs to be enabled for the other handler. Also, remove duplicate AcpiEnableEvent calls since the install function now does this for us.
* Fix hw.acpi.os_name by renaming it to hw.acpi.osname. The "_name" suffixnjl2004-02-141-7/+5
| | | | | | | | | | is reserved by the loader, and thus any tunable name with that suffix will be silently discarded. Document this in the header and man page so that other developers do not develop so many bumps on the head after banging it against the wall. Detective work by: Mark Santcroos, grehan
* Fix a whitespace nit.jhb2004-02-121-1/+1
|
* Prefer buttons defined in the AML over the ones in the FADT. Somenjl2004-02-113-24/+42
| | | | | | | | | | | | | | systems define power/sleep buttons in both places but only deliver notifies to the ones defined in the AML. Also, reduce length of various function handler names. PR: Submitted by: Reviewed by: Approved by: Obtained from: MFC after:
* Make all ACPI debug layers unique again. This makes debugging a morephilip2004-02-061-6/+6
| | | | | | | pleasant experience (for certain definition of 'pleasant'). Submitted by: Mark Santcroos <marks@ripe.net> Approved by: njl (mentor)
* Notify the user (at kern.emerg) that the system will be shutting down ifnjl2004-02-031-5/+13
| | | | | | it is still above the critical temperature on the next poll cycle. This is a 10 second advance notice by default. Document the private (non-standard) notify we will be using with devd(8).
* If the temperature is at _HOT or _CRT for 3 sequential readings, shutdownnjl2004-02-021-14/+21
| | | | | | | | | | | | | the system. Also, decrease the poll interval to 10 seconds from 30 seconds. This is needed because some systems will report an invalid high temperature for one poll cycle. It is suspected this is due to the embedded controller timing out. A typical value is 138C for one cycle on a system that is otherwise 65C. This prevents the system from prematurely shutting down after one invalid reading. It will still shut down after 30 seconds of high temperature, which is the same as previous default behavior. Tested by: Scott Lambert <lambert AT lambertfam.org>
* Add an ACPI_FUNCTION_TRACE() to the newly-added acpi_Startup() routineroam2004-01-281-0/+2
| | | | | | | to get the ACPI_DEBUG case (and LINT in particular) to build. Reviewed by: jhb, njl Approved by: jhb
* Add TUNABLE_STR to make "hw.acpi.os_name" more correct. However, the callnjl2004-01-271-3/+2
| | | | to getenv_string() still doesn't work.
* Move the code to initialize ACPI-CA into a separate acpi_Startup() functionjhb2004-01-262-24/+42
| | | | | | | that other modules can call to initialize ACPI-CA before the new-bus probe and change acpi_identify() to call it. Reviewed by: njl
* Use getenv_int() rather than reimplementing it.jhb2004-01-201-10/+2
|
* Add a component constant for ACPI_TOSHIBA to fix compilation ofjhb2004-01-131-0/+1
| | | | acpi_toshiba(4) driver with ACPI_DEBUG and thus fix LINT on i386.
* Bite the bullet and uncomment the shutdown() in case we hit the _CRT ornjl2004-01-121-4/+4
| | | | | _HOT temperatures. We have to do this at some point to keep from getting imp(tm) melted hardware.
* Clean up the acpi announce message of trailing spaces.njl2004-01-091-3/+11
|
* Expand the check for overriding the OS name to override _OS* (includingnjl2004-01-091-7/+9
| | | | | _OS_, _OS, and _OSI). This should fix this option for people who reported it not changing anything.
* Delete the region we are passed if that is the requested operation.njl2004-01-031-2/+6
| | | | | | This should fix the problem with removing an address space handler although we don't currently use that capability so it's unlikely anyone saw this problem.
* Use the appropriate values for the notifies. No change in behaviornjl2003-12-311-2/+2
| | | | | | since both notifies result in the same function being called. Found by: documenting the code
* Don't attach throttling if the P_BLK is 0, even if the P_BLK_LEN is 6.njl2003-12-281-1/+1
| | | | This is more strict but no known systems have this problem.
* Fix acpi_MatchHid() to check the compatibility ID's if the hardware IDjhb2003-12-261-3/+3
| | | | | | doesn't match. Submitted by: marcel
* Fix locking broken by recent _CID changes. Always be sure to unlocknjl2003-12-231-10/+15
| | | | in the error case.
* Update to use the new package routines instead of rolling our ownnjl2003-12-231-66/+40
| | | | macros.
* Remove the device_t parameter from package routines that only used it tonjl2003-12-233-49/+28
| | | | print an error message. Update all callers of the package routines.
* Don't use NULL (pointer) when we're testing for a count of 0 (integer).peter2003-12-231-1/+1
|
* Initialize acpi buffer structs early in order to avoid freeingkan2003-12-181-3/+3
| | | | unallocated pointers later in done: section.
* Remove power profile support from acpi_cpu, it will be managed by anjl2003-12-181-95/+26
| | | | script run from devd(8).
* Add support for multiple CIDs since _CID can contain a package of values.njl2003-12-183-65/+126
| | | | | | | | | Implement this in acpi_MatchHid() and acpi_isa_get_compatid(). This should fix mouse support for some users. Move all users of AcpiGetObjectInfo() to use dynamic storage instead of a devinfo on the stack. This is necessary since ACPI-CA needs to allocate different sized arrays for the CompatList.
* Fix throttling to use the proper mask. The bug resulted in only twonjl2003-12-121-2/+2
| | | | | | | throttling values being available regardless of the CPU's capabilities. This has been broken since rev 1.1. Also clarify a comment. Submitted by: Taku YAMAMATO <taku@cent.saitama-u.ac.jp>
* Trim trailing whitespace.jhb2003-12-101-9/+9
|
* Use sbufs instead of snprintf for parsing debug strings.njl2003-12-091-13/+12
|
* Delete madt.h since definitions are now used from actbl.hnjl2003-12-091-122/+0
|
* We don't need to call _INI on processor objects now that ACPI-CA doesnjl2003-12-091-7/+0
| | | | this as it should.
* Update this driver to be more module friendly:jhb2003-12-031-5/+7
| | | | | | | | | | | | | - Dynamically allocate the cpu_softc[] array based on mp_maxid instead of using a statically sized array that depended on 'options SMP'. - Use mp_maxid rather than MAXCPU when walking all the CPUs looking for a match. - Always call smp_rendezvous() since UP kernels now provide this. - Use mp_ncpus rather than cpu_ndevices when determining if we need to disable C3 for SMP machines. Approved by: re (rwatson) Reviewed by: njl
* * If a processor's softc is NULL, use C1 since there is no ACPInjl2003-11-271-4/+11
| | | | | | | processor object for this CPU. This occurs for logical CPUs which do not have an associated processor object (e.g., HTT). Approved by: re (rwatson)
* * Add acpi_pcpu_get_id(idx, *acpi_id, *cpu_id) which fetches thenjl2003-11-261-49/+48
| | | | | | | | | | | | | | | | | | | | | | idx'th present CPU with pc_acpi_id equal to *acpi_id. If *acpi_id does not match that processor's pc_acpi_id, return the value for ProcId derived from the MADT in *acpi_id. If pc_acpi_id is 0xffffffff, always override it with the value of *acpi_id. Finally, return pc_cpuid in *cpu_id and use that as our primary key. * Use pc_cpuid as our unique key because we know it is valid since MD code set it. The values for ProcId in the ASL and MADT don't match up on some machines (!), forcing us to fall back to ordered probing in that case. * Remove some #ifdef SMP since the refcount doesn't hurt performance and will be needed for dynamic _CST objects. Only one #ifdef SMP (for smp_rendezvous) remains. * Hook up SMP in the compile flags in the Makefile. Tested by: marcel, truckman Approved by: re (scottl)
* Fix a typo in my patches to support extended IRQ resources that broke thejhb2003-11-201-1/+1
| | | | | | type checking for _PRS for a link device's interrupt resources. Approved by: re (scottl)
* Try all of the possible interrupts for a link device when programmingjhb2003-11-201-1/+1
| | | | | | | | | boot-disabled devices instead of skipping the last interrupt. This is especially important for devices that only have one interrupt as this bug was keeping any interrupt from being tried at all. Reviewed by: msmith Approved by: re (scottl)
* * Add a DEVMETHOD for acpi so that child detach methods get called. Addnjl2003-11-192-109/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an acpi_cpu method for shutdown that disables entry to acpi_cpu_idle and then IPIs/waits for threads to exit. This fixes a panic late in reboot in the SMP case. * In the !SMP case, don't use the processor id filled out by the MADT since there can only be one processor. This was causing a panic in acpi_cpu_idle if the id was 1 since the data was being dereferenced from cpu_softc[1] even though the actual data was in cpu_softc[0] (which is correct). * Rework the initialization functions so that cpu_idle_hook is written late in the boot process. * Make the P_BLK, P_BLK_LEN, and cpu_cx_count all softc-local variables. This will help SMP boxes that have _CST or multiple P_BLKs. No such boxes are known at this time. * Always allocate the C1 state, even if the P_BLK is invalid. This means we will always take over idling if enabled. Remove the value -1 as valid for cx_lowest since this is redundant with machdep.cpu_idle_hlt. * Reduce locking for the throttle initialization case to around the write to the smi_cmd port. Add disabled code to write the CST_CNT. It will be enabled once _CST re-evaluation is tested (post 5.2R). Thank you: dfr, imp, jhb, marcel, peter Tested by: rwatson, Harald Schmalzbauer <h@schmalzbauer.de> Approved by: re (rwatson)
* Implement Cx CPU idle states and updated throttling support.njl2003-11-151-161/+783
| | | | | | | | | | | | * Use the cpu_idle_hook() to do idling for C1-C3. * Use both _CST and the FADT to detect Cx states. * Use both _PTC and P_CNT for controlling throttling. * Add a notify handler to detect changes in _CST and _PSS * Call the _INI function for each processor if present. This will be done by ACPI-CA in the future. * Fix a bug on SMP systems where CPUs will attach multiple times if the bus is rescan. * Document new sysctls for controlling idling.
* Add acpi_package.c with routines for validating packages and pullingnjl2003-11-152-0/+156
| | | | | various data types from them. This is loosely based on the acpi_cmbat macros (by Mike Smith) and will eventually replace them.
* Add acpi_bus_alloc_gas() for allocating a memory or IO resource from itsnjl2003-11-151-1/+28
| | | | Generic Address Structure.
* Improve support for extended IRQ resources:jhb2003-11-142-77/+127
| | | | | | | | | | | | | | | - For acpi_pci_link_entry_dump(), add a few helper functions to display the trigger mode, polarity, and sharemode of an individual IRQ resource. These functions are then called for both regular and extended IRQ resources. - In acpi_pci_link_set_irq(), use the same type of IRQ resource (regular vs. extended) for the new current resource as the type of the resources from _PRS. - When routing an interrupt don't ignore extended IRQ resources. Also, use the same type of IRQ resource (regular vs. extended) for the new current resource when as the type of the resource from _PRS. Tested by: peter
* Fix some typos.jhb2003-11-121-3/+3
|
* Reindent to non-style(9) compliant 4 space indent to match rest of file.jhb2003-11-121-4/+4
|
* Add an ACPI_FUNCTION_TRACE() invocation to acpi_OverrideInterruptLevel()jhb2003-11-121-0/+2
| | | | | | to fix compile with ACPI_DEBUG. Reported by: tinderbox
* Add an acpi_OverrideInterruptLevel() method that OSPM can use to overridejhb2003-11-112-0/+19
| | | | the InterruptLevel used for the SCI.
* Add devctl(4) notify support to ACPI. Various subsystems now notifynjl2003-10-257-3/+39
| | | | | userland whenever events occur. See the example in devd.conf below to see how to use it.
* Disable irqs before entering the power-off state. This is not knownnjl2003-10-191-0/+1
| | | | | to fix any problems but is similar to how Linux implements this function.
* If requested to Sleep for less than our hz granularity (e.g., 10 ms),njl2003-10-021-6/+13
| | | | | | use DELAY instead of tsleep. Submitted by: peter
* Revert 1.24. It causes a hang on shutdown for Marcel. This is due tonjl2003-09-301-9/+1
| | | | | | | | | | | | AcpiEnterSleepState() calling a long AcpiOsStall() with interrupts disabled. This fix will instead be added to ACPI-CA. PR: Submitted by: Reviewed by: Approved by: Obtained from: MFC after:
* If asked to stall for more than 100 us (which is specified as the max innjl2003-09-291-1/+9
| | | | | | | the ACPI standard), call sleep instead since that is probably what the caller meant. Mentioned by: peter
OpenPOWER on IntegriCloud