summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
Commit message (Collapse)AuthorAgeFilesLines
...
* Style cleanups to match the rest of this directory. For acpi_battery.c,njl2003-08-114-878/+800
| | | | remove unused includes.
* 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.
* Consistently use the BSD u_int and u_short instead of the SYSV uint andjhb2003-08-071-1/+1
| | | | | | | ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent. Requested by: bde (kern_ktrace.c)
* Add and document the hw.acpi.ec.poll_timeout tunable.njl2003-07-301-2/+5
|
* Enable wake up GPE before shutdown, not only for sleeping.takawata2003-07-261-0/+1
|
* Add an informational debugging printf of the maximum time spent innjl2003-07-251-0/+10
| | | | | EcEventWait(). If you get AE_HARDWARE_NO_RESPONSE errors, please enable this info by setting hw.acpi.verbose=1 in loader.conf.
* Do not call acpi_MatchHid() for all probe cases since it accesses thenjl2003-07-201-8/+7
| | | | | | | | | | namespace. To compensate for it only being used in the !ECDT case, use a more robust approach to indicate a device was probed via ECDT by setting the private ivar to be &acpi_ec_devclass. Without the acpi_MatchHid() call now, it might have been possible for a non-EC device to have had its magic match our previous flag. Pointed out by: takawata
* Close a race condition by passing status retrieved via a non-SCI callnjl2003-07-201-43/+32
| | | | | | | | | | | to EcGpeQueryHandler on to any waiting threads through the softc. Similar behavior was in the original version. Also: * Merge EcQuery into EcGpeQueryHandler to simplify locking * Hold EcLock from the initial read of the CSR down to the wakeup or until after the query command has been processed. * ec_gpebit only needs to be a UINT8
* 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-203-72/+172
| | | | | | | | | | | | | | | 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
* Fix a bogon in the previous commit. When suppressing multiple isabjhb2003-07-171-1/+1
| | | | | | devices, we have to allow for the case when the isab0 device is ourselves. Tested by: markm
* Change the msleep part of EcWaitEvent to be a separate loop, fixing anjl2003-07-151-31/+42
| | | | | | | problem that for some very slow ECs (~6 ms occasionally) causes a timeout. Also finish resource cleanup in the error case in attach. Tested by: ume
* Remove old defines since they are no longer used.njl2003-07-151-12/+0
|
* Fix build breakage on ia64. The second argument of AcpiOsReadable()marcel2003-07-141-2/+2
| | | | and AcpiOsWritable() have type ACPI_SIZE and not UINT32.
* Update code to work with 0619 distnjl2003-07-137-36/+92
| | | | | | | | * 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
* Rewrite much of the embedded controller driver.njl2003-07-101-311/+263
| | | | | | | | | | | | | | | | | | | | * Always use polled mode. The intr approach did not work for many controllers and required the hw.acpi.ec.event_driven workaround. * Only use an edge (not level) triggered GPE handler * Add sc->ec_mtx for locking operations to a single EC. There were many race conditions earlier between an SCI event and EcRead/Write. * Use 1 ms as the global lock timeout * Only acquire global lock if _GLK != 0 * Update EcWaitEvent to use an incremental backoff delay in its poll loop. Wait 50 ms max instead of 10. Most ECs respond in < 5 us (50 us when heavily loaded). However, some time out occasionally even with a 10 ms timeout. For delays past 1 ms, use msleep instead of DELAY to give SCI interrupts a chance to occur. * Add EcCommand to send a command and wait for the appropriate event. * The hw.acpi.ec.event_driven tunable is no longer applicable and has been removed. Ideas from: Linux
* - Fix a typo in the call to acpi_disabled() in probe() by removing anjhb2003-07-091-1/+2
| | | | | | | | | extra trailing space. - Don't bother probing a generic ISA bus device if isab0 already exists. Some BIOSes place an ACPI psuedo-device with the HID of a generic ISA bus device under the PCI-ISA bridge device. This is not the best solution but will work for now. The isa bus driver only allows for one ISA bus anyways.
* Add an ACPI to ISA psuedo bridge driver. It attaches an isab(4) device tojhb2003-07-081-0/+129
| | | | | | | | | ACPI nodes with the plug and play ID's defined for a "Generic ISA Bus Device" as defined in section 10.7 of the ACPI 2.0 specification. This gives machines like the Libretto that contain a fake ISA bus that is not connected via a PCI-ISA bridge an ISA bus for ISA devices to attach to. Tested by: markm
* - 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.
* Add a new PCI interface method, assign_interrupt, to determine thetmm2003-07-011-0/+1
| | | | | | | | | | | | | | | | interrupt to be used for a device. This is intended solely for internal use of PCI bus implementations, and exists so that PCI bus drivers implementing special interrupt assignment methods which require additional work at the bus level to work right can be easily derived from the generic driver (or any other one) without resorting to hacks. It will be used in the sparc64 ofw_pcibus driver, which will be committed shortly. Make use of this method in the generic implementation, and add it to the method table of bus drivers derived from the PCI one. Reviewed by: imp, -hackers
* Whitespace cleanups (verified with MD5 1832ce5ede6c58c844dfb53fd48f0eea).njl2003-06-271-123/+133
| | | | | Also clarify a macro expansion with an XXX. I will be fixing access to Acpi Global Lock in a subsequent commit.
* Add the MD ifdefs for amd64 to point to the IO space bustag/handle.peter2003-05-311-0/+4
| | | | Approved by: re ("safe" amd64 support)
* Add some extra #ifdef stubs so that this compiles on 4.8.jhb2003-05-132-0/+10
| | | | Approved by: re (rwatson/bmah)
* Move some printfs under bootverbose since they are not true errors.njl2003-05-121-2/+4
| | | | Approved by: re (bmah)
* Catch up to reworked debugging levels in latest Intel import.jhb2003-05-011-5/+4
|
* o Don't announce that the timer is good when in fact it isn't timingmarcel2003-04-301-22/+43
| | | | | | | | | | | | | | | | at all (ie reads yield constant values). Display the width as the difference between max and min so that constant timers have width zero. o Get the address of the timer from the XPmTmrBlk field instead of the V1_PmTmrBlk field. The former is a generic address and can specify a memory mapped I/O address. Remove <machine/bus_pio.h> to account for this. The timer is now properly configured on machines with ACPI v2 tables, whether PIO or MEMIO. Note that the acpica code converts v1 tables into v2 tables so the address is always present in XPmTmrBlk. o Replace the TIMER_READ macro with a call to the read_counter() function and add a barrier to make sure that we observe proper ordering of the reads.
* Support functions for the new ACPI import.njl2003-04-295-6/+125
| | | | | | | | | | | * 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
* 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
* Fix 2 vm_offset_t -> vm_paddr_t missed in previous commit.jake2003-03-251-1/+1
| | | | Sponsored by: DARPA, Network Associates Laboratories
* 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
|
* Move the pnp and location info into the common pci bus. Make all knownimp2003-02-171-0/+2
| | | | | | | | | pci busses implement this. Also minor comment smithing in cardbus. Fix copyright to this year with my name on it since I've been doing a lot to this file. Reviewed by: jhb
* Allow non-privilaged user to retrive battery or AC line information.takawata2003-02-154-1/+27
| | | | Reviewed by: rwatson
* More useful announce message containing current speed of CPUnjl2003-01-231-3/+3
|
* For the cpu throttling message, s/enabled/availablenjl2003-01-141-1/+2
| | | | Requested by: many
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-1/+1
| | | | especially in troff files.
* 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
* Fix a De Morgan bug: If we only expect a memory range OR anmarcel2002-12-231-8/+8
| | | | | | | | | | I/O port range, then we should ignore a resource if it's NOT a memory range AND NOT an I/O port range. The OR in the condition caused us to ignore perfectly valid memory addresses. While here, remove redundant parenthesis and reindent the debug print to avoid long lines.
* Add sysctl knob to stop disabling acpi on shutdown.takawata2002-12-112-2/+10
| | | | Approved by: re(jhb)
* Resolve conflicts arising from the ACPI CA 20021118 import.iwasaki2002-11-272-5/+5
|
* Disable debug output from acpi_pci_link.iwasaki2002-11-271-5/+5
| | | | | | | | | There were no serious problem reports on this in spite of my concern. To get debug output from acpi_pci_link, just enable bootverbose flag in usual manner (boot -v). Approved by: re
* - Assume a bus number of zero if evaluating _BBN fails, not if it succeeds.jhb2002-11-251-9/+8
| | | | | | | | This was effectively rendering _BBN useless. - Cleanup handling of the busok variable a bit. Submitted by: marcel (1) Approved by: re (rwatson)
* 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
* According to the ACPI spec, the bus number of the child PCI bus of a hostjhb2002-11-221-7/+52
| | | | | | | | | | | | | | | | | | | | | | to PCI bridge can be read be evaluating the _BBN method of the host to PCI device. Unfortunately, there appear to be some lazy/ignorant/moronic/ whatever BIOS writers that return 0 for _BBN for all host to PCI bridges in the system. On a system with a single host to PCI bridge this is not a problem as the child bus of that single bridge will be bus 0 anyway. However, on systems with multiple host to PCI bridges and l/i/m/w BIOS writers this is a major problem resulting in all but the first host to PCI bridge failing to attach. So, this adds a workaround. If the _BBN of a host to PCI bridge is zero and pcib0 already exists and is not us, the we use _ADR to look up our PCI function and slot (we currently assume we are on bus 0) and use that to call host_pcib_get_busno() to try and extract our bus number from config registers on the host to PCI bridge device. If that fails, then we make an evil assumption that ACPI's _SB_ namespace lays out the host to PCI bridges in ascending order and use our pcib unit number as our bus number. Approved by: re
* Add status initialization code for acpi_cmbat and acpi_acad,iwasaki2002-11-032-7/+120
| | | | | | | | acpi_cmbat_init_battery() and acpi_cmbat_init_acline() respectively. Call acpi_cmbat_init_battery() from acpi_cmbat_resume() too just in case. This is a workaround for embedded controller operations which is unstable for about a minute (typically 30 or 40 sec.) at boot time.
* Don't examine ACPI_STA_ENABLE bit of device's_STA object on initialiwasaki2002-10-311-5/+4
| | | | | | | | | | state. Instead, use ACPI_STA_PRESENT and ACPI_STA_FUNCTIONAL for it. In some ACPI BIOS implementations, boot disabled devices don't have ACPI_STA_ENABLE bit in _STA object. Also it is not fatal if getting current IRQ of boot disabled devices is failed in initial state. And minor fixes.
* 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-313-6/+9
| | | | | | not defined. To make previous default behavior (ACPI_MAX_THREADS undefined), define option ACPI_MAX_THREADS as 0.
* Add a missing newline to the end of a device_printf().jhb2002-10-291-1/+1
| | | | Reported by: Michael G. Petry <petry@NetMasters.Com>
OpenPOWER on IntegriCloud