summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi.c
Commit message (Collapse)AuthorAgeFilesLines
* Add `if (!cold)' checkings for functions which is called via SYSINIT.iwasaki2002-11-241-7/+13
| | | | | | | Loading acpi.ko with kldload is disallowed, however some functions were executed unexpectedly. Approved by: re
* Interpret new loader tunable "hw.acpi.verbose" to turniwasaki2002-10-311-2/+6
| | | | verbose mode on at boot time.
* Invoke 3 ACPI task threads as default if option ACPI_MAX_THREADS isiwasaki2002-10-311-1/+1
| | | | | | not defined. To make previous default behavior (ACPI_MAX_THREADS undefined), define option ACPI_MAX_THREADS as 0.
* Catch up to changes in acpivar.h to add support for using ACPI onjhb2002-10-161-2/+10
| | | | | | 4-stable systems. Sponsored by: The Weather Channel
* Use d_thread_t for cdevsw functions instead of struct thread * so that itjhb2002-10-091-3/+3
| | | | is easier to share this code with 4-stable.
* Don't panic for a bad ivar request, just return ENOENT.jhb2002-10-081-1/+0
|
* Attach ACPI children a bit later in attach(), specifically after performingjhb2002-09-061-2/+3
| | | | | | any machine dependent initialization. This allows the MD code to set the interrupt routing model so that PCI interrupts are routed correctly when using an APIC or SAPIC for example.
* Add a helper routine acpi_SetIntrModel() to call the _PIC method to setjhb2002-09-061-0/+16
| | | | | the interrupt model in use so that ACPI can properly route interrupts for machines using APIC's or SAPIC's.
* Use resource_list_print_types() instead of duplicating the code.jhb2002-09-041-40/+4
|
* s/hint.acpi.0.disable/hint.acpi.0.disabled/iwasaki2002-08-301-0/+5
| | | | | | | | | Fix device hints entry for disabling acpi(4). This also should fix the arbitration with apm(4) when both drivers are enabled. Note that your /boot/device.hints needs to be updated if you want to stop auto-loading acpi.ko or disable acpi(4).
* Resolve conflicts arising from the ACPI CA 20020815 import.iwasaki2002-08-291-16/+29
|
* Change default value of hw.acpi.sleep_delay to 0.iwasaki2002-08-281-1/+1
| | | | This caused problems (reset or lock up) at wakeup.
* Add new sysctl MIB (hw.acpi.sleep_delay) to specify the delay (iniwasaki2002-08-251-0/+8
| | | | | seconds) before ACPI sleep. Some machines might need this to sleep by Hot-key.
* don't include redunant \n in panic messageimp2002-08-121-2/+2
|
* Resolve conflicts arising from the ACPI CA 20020725 import.iwasaki2002-07-301-0/+5
|
* Add device(power/sleep button and lid) wake function from sleeping state.iwasaki2002-07-221-5/+128
| | | | | | | 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.
* Resolve conflicts arising from the ACPI CA 20020611 import.iwasaki2002-07-091-19/+7
|
* Terminate ACPI subsystem on reboot.iwasaki2002-05-191-0/+3
| | | | Some machines stuck on reboot if ACPI sleep/wakeup was executed.
* Brutally deal with __func__ being 'const char *' on gcc-3.1.peter2002-05-191-16/+16
|
* Fix acpi_avoid() to call freeenv() on the original char * returned fromjhb2002-05-091-4/+5
| | | | | | | getenv(). Reported by: joe Tested by: joe
* Don't call freeenv() on a modified pointer.mux2002-04-241-6/+7
| | | | | | Submitted by: Alexander Kabaev <ak03@gte.com> Reviewed by: phk Pointy hat to: mux
* Fix compiling of acpica when debugging is enabled. In the previousmike2002-04-191-2/+7
| | | | | | revision, two getenv()s were accidentally changed to use testenv(). Pointy hat to: mux
* Rework the kernel environment subsystem. We now convert the staticmux2002-04-171-21/+52
| | | | | | | | | | | | | | | | | environment needed at boot time to a dynamic subsystem when VM is up. The dynamic kernel environment is protected by an sx lock. This adds some new functions to manipulate the kernel environment : freeenv(), setenv(), unsetenv() and testenv(). freeenv() has to be called after every getenv() when you have finished using the string. testenv() only tests if an environment variable is present, and doesn't require a freeenv() call. setenv() and unsetenv() are self explanatory. The kenv(2) syscall exports these new functionalities to userland, mainly for kenv(1). Reviewed by: peter
* Print DRQ resource in boot message.takawata2002-04-081-0/+1
|
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-1/+1
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Match namespace cleanup changes in ACPI CA 20020217 update.msmith2002-02-231-125/+78
| | | | | | | | | | | | | Use ACPI_SUCCESS/ACPI_FAILURE consistently. The AcpiGetInto* interfaces are obsoleted by ACPI_ALLOCATE_BUFFER. Add AcpiBatteryIsPresent helper to determine whether a battery device is inserted. Add ACPI_ALL_DRIVERS to the list of debug layers, now that we own the namespace for this. Pr:
* Staticise devclasses and some unnecessarily global variables.msmith2002-01-081-1/+1
|
* Add OS layer ACPI mutex and threading support.iwasaki2001-12-221-18/+32
| | | | | | | | | | | | | | | | | | - 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/+16
| | | | | | | | 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.
* Add a couple of minor changes.iwasaki2001-11-301-2/+5
| | | | | | | - set sc->acpi_s4bios to 1 by default for hibernation until OS-initiated S4 transition is implemented. - change the behavior of acpi_sleep_state_sysctl() if new value is the same as old one, do nothing instead of EINVAL.
* Yet another synch with minor changes in the ACPI CA 20011120 snapshot.iwasaki2001-11-281-0/+14
| | | | We need to call AcpiEnterSleepStatePrep() before AcpiEnterSleepState().
* Validate requested sleep state in acpi_SetSleepState() to avoid reentryiwasaki2001-11-231-0/+3
| | | | during wakeup procedure.
* Fix re-enabling ACPI on wakeup from hibernation. The problem was thatiwasaki2001-11-151-3/+2
| | | | | acpi_Disable() cleared all GPE events. Some old ACPI implementaions still need current re-enabling code.
* Remove "S4B" from sleep_state_names and add "NONE" instead.iwasaki2001-11-151-4/+5
| | | | | | | | | Now you can say; # sysctl hw.acpi.lid_switch_state=NONE instead of specifying unsupported _Sx object in the system. Actually, S4B is going to disappear in ACPICA and we already have hw.acpi.s4bios to distinguish BIOS hibernation or OS hibernation.
* Add S4BIOS sleep (BIOS hibernation) and DSDT overriding support.iwasaki2001-11-061-0/+20
| | | | | | | | | | | | | | - Add S4BIOS sleep implementation. This will works well if MIB hw.acpi.s4bios is set (and of course BIOS supports it and hibernation is enabled correctly). - Add DSDT overriding support which is submitted by takawata originally. If loader tunable acpi_dsdt_load="YES" and DSDT file is set to acpi_dsdt_name (default DSDT file name is /boot/acpi_dsdt.aml), ACPI CA core loads DSDT from given file rather than BIOS memory block. DSDT file can be generated by iasl in ports/devel/acpicatools/. - Add new files so that we can add our proposed additional code to Intel ACPI CA into these files temporary. They will be removed when similar code is added into ACPI CA officially.
* Remove unnecessary WAK_STS bit waiting code for S1 sleep.iwasaki2001-11-051-14/+0
| | | | It was duplicated with AcpiEnterSleepState() since acpica-unix-20010816.
* Some fix for the recent apm module changes.iwasaki2001-11-011-1/+74
| | | | | | | | | | | | | | - Now that apm loadable module can inform its existence to other kernel components (e.g. i386/isa/clock.c:startrtclock()'s TCS hack). - Exchange priority of SI_SUB_CPU and SI_SUB_KLD for above purpose. - Add simple arbitration mechanism for APM vs. ACPI. This prevents the kernel enables both of them. - Remove obsolete `#ifdef DEV_APM' related code. - Add abstracted interface for Powermanagement operations. Public apm(4) functions, such as apm_suspend(), should be replaced new interfaces. Currently only power_pm_suspend (successor of apm_suspend) is implemented. Reviewed by: peter, arch@ and audit@
* Some small improvements of ACPI thermal driver.iwasaki2001-10-291-0/+5
| | | | | | | | | | - Give a guaranteed minimum cooling run time to avoid too frequent cooling system On/Off switching. The minimum cooling run time can be specified by hw.acpi.thermal.min_runtime in sec. - Refine message printing (_AC-1 -> NONE). - Add verbose mode enable/disable capability by hw.acpi.verbose in bool. Reviewed by: acpi-jp@ folks
* Add APM compatibility feature to ACPI.iwasaki2001-10-261-2/+13
| | | | | | | | | | | | | | | | | This emulates APM device node interface APIs (mainly ioctl) and provides APM services for the applications. The goal is to support most of APM applications without any changes. Implemented ioctls in this commit are: - APMIO_SUSPEND (mapped ACPI S3 as default but changable by sysctl) - APMIO_STANDBY (mapped ACPI S1 as default but changable by sysctl) - APMIO_GETINFO and APMIO_GETINFO_OLD - APMIO_GETPWSTATUS With above, many APM applications which get batteries, ac-line info. and transition the system into suspend/standby mode (such as wmapm, xbatt) should work with ACPI enabled kernel (if ACPI works well :-) Reviewed by: arch@, audit@ and some guys
* Update usage of AcpiEnableEvent to reflect a new argument.msmith2001-10-041-4/+7
| | | | | | | | Fix acpi_DeviceIsPresent to check for valid _STA data and to check the "present" and "functioning" bits. Use acpi_DeviceIsPresent in acpi_pcib rather than rolling our own (also broken) version.
* Check the compatible ID as well as the hardware ID in acpi_MatchHid.dfr2001-10-041-0/+5
|
* Call acpi_DeviceIsPresent() only for devices. This should makeiwasaki2001-09-171-1/+1
| | | | | | | non-ACPI_TYPE_DEVICE devices (such as acpi_tz and acpi_cpu) enabled again. Reviewed by: msmith
* Disable devices that are not present; at a later stage we can then enablemsmith2001-09-151-0/+10
| | | | | | | them if the device arrives. This should solve the problem where devices that have been disabled eg. in the BIOS show up with nonsense resources and hang the bootstrap process.
* KSE Milestone 2julian2001-09-121-3/+3
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Should check debug.acpi.avoid, not .disable.msmith2001-09-071-1/+1
|
* Allow the ACPI subsystem to be disabled with a hint.msmith2001-09-071-19/+59
| | | | | | | | | Avoid fully initialising the ACPI namespace if we are attempting to avoid parts of it. This is a workaround for some systems that still crash the interpreter. Implement the ISA_IVAR_LOGICALID for ISA compatibility. Implement stubs for other PnP ID-related ivars.
* Add a hack to acpi_EvaluateInteger() to handle the case of a methodjhb2001-09-061-1/+37
| | | | | | | returning a Buffer that contains an Integer rather an an Integer directly. Submitted by: msmith Approved by: msmith
* Fix typo; CTLFLAG_RO -> CTLFLAG_RD.iwasaki2001-09-021-1/+1
|
* Add a MODULE_VERSION declaration. This should prevent duplicate loadingmsmith2001-09-011-0/+3
| | | | | | | | of the module, and allows other modules to depend on and link against the ACPI module. Add a sysctl that allows us to retrieve the ACPI CA version number as well.
* Call OS-independent resume routine to execute _WAK .. etc.takawata2001-08-311-75/+1
| | | | This should also recover GPE bit,comment says, though not implemented yet.
OpenPOWER on IntegriCloud