#
267654 |
|
19-Jun-2014 |
gjb |
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
265663 |
|
08-May-2014 |
smh |
MFC r264878
Increase ACPI_MAX_TASKS to be 4 x the number of CPU's as 2 x was still insufficient on some machines.
Sponsored by: Multiplay
|
#
247881 |
|
06-Mar-2013 |
avg |
MFC r233579,236403,236408: make interrupt flags management closer to head
r233579: Restore interrupt state after executing AcpiEnterSleepState(). r236403,236408: acpi_wakeup_machdep/acpi_sleep_machdep
The merged changes are modified a bit to account for lots of missing acpi and acpica MFCs. For the same reason MFC to stable/8 is not practical.
MFC slackers: iwasaki, jkim
|
#
243534 |
|
25-Nov-2012 |
sbruno |
MFC 242922
Update MAX_TASKS to scale a bit based on MAXCPU
This alleviates issues on newer Sandy/Ivy Bridge gear that seems to require boatloads more ACPI resources than before.
|
#
237822 |
|
29-Jun-2012 |
jhb |
MFC 235024,235029,235556,235834,235845: Use MADT to match ACPI Processor objects to CPUs. MADT and DSDT/SSDTs may list CPUs in different orders, especially for disabled logical cores. Now we match ACPI IDs from the MADT with Processor objects, strictly order CPUs accordingly, and ignore disabled cores. This prevents us from executing methods for other CPUs, e. g., _PSS for disabled logical core, which may not exist. Unfortunately, it is known that there are a few systems with buggy BIOSes that do not have unique ACPI IDs for MADT and Processor objects. To work around these problems, 'debug.acpi.cpu_unordered' tunable is added. Set this to a non-zero value to restore the old behavior.
|
#
232086 |
|
23-Feb-2012 |
jkim |
MFC: r231161
- Give all clocks and timers on acpi0 the equal probing order. - Increase probing order for ECDT table to match HID-based probing. - Decrease probing order for HPET table to match HID-based probing. - Decrease probing order for CPUs and system resources. - Fix ACPI_DEV_BASE_ORDER to reflect the reality.
|
#
232084 |
|
23-Feb-2012 |
jkim |
MFC: r231227
Reset clock after atrtc(4) is properly resumed.
|
#
227397 |
|
09-Nov-2011 |
jhb |
MFC 226302: If an allocation for a specific resource range fails because it is not in a decoded range for an ACPI Host-PCI bridge, try to allocate it from the ACPI system resource range. If that works, permit the resource allocation regardless.
Approved by: re (kib)
|
#
225736 |
|
22-Sep-2011 |
kensmith |
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
Approved by: re (implicit)
|
#
223370 |
|
21-Jun-2011 |
jhb |
Use AcpiWalkResources() to parse the resource list from _CRS rather than using a home-rolled loop. While here, add support for 64-bit address range resources.
Silence on: acpi@ (older version)
|
#
220338 |
|
04-Apr-2011 |
jkim |
Move a trivial acpi_TimerDelta() to acpivar.h to make it inlineable.
|
#
219037 |
|
25-Feb-2011 |
jkim |
Add more definitions for vendor-specific CPU capability bits to the last revision, which is renamed to "Intel Processor Vendor-Specific ACPI".
|
#
217238 |
|
10-Jan-2011 |
jkim |
Allow AcpiOsInstallInterruptHandler() and AcpiOsRemoveInterruptHandler() to install or remove non-SCI interrupt handlers per ACPI Component Architecture User Guide and Programmer Reference. ACPICA may install such interrupt handler when a GPE block device is found, for example. Add a wrapper for ACPI_OSD_HANDLER, convert its return values to ours, and make it a filter. Prefer KASSERT(9) over panic(9) as we have never seen those in reality. Clean up some style(9) nits and add my copyright.
|
#
216674 |
|
22-Dec-2010 |
jhb |
Use resource_list_reserve() to reserve I/O port and memory resources for ACPI devices even if they are not allocated by a device driver since the resources are in use and should not be allocated to another device.
|
#
215097 |
|
10-Nov-2010 |
jkim |
Make APM emulation look more closer to its origin. Use device_get_softc(9) instead of hardcoding acpi(4) unit number as we have device_t for it.
|
#
215072 |
|
09-Nov-2010 |
jkim |
Refactor acpi_machdep.c for amd64 and i386, move APM emulation into a new file acpi_apm.c, and place it on sys/x86/acpica.
|
#
211430 |
|
17-Aug-2010 |
jhb |
Add a new method to the PCI bridge interface, PCIB_POWER_FOR_SLEEP(). This method is used by the PCI bus driver to query the power management system to determine the proper device state to be used for a device during suspend and resume. For the ACPI PCI bridge drivers this calls acpi_device_pwr_for_sleep(). This removes ACPI-specific knowledge from the PCI and PCI-PCI bridge drivers.
Reviewed by: jkim
|
#
208436 |
|
23-May-2010 |
mav |
Make table-based HPET identification more clever. Before creating fake device, make sure we have no real HPET device entry with same ID. As side effect, it potentially allows several HPETs to be attached. Use first of them for timecounting, rest (if ever present) could later be used as event sources.
|
#
206117 |
|
02-Apr-2010 |
jkim |
Merge ACPICA 20100331 (and four additional upstream patches).
|
#
202771 |
|
21-Jan-2010 |
jkim |
Merge ACPICA 20100121.
|
#
199016 |
|
07-Nov-2009 |
avg |
acpi: remove 'magic' ivar
o acpi_hpet: auto-added 'wildcard' devices can be identified by non-NULL handle attribute. o acpi_ec: auto-add 'wildcard' devices can be identified by unset (NULL) private attribute. o acpi_cpu: use private instead of magic to store cpu id.
Reviewed by: jhb Silence from: acpi@ MFC after: 2 weeks X-MFC-Note: perhaps the ivar should stay for ABI stability
|
#
197439 |
|
23-Sep-2009 |
jhb |
Extract the code to find and map the MADT ACPI table during early kernel startup and genericize it so it can be reused to map other tables as well: - Add a routine to walk a list of ACPI subtables such as those used in the APIC and SRAT tables in the MI acpi(4) driver. - Move the routines for mapping and unmapping an ACPI table as well as mapping the RSDT or XSDT and searching for a table with a given signature out into acpica_machdep.c for both amd64 and i386.
|
#
197105 |
|
11-Sep-2009 |
jkim |
Catch up with ACPICA 20090903.
|
#
193963 |
|
10-Jun-2009 |
jkim |
Catch up with r193750 (OsdSynch.c locking changes):
- Preallocate some memory for ACPI tasks early enough. We cannot use malloc(9) any more because spin mutex may be held here. The reserved memory can be tuned via debug.acpi.max_tasks tunable or ACPI_MAX_TASKS in kernel configuration. The default is 32 tasks. - Implement a custom taskqueue_fast to wrap the new memory allocation. This implementation is not the fastest in the world but we are being conservative here.
|
#
190340 |
|
23-Mar-2009 |
jkim |
Add a function to reset system time after resuming, which will be used by amd64 shortly. It can be turned off by setting "debug.acpi.reset_clock" tunable to zero.
|
#
177157 |
|
13-Mar-2008 |
jhb |
Rework how the nexus(4) device works on x86 to better handle the idea of different "platforms" on x86 machines. The existing code already handles having two platforms: ACPI and legacy. However, the existing approach was rather hardcoded and difficult to extend. These changes take the approach that each x86 hardware platform should provide its own nexus(4) driver (it can inherit most of its behavior from the default legacy nexus(4) driver) which is responsible for probing for the platform and performing appropriate platform-specific setup during attach (such as adding a platform-specific bus device). This does mean changing the x86 platform busses to no longer use an identify routine for probing, but to move that logic into their matching nexus(4) driver instead. - Make the default nexus(4) driver in nexus.c on i386 and amd64 handle the legacy platform. It's probe routine now returns BUS_PROBE_GENERIC so it can be overriden. - Expose a nexus_init_resources() routine which initializes the various resource managers so that subclassed nexus(4) drivers can invoke it from their attach routine. - The legacy nexus(4) driver explicitly adds a legacy0 device in its attach routine. - The ACPI driver no longer contains an new-bus identify method. Instead it exposes a public function (acpi_identify()) which is a probe routine that the MD nexus(4) drivers can use to probe for ACPI. All of the probe logic in acpi_probe() is now moved into acpi_identify() and acpi_probe() is just a stub. - On i386 and amd64, an ACPI-specific nexus(4) driver checks for ACPI via acpi_identify() and claims the nexus0 device if the probe succeeds. It then explicitly adds an acpi0 device in its attach routine. - The legacy(4) driver no longer knows anything about the acpi0 device. - On ia64 if acpi_identify() fails you basically end up with no devices. This matches the previous behavior where the old acpi_identify() would fail to add an acpi0 device again leaving you with no devices.
Discussed with: imp Silence on: arch@
|
#
172489 |
|
09-Oct-2007 |
njl |
Fix the HPET table probe routine to run from device_identify() instead of directly from acpi0. Before it would attach prior to the sysresource devices, causing the later allocation of its memory range to fail and print a warning like "acpi0: reservation of fed00000, 1000 (3) failed". Use an explicit define for our probe order base value of 10.
Help from: jhb Tested by: Abdullah Ibn Hamad Al-Marri <almarrie / gmail.com> MFC after: 3 days Approved by: re
|
#
170976 |
|
21-Jun-2007 |
njl |
Update the suspend/resume user API while maintaining backwards compat.
Improvements: * /etc/rc.suspend,rc.resume are always run, no matter the source of the suspend request (user or kernel, apm or acpi) * suspend now requires positive user acknowledgement. If a user program wants to cancel the suspend, they can. If one of the user programs hangs or doesn't respond within 10 seconds, the system suspends anyway. * /dev/apm is clonable, allowing multiple listeners for suspend events. In the future, xorg-server can use this to be informed about suspend even if there are other listeners (i.e. apmd).
Changes: * Two new ACPI ioctls: REQSLPSTATE and ACKSLPSTATE. Request begins the process of suspending by notifying all listeners. acpi is monitored by devd(8) and /dev/apm listener(s) are also counted. Users register their approval or disapproval via Ack. If anyone disapproves, suspend is vetoed. * Old user programs or kernel modules that used SETSLPSTATE continue to work. A message is printed once that this interface is deprecated. * acpiconf gains the -k flag to ack the suspend request. This flag is undocumented on purpose since it's only used by /etc/rc.suspend. It is not intended to be a permanent change and will be removed once a better power API is implemented. * S5 (power off) is no longer supported via acpiconf -s 5 or apm -z/-Z. This restores previous behavior of halt/shutdown -p being the interface. * Miscellaneous improvements to error reporting
Approved by: re
|
#
170783 |
|
15-Jun-2007 |
njl |
Convert magic to a uintptr_t. This should get rid of some warnings on gcc4.
|
#
169574 |
|
15-May-2007 |
takawata |
Add ACPI HPET table support.
Reviewed by:njl
|
#
167814 |
|
22-Mar-2007 |
jkim |
Catch up with ACPI-CA 20070320 import.
|
#
165875 |
|
07-Jan-2007 |
njl |
Re-work Cx handling to be per-cpu and asymmetrical, fixing support on modern dual-core systems as well.
- Parse the _CST packages for each cpu and track all the states individually, on a per-cpu basis.
- Revert to generic FADT/P_BLK based Cx control if the _CST package is not present on all cpus. In that case, the new driver will still support per-cpu Cx state handling. The driver will determine the highest Cx level that can be supported by all the cpus and configure the available Cx state based on that.
- Fixed the case where multiple cpus in the system share the same registers for Cx state handling. To do that, added a new flag parameter to the acpi_PkgGas and acpi_bus_alloc_gas functions that enable the caller to add the RF_SHAREABLE flag. This flag could also be useful to other callers (acpi_throttle?) in the tree but this change is not yet made.
- For Core Duo cpus, both cores seems to be taken out of C3 state when any one of the cores need to transition out. This broke the short sleep detection logic. It is disabled now if there is more than one cpu in the system for now as it fixed it in my case. This quirk may need to be re-enabled later differently.
- Added support to control cx_lowest on a per-cpu basis. There is still a generic cx_lowest to enable changing cx_lowest for all cpus with a single sysctl and for ease of use. Sample output for the new sysctl:
dev.cpu.0.cx_supported: C1/1 C2/1 C3/57 dev.cpu.0.cx_lowest: C3 dev.cpu.0.cx_usage: 0.00% 43.16% 56.83% dev.cpu.1.cx_supported: C1/1 C2/1 C3/57 dev.cpu.1.cx_lowest: C3 dev.cpu.1.cx_usage: 0.00% 45.65% 54.34% hw.acpi.cpu.cx_lowest: C3
This work was done by Stephane E. Potvin with some simple reworking by myself. Thank you.
Submitted by: Stephane E. Potvin <sepotvin / videotron.ca> MFC after: 2 weeks
|
#
160824 |
|
29-Jul-2006 |
njl |
Add a new sysctl, hw.acpi.handle_reboot. If set, acpi will attempt to perform the reboot action via the reset register instead of our legacy method. Default is 0 (use legacy). This is needed because some systems hang on reboot even though they claim to support the reset register.
MFC after: 2 days
|
#
159543 |
|
12-Jun-2006 |
njl |
Check in file missed in last commit. It made it into the MFC properly though.
|
#
153171 |
|
06-Dec-2005 |
njl |
Add KTR support and move some performance debugging variables in the EC to KTR. We're reusing the KTR_DEV level.
|
#
151948 |
|
01-Nov-2005 |
jkim |
Catch up with ACPI-CA 20051021 import
|
#
151935 |
|
01-Nov-2005 |
scottl |
Move HPET debugging under ACPI_TIMER in order to save a bitfield.
|
#
151931 |
|
01-Nov-2005 |
scottl |
Add proper debugging infrastructure for acpi_hpet.c.
|
#
148352 |
|
23-Jul-2005 |
njl |
Rewrite the acpi_battery interface to allow for other battery types (i.e., smart battery) and fix various bugs found during the cleanup.
API changes: * kernel access: Access to individual batteries is now via devclass_find("battery"). Introduce new methods ACPI_BATT_GET_STATUS (for _BST-formatted data) and ACPI_BATT_GET_INFO (for _BIF-formatted data). The helper function acpi_battery_get_battinfo() now takes a device_t instead of a unit # argument. If dev is NULL, this signifies all batteries.
* ioctl access: The ACPIIO_BATT_GET_TYPE and ACPIIO_BATT_GET_BATTDESC ioctls have been removed. Since there is now no need for a mapping between "virtual" unit and physical unit, usermode programs can just specify the unit directly and skip the old translation steps. In fact, acpiconf(8) was actually already doing this and virtual unit was the same as physical unit in all cases since there was previously only one battery type (acpi_cmbat). Additionally, we now map the ACPIIO_BATT_GET_BIF and ACPIIO_BATT_GET_BST ioctls for all batteries, if they provide the associated methods.
* apm compatibility device/ioctls: no change * sysctl: no change
Since most third-party applications use the apm(4) compat interface, there should be very few affected applications (if any).
Reviewed by: bruno MFC after: 5 days
|
#
146021 |
|
09-May-2005 |
marks |
Simplify the ACPI taskqueue implementation. Use a thread queue type instead of swi. This allows us to use the taskqueue_thread_* functions instead of rolling our own. It also avoids a double trip through the queue.
Submitted by: njl Reviewed by: sam
|
#
145352 |
|
21-Apr-2005 |
njl |
Add the tunable "debug.acpi.max_threads" to allow users to set the number of task threads to start on boot. Go back to a default of 3 threads to work around lost battery state problems. Users that need a setting of 1 can set this via the tunable. I am investigating the underlying issues and this tunable can be removed once they are solved.
MFC after: 2 days
|
#
144875 |
|
10-Apr-2005 |
njl |
Fix support for _PDC by using the proper version/length format for the buffer. Also, reference the Intel document where the _PDC values were found. This now supports ACPI-assisted SpeedStep on my borrowed T42.
|
#
144629 |
|
04-Apr-2005 |
njl |
Add the acpi_get_features() method. This method is called on child drivers to see what features they may support before calling identify/probe/attach. This is necessary because the ACPI 3.0 spec requires driver support be advertised before running any methods. For now, the flags are as specified in for the _PDC and _OSC methods but we can support private flags as needed.
Add an implementation of this for acpi_cpu. It checks all its children (notably cpufreq drivers) and calls the _PDC method to report the results.
|
#
144193 |
|
27-Mar-2005 |
njl |
Serialize task queue by starting only one thread instead of three. This may help with various interdependencies between subsystems. More testing is needed to understand what the underlying issues are here.
Tested by: Juho Vuori MFC after: 2 days
|
#
143002 |
|
02-Mar-2005 |
obrien |
Fix SCM ID's.
|
#
142984 |
|
02-Mar-2005 |
njl |
Protect acpivar.h with _KERNEL. No user parts inside currently.
|
#
142753 |
|
28-Feb-2005 |
njl |
Protect against multiple includes and use _KERNEL to protect the PCI fns.
|
#
142257 |
|
22-Feb-2005 |
jhb |
- Add a new quirk to indicate that pin 0 of the first I/O APIC is really IRQ 0 and not an ExtINT pin. The MADT enumerators ignore the PC-AT flag and ignore overrides that map IRQ 0 to pin 2 when this quirk is present. - Add a block comment above the quirks to document each quirk so that we can use more verbose descriptions quirks.
MFC after: 2 weeks
|
#
141371 |
|
05-Feb-2005 |
njl |
Convert the acpi_bus_alloc_gas() and acpi_PkgGas() APIs to output the memory type. This is needed if the resource is to be released later. The RID is still also present, though less necessary since rman_get_rid() can be used to obtain it from the resource.
|
#
138825 |
|
13-Dec-2004 |
njl |
Unify ACPI_DEBUG support for all OEM drivers under ACPI_OEM. Since more than one will never be supported on the same platform, this does not hurt debugging.
MFC after: 3 days
|
#
138774 |
|
13-Dec-2004 |
scottl |
Allow the acpi_ibm module to be built with ACPI_DEBUG.
|
#
136270 |
|
08-Oct-2004 |
njl |
Update a quirk for the ASUS P5A to disable the timer. It appears to work fine with acpi but the timer runs twice as fast. Note that the main problem (system doesn't work properly with acpi disabled) should be fixed separately.
Changes: * Add a quirk to disable the timer * Merge the P5A and P5A-B quirks since they appear to be based on the same ASL.
PR: i386/72450 Tested by: Kevin Oberman <oberman es.net> MFC after: 3 days
|
#
135574 |
|
22-Sep-2004 |
jhb |
Add a couple of macros to extract the PCI slot (device) and function from an ACPI _ADR value and use that rather than inlining the same shifts and masks everywhere.
|
#
134217 |
|
23-Aug-2004 |
njl |
Rework sysresource management. Instead of having each sysresource object hold its own values, pass them up to the parent (acpi0) and merge/uniq them on the way. After the namespace evaluation, acpi will reserve these resources and manage them via rman before bus_generic_probe() and bus_generic_attach(). This is necessary because some systems specify conflicting resources in separate sysresource objects. It's also cleaner in that the interface between sysresource and acpi is now merely the parent's resource list. This code handles the following cases:
1. Unique resource: add it to the parent via bus_set_resource(). 2. New wholly contained in old: discard new. 3. New tail overlaps old head: grow old head downward. AND/OR 4. New head overlaps old tail: grow old tail upward.
Tested by: Pawel Worach <sajd_at_telia.com> Tested by: Radek Kozlowski <radek_at_raadradd.com> MFC after: 5 days
|
#
133933 |
|
18-Aug-2004 |
njl |
Remove the ACPIIO_ENABLE and ACPIIO_DISABLE ioctls as well as all callers. These ioctls attempted to enable and disable the ACPI interpreter at runtime. In practice, it is not possible to boot with ACPI and then disable it on many systems and trying to do so can cause crashes, interrupt storms, etc. Binary compatibility with userland is retained.
MFC after: 2 days
|
#
133611 |
|
13-Aug-2004 |
njl |
MPSAFE locking
* Add and comment our locking primitives. The mutex primitives use a a static mutex and the serialization ones use a static sx lock. A global acpi_mutex is used for access to global resources (i.e., writes to the SMI_CMD register.) * Remove 4.x compat defines.
|
#
133188 |
|
05-Aug-2004 |
njl |
Add flags for _STA (status) methods and convenience macros for checking the presence of batteries and devices.
|
#
132049 |
|
12-Jul-2004 |
njl |
Add the ability to detach a battery. Now batteries that are detached are also removed from the battery list.
|
#
131341 |
|
30-Jun-2004 |
njl |
Move flags into a private ivar so it can't collide with device flags. Unify the code to disable GPEs with the enable code. Shutdown is handled the same way. ACPI now does all wake/sleep prep for child devices so now they no longer need to call external functions in the suspend/resume path. Add the flags to non-ACPI busses (i.e., pci).
|
#
131312 |
|
30-Jun-2004 |
njl |
Add machdep quirks functions. On i386, this disables acpi on systems with BIOS dates earlier than Jan 1, 1999. Add prototypes and quirks flags.
|
#
131283 |
|
29-Jun-2004 |
njl |
Staticize acpi_MatchHid() and include acpi_if.h
|
#
130981 |
|
23-Jun-2004 |
jhb |
- Defer BUS_CONFIG_INTR() on ACPI IRQ resources until the resources are 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)
|
#
130585 |
|
16-Jun-2004 |
phk |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
#
130439 |
|
13-Jun-2004 |
njl |
Add support to ACPI to manage its own resources. Previously, resource 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.
|
#
130417 |
|
13-Jun-2004 |
njl |
Associate a device_t with an ACPI_HANDLE. This make AcpiWalkNamespace more useful. If ACPI-CA allowed null object handlers, we wouldn't need the placeholder function.
|
#
129806 |
|
28-May-2004 |
njl |
Style cleanups. "extern" is unneeded for function prototypes.
|
#
129805 |
|
28-May-2004 |
njl |
Update the new suspend/resume GPE methods to properly limit the GPE 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.
|
#
129783 |
|
27-May-2004 |
njl |
Restructure the wake GPE API. Now there are three functions:
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.
|
#
129594 |
|
22-May-2004 |
njl |
Revert the previous commit. The bus accessor macros do not check the 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
|
#
129395 |
|
18-May-2004 |
njl |
Use the simpler __BUS_ACCESSOR macros for ivars instead of defining them ourselves.
|
#
128993 |
|
06-May-2004 |
njl |
Select the highest valid (i.e., S3) sleep state for the default for the sleep button. Change the default for the lid switch to NONE. This can be overridden in /etc/sysctl.conf as desired.
|
#
128561 |
|
22-Apr-2004 |
philip |
Add the ACPI Asus extras driver. Provides support for cool ACPI-controled 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)
|
#
128503 |
|
20-Apr-2004 |
njl |
Move the timer difference convenience function from acpi_cpu.c to make it 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.
|
#
128225 |
|
14-Apr-2004 |
njl |
Style cleanups to reduce diffs to locking tree.
|
#
128046 |
|
09-Apr-2004 |
njl |
Include the prototype for acpi_GetReference.
|
#
127700 |
|
01-Apr-2004 |
njl |
Move the ivar accessing routines back to inlines (reverting acpivar.h 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.
|
#
127679 |
|
31-Mar-2004 |
njl |
Add an interface to pass an argument to the resource parsing functions. This is just groundwork for changing sysresource behavior.
PR: Submitted by: Reviewed by: Approved by: Obtained from: MFC after:
|
#
126766 |
|
09-Mar-2004 |
njl |
Use an unsigned int instead of an int for the Get/Set Integer interface.
Pointed out by: le
|
#
126560 |
|
03-Mar-2004 |
njl |
Change to acpi_{Get,Set}Integer to provide both methods. Convert all callers to the new API.
Submitted by: Mark Santcroos <marks@ripe.net>
|
#
126517 |
|
03-Mar-2004 |
njl |
Add support for quirks for acpi tables. Key off OEM vendor and revision. 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.
|
#
126015 |
|
19-Feb-2004 |
njl |
Use ACPI_NEXT_RESOURCE instead of defining our own copy. The one provided with ACPI-CA is identical now.
|
#
125679 |
|
11-Feb-2004 |
njl |
Prefer buttons defined in the AML over the ones in the FADT. Some 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:
|
#
125526 |
|
06-Feb-2004 |
philip |
Make all ACPI debug layers unique again. This makes debugging a more pleasant experience (for certain definition of 'pleasant').
Submitted by: Mark Santcroos <marks@ripe.net> Approved by: njl (mentor)
|
#
125047 |
|
26-Jan-2004 |
jhb |
Move the code to initialize ACPI-CA into a separate acpi_Startup() function that other modules can call to initialize ACPI-CA before the new-bus probe and change acpi_identify() to call it.
Reviewed by: njl
|
#
124497 |
|
13-Jan-2004 |
jhb |
Add a component constant for ACPI_TOSHIBA to fix compilation of acpi_toshiba(4) driver with ACPI_DEBUG and thus fix LINT on i386.
|
#
123776 |
|
23-Dec-2003 |
njl |
Remove the device_t parameter from package routines that only used it to print an error message. Update all callers of the package routines.
|
#
122765 |
|
15-Nov-2003 |
njl |
Add acpi_package.c with routines for validating packages and pulling various data types from them. This is loosely based on the acpi_cmbat macros (by Mike Smith) and will eventually replace them.
|
#
122500 |
|
11-Nov-2003 |
jhb |
Add an acpi_OverrideInterruptLevel() method that OSPM can use to override the InterruptLevel used for the SCI.
|
#
121493 |
|
25-Oct-2003 |
njl |
Add devctl(4) notify support to ACPI. Various subsystems now notify userland whenever events occur. See the example in devd.conf below to see how to use it.
|
#
119969 |
|
10-Sep-2003 |
marcel |
Extend the ACPI resource handling to make use of the BUS_CONFIG_INTR() 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.
|
#
119529 |
|
28-Aug-2003 |
njl |
Style and whitespace changes. Also, make the ivar functions non-inline since inlining failed due to the size of BUS_*
|
#
117795 |
|
19-Jul-2003 |
njl |
Add ECDT (ACPI 2.0) support. This allows the EC to be enabled before the 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
|
#
117648 |
|
15-Jul-2003 |
njl |
Remove old defines since they are no longer used.
|
#
114977 |
|
13-May-2003 |
jhb |
Add some extra #ifdef stubs so that this compiles on 4.8.
Approved by: re (rwatson/bmah)
|
#
114246 |
|
29-Apr-2003 |
njl |
Support functions for the new ACPI import. * 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
|
#
112581 |
|
24-Mar-2003 |
jake |
Fix 2 vm_offset_t -> vm_paddr_t missed in previous commit.
Sponsored by: DARPA, Network Associates Laboratories
|
#
107753 |
|
11-Dec-2002 |
takawata |
Add sysctl knob to stop disabling acpi on shutdown.
Approved by: re(jhb)
|
#
106255 |
|
31-Oct-2002 |
iwasaki |
Invoke 3 ACPI task threads as default if option ACPI_MAX_THREADS is not defined. To make previous default behavior (ACPI_MAX_THREADS undefined), define option ACPI_MAX_THREADS as 0.
|
#
105280 |
|
16-Oct-2002 |
jhb |
- Include lock headers on current in this header instead of putting #if's in all the other ACPI source files. - Use splhigh() for the ACPI subsystem lock on 4-stable.
Sponsored by: The Weather Channel
|
#
103015 |
|
06-Sep-2002 |
jhb |
Add a helper routine acpi_SetIntrModel() to call the _PIC method to set the interrupt model in use so that ACPI can properly route interrupts for machines using APIC's or SAPIC's.
|
#
102553 |
|
28-Aug-2002 |
iwasaki |
Resolve conflicts arising from the ACPI CA 20020815 import.
|
#
102402 |
|
25-Aug-2002 |
iwasaki |
Add new sysctl MIB (hw.acpi.sleep_delay) to specify the delay (in seconds) before ACPI sleep. Some machines might need this to sleep by Hot-key.
|
#
100497 |
|
22-Jul-2002 |
iwasaki |
Add device(power/sleep button and lid) wake function from sleeping state. 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.
|
#
92739 |
|
20-Mar-2002 |
alfred |
Remove __P.
|
#
91640 |
|
04-Mar-2002 |
iwasaki |
Add generalized power profile code. 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
|
#
91127 |
|
23-Feb-2002 |
msmith |
Add our own private defines for driver debug layers. Obsolete the acpi_GetInto* interfaces.
Fix a typo to be less appropriate.
|
#
90014 |
|
31-Jan-2002 |
takawata |
Fix irq/drq handling. IRQ and DRQ resource information can be get in one object for one resource. Array of values in a object means possible values for the object.
|
#
89054 |
|
08-Jan-2002 |
msmith |
Staticise devclasses and some unnecessarily global variables.
|
#
88470 |
|
25-Dec-2001 |
iwasaki |
Oops, wrong option name. It's should be ACPI_MAX_THREADS, not ACPI_NO_THREADS.
|
#
88420 |
|
22-Dec-2001 |
iwasaki |
Add OS layer ACPI mutex and threading support. - 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.
|
#
87566 |
|
09-Dec-2001 |
iwasaki |
Disable sleep requests for 5 sec after wakeup. This is needed for 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.
|
#
86552 |
|
18-Nov-2001 |
iwasaki |
Cleanups of verbose printing. All the messages for the debugging is disabled unless verbose flag is set. Also fix some messages in terms of English. The critical messages and error messages in probe/attach routine are unchanged by this commit.
|
#
86133 |
|
06-Nov-2001 |
iwasaki |
Add S4BIOS sleep (BIOS hibernation) and DSDT overriding support. - 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.
|
#
85729 |
|
30-Oct-2001 |
iwasaki |
Some improvements of control method battery driver. - Add a new MIB for battery info expire time in order to make it changeable. Battery info expire time can be specified by hw.acpi.battery.info_expire in sec. - Add own MALLOC type and fix some potential memory leakages. - Change some frequent printings to verbose printing. - Stop timeout during acpi_cmbat_get_bst() too. This should reduce the races with BIF evaluation. - Remove acpi_cmbat_get_bif() invocation from acpi_cmbat_attach(). This was redundant because this should be called from acpi_cmbat_timeout() now.
|
#
85699 |
|
29-Oct-2001 |
iwasaki |
Some small improvements of ACPI thermal driver. - 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
|
#
85556 |
|
26-Oct-2001 |
iwasaki |
Add APM compatibility feature to ACPI. 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
|
#
84575 |
|
06-Oct-2001 |
peter |
Fix some 64-bit uncleanliness.
|
#
84574 |
|
06-Oct-2001 |
peter |
Fix some style bugs before fixing some real bugs.
|
#
82535 |
|
29-Aug-2001 |
msmith |
Note that now that some ISA devices will attach to ACPI, we need to keep the ivar indexes that ISA uses free.
|
#
80604 |
|
30-Jul-2001 |
msmith |
- Prevent the ACPI code from being loaded as a module other than at boot time. Loading as a module once the system is up and running doesn't make any sense.
- Fix acpi_FindIndexedResource (it would only check the first resource), changes the calling interface.
- Add a new helper function (acpi_AppendBufferResource) to help building buffers containing resources.
|
#
80078 |
|
21-Jul-2001 |
msmith |
Convert from acpi_strerror() to AcpiFormatException()
Fix dangling include of the dear departed acpi_ecreg.h
|
#
80066 |
|
21-Jul-2001 |
msmith |
The API for loading tables changed (we no longer explicitly search for the RSDP, it's now found via a callback).
AcpiOsSleepUsec() went away, use AcpiOsSleep() instead (we could use AcpiOsStall() too)
AcpiFormatException() was changed to make more sense (it behaves like our old acpi_strerror() did), so throw acpi_strerror() away (still #defined in acpivar.h though, we need to sweep these seperately).
|
#
80028 |
|
20-Jul-2001 |
takawata |
Add ACPI S2-S4BIOS Suspend/Resume code. Some problems may remain.
Reviewed by:iwasaki
|
#
79387 |
|
07-Jul-2001 |
msmith |
Add acpi_GetTableIntoBuffer, to aid in fetching tables.
|
#
79374 |
|
06-Jul-2001 |
msmith |
Add support for system power profiles; select "performance" when AC power is available and "economy" when it is not.
|
#
79282 |
|
05-Jul-2001 |
msmith |
Add a new helper function for finding resources in resource buffers.
Move the ACPI generic battery code into a new file.
|
#
78994 |
|
29-Jun-2001 |
msmith |
Add ACPI subsystem mutex support, currently disabled. This implements a private mutex we can use to wrap the ACPI subsystem proper.
|
#
78915 |
|
28-Jun-2001 |
msmith |
Sync to my work in progress:
- Reorder the acpi_* functions in a sensible fashion - Add acpi_ForeachPackageObject and acpi_GetHandleInScope - Use the new debugging layer/level names - Implement most of the guts of the acpi_thermal module; passive cooling isn't there yet, but active cooling should work. - Implement power resource handling (acpi_powerres.c)
This compiles and mostly works, but my test coverage is small, so feedback is welcome.
|
#
78662 |
|
23-Jun-2001 |
iwasaki |
Add sysctl interface (Read-only) for temprature, AC-line and Battery. Patches for acpi_cmbat.c submitted by Munehiro Matsuda.
|
#
77432 |
|
29-May-2001 |
msmith |
- Updates for new constant naming in the ACPI CA 20010518 update. - Use __func__ instead of __FUNCTION. - Support power-off to S3 or S5 (takawata) - Enable ACPI debugging earlier (with a sysinit) - Fix a deadlock in the EC code (takawata) - Improve arithmetic and reduce the risk of spurious wakeup in AcpiOsSleep. - Add AcpiOsGetThreadId. - Simplify mutex code (still disabled).
|
#
71872 |
|
31-Jan-2001 |
msmith |
ACPI_NUMBER becomes ACPI_INTEGER. acpi_EvaluateNumber becomes acpi_EvaluateInteger.
Use acpi_EvaluateInteger instead of doing things the hard way where possible.
AcpiSetSystemSleepState (unofficial) becomes AcpiEnterSleepState.
Use the AcpiGbl_FADT pointer rather than searching for the FADT.
|
#
71001 |
|
13-Jan-2001 |
jhb |
Add 3 new dynamic sysctl's to control the sleep states switched to on a power button, sleep button, or lid close event. The sysctl's use the ACPI sleep state names S0, S1, S2, S3, S4, S4B, and S5.
Reviewed by: iwasaki
|
#
69744 |
|
08-Dec-2000 |
msmith |
- Convert a lot of homebrew debugging output to use the ACPI CA debugging infrastructure. It's not perfect, but it's a lot better than what we've been using so far. The following rules apply to this: o BSD component names should be capitalised o Layer names should be taken from the non-CA set for now. We may elect to add some new BSD-specific layers later.
- Make it possible to turn off selective debugging flags or layers by listing them in debug.acpi.layer or debug.acpi.level prefixed with !.
- Fully implement support for avoiding nodes in the ACPI namespace. Nodes may be listed in the debug.acpi.avoid environment variable; these nodes and all their children will be ignored (although still scanned over) by ACPI functions which scan the namespace. Multiple nodes can be specified, separated by whitespace.
- Implement support for selectively disabling ACPI subsystem components via the debug.acpi.disable environment variable. The following components can be disabled: o bus creation/scanning of the ACPI 'bus' o children attachment of children to the ACPI 'bus' o button the acpi_button control-method button driver o ec the acpi_ec embedded-controller driver o isa acpi replacement of PnP BIOS for ISA device discovery o lid the control-method lid switch driver o pci pci root-bus discovery o processor CPU power/speed management o thermal system temperature detection and control o timer ACPI timecounter Multiple components may be disabled by specifying their name(s) separated by whitespace.
- Add support for ioctl registration. ACPI subsystem components may register ioctl handlers with the /dev/acpi generic ioctl handler, allowing us to avoid the need for a multitude of /dev/acpi* control devices, etc.
|
#
67761 |
|
28-Oct-2000 |
msmith |
Initial FreeBSD OSPM (operating system power management) modules for ACPICA. Most of these are still works in progress. Support exists for:
- Fixed feature and control method power, lid and sleep buttons. - Detection of ISA PnP devices using ACPI namespace. - Detection of PCI root busses using ACPI namespace. - CPU throttling and sleep states (incomplete) - Thermal monitoring and cooling control (incomplete) - Interface to platform embedded controllers (mostly complete) - ACPI timer (incomplete) - Simple userland control of sleep states. - Shutdown and poweroff.
|