summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi.c
Commit message (Collapse)AuthorAgeFilesLines
* Default to 5 seconds before sleeping to give some machines time to stabilize.njl2003-08-081-1/+6
| | | | This doesn't break anything on my laptop and some claim it helps them.
* Clarify the ACPI shutdown messages.njl2003-07-201-2/+2
|
* Add ECDT (ACPI 2.0) support. This allows the EC to be enabled before thenjl2003-07-201-0/+6
| | | | | | | | | | | | | | | 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
* Update code to work with 0619 distnjl2003-07-131-20/+22
| | | | | | | | * Use ACPI_BUFFER as the type for AcpiGetObjectInfo * Remove AcpiEnableEvent/AcpiClearEvent for ACPI_EVENT_FIXED (power/sleep buttons) as they are no longer needed * Change calls to use the new GPE functions * Add AcpiOs*Lock functions
* - Use the new resource_disabled() helper function to see if devices arejhb2003-07-021-5/+2
| | | | | | | | | | | | disabled. - Change the apm driver to match the acpi driver's behavior by checking to see if the device is disabled in the identify routine instead of in the probe routine. This way if the device is disabled it is never created. Note that a few places (ips(4), Alpha SMP) used "disable" instead of "disabled" for their hint names, and these hints must be changed to "disabled". If this is a big problem, resource_disabled() can always be changed to honor both names.
* Catch up to reworked debugging levels in latest Intel import.jhb2003-05-011-5/+4
|
* Add new sysctl MIB (hw.acpi.supported_sleep_state) to indicateiwasaki2003-04-111-0/+23
| | | | | | | | | the list of supported sleep state. This should help people understand what following message means. acpi0: AcpiGetSleepTypeData failed - AE_NOT_FOUND MFC after: 3 days
* Add integer value of _CID handling.takawata2003-03-061-3/+33
| | | | | | | If _CID is string, it will need more complicated handling to distinguish bus other than ISA. Submitted by: Paul Wankadia <junyer@gmx.net>
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+5
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* Use canonical form for cdevsw initialization.phk2003-03-021-13/+13
|
* Allow non-privilaged user to retrive battery or AC line information.takawata2003-02-151-1/+11
| | | | Reviewed by: rwatson
* Change ACPI make_dev() calls to use UID_ and GID_ constants ratherrwatson2002-12-281-1/+2
| | | | | | | | | | | | | than hard-coded uids and gids. Switch the device to a group of wheel instead of operator. Narrow down the permissions on the device to require root privilege to manipulate the system power state. It may be that we can broaden access to the device after review of the access control in ACPI. Submitted by: kris Reviewed by: takawata
* Add sysctl knob to stop disabling acpi on shutdown.takawata2002-12-111-2/+9
| | | | Approved by: re(jhb)
* 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@
OpenPOWER on IntegriCloud