summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Make debug.acpi.level and debug.acpi.layer sysctls that can be set withnjl2003-09-262-15/+66
| | | | | the strings found in acpi(4). Also make acpi_ca_version a string so it is more readable.
* Consistently print attach messages.njl2003-09-265-6/+6
|
* Sort debugging levels and update the man page to match reality. Alsonjl2003-09-261-3/+2
| | | | update man page to reflect iasl(8) import.
* Fix the ACPI_DEBUG case.njl2003-09-221-2/+2
| | | | | | | | | | Reported by: Larry Rosenman <ler@lerctr.org> PR: Submitted by: Reviewed by: Approved by: Obtained from: MFC after:
* Make this compile.phk2003-09-211-0/+2
|
* Add support for fixed event buttons defined in the DSDT (HID "ACPI_FSB"njl2003-09-211-17/+49
| | | | | | and "ACPI_FPB"). Pointed out by: Linux
* Add necessary newlines.njl2003-09-181-2/+2
|
* Shorten the message announcing fixed power/sleep buttons.njl2003-09-181-3/+2
|
* Add pci_resume() to reestablish interrupt routing afteriwasaki2003-09-171-1/+1
| | | | | | suspend/resume. Especially after hibernation, interrupt routing went back to initial status on some machines.
* Bump the EC timeout from 50 to 100 ms. I believe the underlying issue isnjl2003-09-151-1/+1
| | | | | global lock contention as symptoms only appear under heavy load (i.e. the nightly periodic run).
* Only enable S4BIOS by default if the FACS says it is available. Thenjl2003-09-151-4/+9
| | | | | | user can override this with a sysctl. Be sure to return the acpi_SetSleepState return value to userland.
* Print notify values as hex.njl2003-09-141-1/+1
|
* Add the -i flag to acpiconf(8) to retrieve battery information.njl2003-09-132-4/+4
| | | | Rename a few structure elements.
* Add a system notify handler in addition to the device notify handler.njl2003-09-111-0/+9
| | | | | | | At least some Toshiba notebooks use a Notify of 0 or 1 for this. PR: Submitted by: Hiroyuki Aizu <aizu@navi.org>
* Extend the ACPI resource handling to make use of the BUS_CONFIG_INTR()marcel2003-09-102-6/+13
| | | | | | | 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.
* Move the definitions for ACPI MADT table entries not present in the ACPICAjhb2003-09-101-0/+122
| | | | distribution to a MI header so it can be shared with other architectures.
* Disallow attempts to suspend to S0. It was only enabled for testing.njl2003-09-091-10/+11
| | | | | Print a more informative message if a sleep state is not supported by BIOS. Add comments.
* Don't free the buffer if it wasn't actually allocated.njl2003-09-041-1/+1
|
* Use the ACPICA AcpiEnterSleepStateS4bios instead of rolling our own. Thisnjl2003-08-293-146/+0
| | | | | | change also disables interrupts around non-S4 suspends whereas before we did not do this. Our version of AcpiEnterSleepStateS4bios was almost identical to the ACPICA version.
* - Rename PCIx_HEADERTYPE* to PCIx_HDRTYPE* so the constants aren't so long.jhb2003-08-281-3/+3
| | | | | | | | | | | - Add a new PCIM_HDRTYPE constant for the field in PCIR_HDRTYPE that holds the header type. - Replace several magic numbers with appropriate constants for the header type register and a couple of PCI_FUNCMAX. - Merge to amd64 the fix to the i386 bridge code to skip devices with unknown header types. Requested by: imp (1, 2)
* Style and whitespace changes. Also, make the ivar functions non-inlinenjl2003-08-289-1156/+1193
| | | | since inlining failed due to the size of BUS_*
* Use __FBSDID().obrien2003-08-2412-23/+38
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-224-8/+8
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Update my mail address on copyright notice.takawata2003-08-191-1/+1
| | | | Noticed by: njl
* Give timecounters a numeric quality field.phk2003-08-161-5/+6
| | | | | | | | | | | | | | | | A timecounter will be selected when registered if its quality is not negative and no less than the current timecounters. Add a sysctl to report all available timecounters and their qualities. Give the dummy timecounter a solid negative quality of minus a million. Give the i8254 zero and the ACPI 1000. The TSC gets 800, unless APM or SMP forces it negative. Other timecounters default to zero quality and thereby retain current selection behaviour.
* Revert part of rev. 1.16 -- reinstate system notify handler. It turns outnjl2003-08-151-0/+6
| | | | | | at least the Casio FIVA requires this. Requested by: takawata
* De-inline functions which do not need to be inline. Move the DEVMETHODnjl2003-08-151-23/+23
| | | | block to where it is in similar drivers.
* Don't install a system notify handler. Move the device notify handlernjl2003-08-151-12/+11
| | | | | installation to just before we're ready to handle events. Make a loop more readable (no functional change).
* Fix a couple changes that were incorrect in updating for 0619. Only unlocknjl2003-08-151-1/+7
| | | | | | | | the hardware mutex if it is held. Re-add calls to Enable/Clear fixed events. This is not known to have caused problems. Bug symptoms might have included instability after an aborted suspend attempt or power/sleep buttons not being enabled.
OpenPOWER on IntegriCloud