summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpivar.h
Commit message (Collapse)AuthorAgeFilesLines
* - Defer BUS_CONFIG_INTR() on ACPI IRQ resources until the resources arejhb2004-06-231-0/+4
| | | | | | | | | | | | | | | | | actually used. For most ACPI devices this means deferring the call until bus_alloc_resource(). - Add a function acpi_config_intr() to call BUS_CONFIG_INTR() for an ACPI IRQ resource using the trigger mode and polarity information stored in the ACPI resource object. - Add a function acpi_lookup_irq_resource() to lookup the ACPI IRQ resource that corresponds to a specified rid and new-bus resource. - Have the ACPI PCI bridge driver call BUS_CONFIG_INTR() on interrupts that it routes through link devices. - Remove needactivate variable from acpi_alloc_resource() by changing the function not modify the flags variable but just mask off RF_ACTIVE when calling rman_reserve_resource(). Reviewed by: njl (1, an earlier version)
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-1/+1
| | | | Bump __FreeBSD_version accordingly.
* Add support to ACPI to manage its own resources. Previously, resourcenjl2004-06-131-1/+3
| | | | | | | | | | | | | | | | | allocation was passed up to nexus. Now, we probe sysresource objects and manage the resources they describe in a local rman pool. This helps devices which attach/detach varying resources (like the _CST object) and module loads/unloads. The allocation/release routines now check to see if the resource is described in a child sysresource object and if so, allocate from the local rman. Sysresource objects add their resources to the pool and reserve them upon boot. This means sysresources need to be probed before other ACPI devices. Changes include: * Add ordering to the child device probe. The current order is: system resource objects, embedded controllers, then everything else. * Make acpi_MatchHid take a handle instead of a device_t arg. * Replace acpi_{get,set}_resource with the generic equivalents.
* Associate a device_t with an ACPI_HANDLE. This make AcpiWalkNamespace morenjl2004-06-131-0/+9
| | | | | useful. If ACPI-CA allowed null object handlers, we wouldn't need the placeholder function.
* Style cleanups. "extern" is unneeded for function prototypes.njl2004-05-281-74/+68
|
* Update the new suspend/resume GPE methods to properly limit the GPEnjl2004-05-281-0/+1
| | | | | | | based on the destination sleep state. Add a method to restore the old state on resume. This is needed for the case of suspending to a very low state disabling a GPE (i.e. S4), resuming, and then suspending to a higher state (i.e. S3). This case should now keep the proper GPEs enabled.
* Restructure the wake GPE API. Now there are three functions:njl2004-05-271-54/+35
| | | | | | | | | | | | | | | | | | acpi_wake_init: Evaluate _PRW and set the GPE type acpi_wake_set_enable: Enable or disable a device's GPE. acpi_wake_sleep_prep: Perform any last-minute changes to the device to prepare it for entering the given sleep state. Also, walk the entire namespace when transitioning to a sleep state, disabling any GPEs which aren't appropriate for the given state. Transition acpi_lid and acpi_button to the new API. This clears the way for non-ACPI-aware devices to wake the system (i.e. modems) and fixes a problem where systems power up after shutdown when a GPE is triggered.
* Revert the previous commit. The bus accessor macros do not check thenjl2004-05-221-3/+56
| | | | | | | return value for BUS_READ_IVAR and thus don't generate the proper NULL in cases where a device (i.e. on PCI) does not have a handle. Found by: peadar, tjr
* Use the simpler __BUS_ACCESSOR macros for ivars instead of defining themnjl2004-05-181-56/+3
| | | | ourselves.
* Select the highest valid (i.e., S3) sleep state for the default for thenjl2004-05-061-3/+0
| | | | | sleep button. Change the default for the lid switch to NONE. This can be overridden in /etc/sysctl.conf as desired.
* Add the ACPI Asus extras driver. Provides support for cool ACPI-controledphilip2004-04-221-0/+1
| | | | | | | | | gadgets (hotkeys, lcd, ...) on Asus laptops. I aim to closely track the acpi4asus project which implements these features in the Linux kernel. If this breaks your laptop, please let me know how it does it :-) Approved by: njl (mentor)
* Move the timer difference convenience function from acpi_cpu.c to make itnjl2004-04-211-0/+1
| | | | | | globally available. acpi_TimerDelta() subtracts two readings from the ACPI PM timer and returns the difference. It properly distinguishes between 24-bit and 32-bit timers and handles wraparound.
* Style cleanups to reduce diffs to locking tree.njl2004-04-141-2/+1
|
* Include the prototype for acpi_GetReference.njl2004-04-091-0/+1
|
* Move the ivar accessing routines back to inlines (reverting acpivar.hnjl2004-04-011-9/+71
| | | | | rev 1.44 and acpi.c rev 1.96). Now gcc can handle larger inlines and we really need external drivers to be able to read their acpi ivars.
* Add an interface to pass an argument to the resource parsing functions.njl2004-03-311-2/+2
| | | | | | | | | | | This is just groundwork for changing sysresource behavior. PR: Submitted by: Reviewed by: Approved by: Obtained from: MFC after:
* Use an unsigned int instead of an int for the Get/Set Integer interface.njl2004-03-091-3/+3
| | | | Pointed out by: le
* Change to acpi_{Get,Set}Integer to provide both methods. Convert allnjl2004-03-031-3/+5
| | | | | | callers to the new API. Submitted by: Mark Santcroos <marks@ripe.net>
* Add support for quirks for acpi tables. Key off OEM vendor and revision.njl2004-03-031-9/+8
| | | | | | Sort acpi debug values. Change "disable" to "disabled" to match rest of the kernel. Remove debugging from acpi_toshiba since it was only used for probe/attach.
* Use ACPI_NEXT_RESOURCE instead of defining our own copy. The one providednjl2004-02-191-2/+0
| | | | with ACPI-CA is identical now.
* Prefer buttons defined in the AML over the ones in the FADT. Somenjl2004-02-111-4/+4
| | | | | | | | | | | | | | 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)
* Move the code to initialize ACPI-CA into a separate acpi_Startup() functionjhb2004-01-261-0/+1
| | | | | | | that other modules can call to initialize ACPI-CA before the new-bus probe and change acpi_identify() to call it. Reviewed by: njl
* 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.
* Remove the device_t parameter from package routines that only used it tonjl2003-12-231-6/+3
| | | | print an error message. Update all callers of the package routines.
* Add acpi_package.c with routines for validating packages and pullingnjl2003-11-151-0/+15
| | | | | various data types from them. This is loosely based on the acpi_cmbat macros (by Mike Smith) and will eventually replace them.
* Add an acpi_OverrideInterruptLevel() method that OSPM can use to overridejhb2003-11-111-0/+1
| | | | the InterruptLevel used for the SCI.
* Add devctl(4) notify support to ACPI. Various subsystems now notifynjl2003-10-251-0/+2
| | | | | userland whenever events occur. See the example in devd.conf below to see how to use it.
* Extend the ACPI resource handling to make use of the BUS_CONFIG_INTR()marcel2003-09-101-1/+1
| | | | | | | method. This is necessary on ia64 where it's known that serial interfaces described in the ACPI namespace may not have the well-known IRQs assigned to them. This confuses us in thinking they are PCI based interrupts and wrongly program the APIC.
* Style and whitespace changes. Also, make the ivar functions non-inlinenjl2003-08-281-136/+61
| | | | since inlining failed due to the size of BUS_*
* Add ECDT (ACPI 2.0) support. This allows the EC to be enabled before thenjl2003-07-201-31/+5
| | | | | | | | | | | | | | | namespace has been evaluated. Machines with ACPI 2.0 expect this behavior and have AML which calls EC functions early in the boot process. If the ECDT is not available, fall back to original probe behavior. Other minor changes: * Add GPE bit and GLK usage to the device announcement * Always use the global lock in the ECDT case, but potentially downgrade to not using it if _GLK is 0 once the namespace is available. This is announced with "Changing GLK from 1 to 0" * Remove the acpi_object_list definitions which were earlier deprecated Ideas from: takawata
* Remove old defines since they are no longer used.njl2003-07-151-12/+0
|
* Add some extra #ifdef stubs so that this compiles on 4.8.jhb2003-05-131-0/+6
| | | | Approved by: re (rwatson/bmah)
* Support functions for the new ACPI import.njl2003-04-291-0/+3
| | | | | | | | | | | * AcpiOsDerivePciId(): finds a bus number, given the slot/func and the acpi parse tree. * AcpiOsPredefinedOverride(): use the sysctl hw.acpi.os_name to override the value for _OS. Ideas from: takawata, jhb Reviewed by: takawata, marcel Tested on: i386, ia64
* Fix 2 vm_offset_t -> vm_paddr_t missed in previous commit.jake2003-03-251-1/+1
| | | | Sponsored by: DARPA, Network Associates Laboratories
* Add sysctl knob to stop disabling acpi on shutdown.takawata2002-12-111-0/+1
| | | | Approved by: re(jhb)
* Invoke 3 ACPI task threads as default if option ACPI_MAX_THREADS isiwasaki2002-10-311-1/+8
| | | | | | not defined. To make previous default behavior (ACPI_MAX_THREADS undefined), define option ACPI_MAX_THREADS as 0.
* - Include lock headers on current in this header instead of puttingjhb2002-10-161-3/+18
| | | | | | | #if's in all the other ACPI source files. - Use splhigh() for the ACPI subsystem lock on 4-stable. Sponsored by: The Weather Channel
* Add a helper routine acpi_SetIntrModel() to call the _PIC method to setjhb2002-09-061-0/+8
| | | | | the interrupt model in use so that ACPI can properly route interrupts for machines using APIC's or SAPIC's.
* Resolve conflicts arising from the ACPI CA 20020815 import.iwasaki2002-08-291-1/+1
|
* Add new sysctl MIB (hw.acpi.sleep_delay) to specify the delay (iniwasaki2002-08-251-0/+1
| | | | | seconds) before ACPI sleep. Some machines might need this to sleep by Hot-key.
* Add device(power/sleep button and lid) wake function from sleeping state.iwasaki2002-07-221-0/+3
| | | | | | | This is required for some Thinkpad (and maybe VAIO) machines to wake the system up from sleep. Currently partially implemented, more complete implementation will come later.
* Remove __P.alfred2002-03-201-1/+1
|
* Add generalized power profile code.iwasaki2002-03-041-15/+0
| | | | | | | | | | | | | This makes other power-management system (APM for now) to be able to generate power profile change events (ie. AC-line status changes), and other kernel components, not only the ACPI components, can be notified the events. - move subroutines in acpi_powerprofile.c (removed) to kern/subr_power.c - call power_profile_set_state() also from APM driver when AC-line status changes - add call-back function for Crusoe LongRun controlling on power profile changes for a example
* Add our own private defines for driver debug layers.msmith2002-02-231-7/+18
| | | | | | Obsolete the acpi_GetInto* interfaces. Fix a typo to be less appropriate.
* Fix irq/drq handling. IRQ and DRQ resource information can be gettakawata2002-01-311-2/+2
| | | | | in one object for one resource. Array of values in a object means possible values for the object.
* Staticise devclasses and some unnecessarily global variables.msmith2002-01-081-2/+0
|
* Oops, wrong option name. It's should be ACPI_MAX_THREADS,iwasaki2001-12-251-1/+1
| | | | not ACPI_NO_THREADS.
* Add OS layer ACPI mutex and threading support.iwasaki2001-12-221-0/+9
| | | | | | | | | | | | | | | | | | - Temporary fix a bug of Intel ACPI CA core code. - Add OS layer ACPI mutex support. This can be disabled by specifying option ACPI_NO_SEMAPHORES. - Add ACPI threading support. Now that we have a dedicate taskqueue for ACPI tasks and more ACPI task threads can be created by specifying option ACPI_MAX_THREADS. - Change acpi_EvaluateIntoBuffer() behavior slightly to reuse given caller's buffer unless AE_BUFFER_OVERFLOW occurs. Also CM battery's evaluations were changed to use acpi_EvaluateIntoBuffer(). - Add new utility function acpi_ConvertBufferToInteger(). - Add simple locking for CM battery and temperature updating. - Fix a minor problem on EC locking. - Make the thermal zone polling rate to be changeable. - Change minor things on AcpiOsSignal(); in ACPI_SIGNAL_FATAL case, entering Debugger is easier to investigate the problem rather than panic.
* Disable sleep requests for 5 sec after wakeup. This is needed foriwasaki2001-12-091-0/+1
| | | | | | | | some Toshiba and Thinkpad laptops. Wakeup event is generated by power button or sleep button on some laptops but this also generates SCI interrupt, and shutdown the system as result. So this is introduced so that acpi driver ignore given requests for certain period.
OpenPOWER on IntegriCloud