#
272461 |
|
02-Oct-2014 |
gjb |
Copy stable/10@r272459 to releng/10.1 as part of the 10.1-RELEASE process.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
256281 |
|
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
252576 |
|
03-Jul-2013 |
jhb |
Don't perform the acpi_DeviceIsPresent() check for PCI-PCI bridges. If we are probing a PCI-PCI bridge it is because we found one by enumerating the devices on a PCI bus, so the bridge is definitely present. A few BIOSes report incorrect status (_STA) for some bridges that claimed they were not present when in fact they were.
While here, move this check earlier for Host-PCI bridges so attach fails before doing any work that needs to be torn down.
PR: kern/91594 Tested by: Jack Vogel @ Intel MFC after: 1 week
|
#
246042 |
|
28-Jan-2013 |
jkim |
Fix two misusages of return_*() macros for ACPICA.
Noticed by: avg
|
#
246041 |
|
28-Jan-2013 |
jkim |
Fix white spaces for style consistency.
|
#
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
|
#
210864 |
|
05-Aug-2010 |
jhb |
- Retire acpi_pcib_resume(). It is has just been an alias for bus_generic_resume() since the pci_link(4) driver was added. - Change the ACPI PCI-PCI bridge driver to inherit most of its methods from the generic PCI-PCI bridge driver. In particular, this will now restore PCI config registers for ACPI PCI-PCI bridges.
Tested by: Oleg Sharoyko osharoiko of gmail
|
#
193530 |
|
05-Jun-2009 |
jkim |
Import ACPICA 20090521.
|
#
185308 |
|
25-Nov-2008 |
ganbold |
Remove unused variable.
Found with: Coverity Prevent(tm) CID: 3678
Approved by: njl
|
#
153066 |
|
03-Dec-2005 |
jhb |
Force any hardwire-routed interrupts to level trigger and active low polarity. Some machines route PCI IRQs to an ISA IRQ but fail to include an interrupt override entry to set the polarity and trigger of the given ISA IRQ in their MADT table.
PR: usb/74989 Reported by: Julien Gabel jpeg at thilelli dot net MFC after: 1 week
|
#
153016 |
|
02-Dec-2005 |
jhb |
Add a missing newline to a printf.
MFC after: 1 week
|
#
152170 |
|
07-Nov-2005 |
jhb |
Work around at least one busted BIOS. If we get a source index in a _PRT entry that is not zero, assume that it is really a hard-wired IRQ (commonly used for APIC routing) and not a source index. In practice, we've only ever seen source indices of 0 for legitimate non-hard-wired _PRT entries.
Reviewed by: njl Tested by: Alex Lyashkov shadow at psoft dot net MFC after: 2 weeks
|
#
150003 |
|
11-Sep-2005 |
obrien |
Canonize the include of acpi.h.
|
#
143301 |
|
08-Mar-2005 |
jhb |
- If we fail to find an entry in the PRT, output a warning message. - Fix a bug in the same condition where we forgot to drop the ACPI pcib lock. This fixes hangs after the pcib0 attach on some machines.
Tested by: sos (2)
|
#
140916 |
|
27-Jan-2005 |
njl |
Consistently use pcib for a printf.
|
#
140447 |
|
18-Jan-2005 |
jhb |
For the sake of consistency, look up link devices relative to the root object (/) rather than the pci bus object when walking the _PRT to force attach devices. We already look up relative to the root object when doing interrupt routing.
Suggested by: njl
|
#
139339 |
|
27-Dec-2004 |
njl |
Remove trailing whitespace.
|
#
138033 |
|
23-Nov-2004 |
jhb |
Rework the ACPI PCI link code. - Use a new-bus device driver for the ACPI PCI link devices. The devices are called pci_linkX. The driver includes suspend/resume support so that the ACPI bridge drivers no longer have to poke the links to get them to handle suspend/resume. Also, the code to handle which IRQs a link is routed to and choosing an IRQ when a link is not already routed is all contained in the link driver. The PCI bridge drivers now ask the link driver which IRQ to use once they determine that a _PRT entry does not use a hardwired interrupt number. - The new link driver includes support for multiple IRQ resources per link device as well as preserving any non-IRQ resources when adjusting the IRQ that a link is routed to. - The entire approach to routing when using a link device is now link-centric rather than pci bus/device/pin specific. Thus, when using a tunable to override the default IRQ settings, one now uses a single tunable to route an entire link rather than routing a single device that uses the link (which has great foot-shooting potential if the user tries to route the same link to two different IRQs using two different pci bus/device/pin hints). For example, to adjust the IRQ that \_SB_.LNKA uses, one would set 'hw.pci.link.LNKA.irq=10' from the loader. - As a side effect of having the link driver, unused link devices will now be disabled when they are probed. - The algorithm for choosing an IRQ for a link that doesn't already have an IRQ assigned is now much closer to the one used in $PIR routing. When a link is routed via an ISA IRQ, only known-good IRQs that the BIOS has already used are used for routing instead of using probabilities to guess at which IRQs are probably not used by an ISA device. One change from $PIR is that the SCI is always considered a viable ISA IRQ, so that if the BIOS does not setup any IRQs the kernel will degenerate to routing all interrupts over the SCI. For non ISA IRQs, interrupts are picked from the possible pool using a simplistic weighting algorithm.
Tested by: ru, scottl, others on acpi@ Reviewed by: njl
|
#
137590 |
|
11-Nov-2004 |
jhb |
Only warn about missing _PRT tables if bootverbose is set. I've yet to see a bridge without a _PRT were a _PRT was needed. Instead, the warning in dmesg is a false warning and only serves to cause unnecessary concern.
MFC after: 1 week
|
#
133621 |
|
13-Aug-2004 |
njl |
MPSAFE locking
* Serialize calls to acpi_pcib_route_interrupt(). * Note that acpi_pcib_attach() should not be called concurrently.
|
#
133585 |
|
12-Aug-2004 |
njl |
Only print the link name if there is a link. For the hardwired case, don't bother printing it. This fixes a panic and acpi_name() has been more robust as well.
Bug from: Tai-hwa Liang <avatar-at-mmlab.cse.yzu.edu.tw>
|
#
133533 |
|
12-Aug-2004 |
njl |
Fix the PRT entry code in acpi_pci_link to always add the entry, even if there is no irq link. Since we now use the stored copy of PRT, not the one that used to be passed into acpi_pcib_route_interrupt(), we need it in the list. [1]
Fix a bug in acpi_pci_find_prt() where we weren't checking the bus, thus choosing the wrong PRT entry to use for routing the link. Also, add a printf for the case where the PRT entry is not found as this should not happen.
Tested by: marcel [1]
|
#
133500 |
|
11-Aug-2004 |
njl |
Re-work ACPI PCI IRQ routing (_PRT, link devices). The old approach was incomplete in that the PRT routing was not aware of link programming. Fix this by doing all routing through the link devices. The new algorithm for setting up links is:
1. Read _CRS to get current setting. If invalid (not in _PRS), then set to 0. 2. Attempt to call _DIS on the link. If successful, mark the link as not routed. Otherwise, assume it still is.
Then when a routing request occurs:
3. Update weights for all IRQs 4. Attempt to route the initial IRQ if valid 5. If that fails, walk through the sorted list, attempting to route IRQs. 6. Configure the trigger/polarity based on _PRS.
Other changes: * Add acpi_pci_find_prt() to look up the PRT entry for a given device and acpi_pci_link_route() to select/route the best IRQ for it. * Remove duplicated code in acpi_pcib_route_interrupt() that picked the first IRQ from _PRS. * Remove unneeded arguments from acpi_pcib_resume() and friends. * Ignore _STA on link devices but report if it seems strange. * Add a prt_source handle to the PRT structure since the ACPI struct ACPI_PCI_ROUTING_TABLE uses a fixed-size entry for it. We'll need to dynamically size this object if we want to use it the same way ACPI-CA does. Null-terminate the source.
Tested by: Luo Hong <luohong99_at_mails.tsinghua.edu.cn>, Jeffrey Katcher <jmkatcher_at_yahoo.com> Info from: jhb, Len Brown (Intel)
|
#
131398 |
|
01-Jul-2004 |
jhb |
Trim a few things from the dmesg output and stick them under bootverbose to cut down on the clutter including PCI interrupt routing, MTRR, pcibios, etc.
Discussed with: USENIX Cabal
|
#
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)
|
#
130196 |
|
07-Jun-2004 |
jhb |
- Use PCI_INVALID_IRQ macro rather than a magic number. - Remove obsolete comment about APIC_IO routing.
|
#
128990 |
|
06-May-2004 |
njl |
Make unnecessary globals static and remove unused includes.
Pointed out by: cscout
|
#
128436 |
|
19-Apr-2004 |
njl |
Add a temporary workaround for acpi_AppendBufferResource() returning with a NULL crsbuf pointer. This shouldn't happen if it returns AE_OK. We'll figure out why this is happening later.
Submitted by: Bruno Ducrot <ducrot@poupinou.org>
|
#
127316 |
|
22-Mar-2004 |
njl |
Use the correct length for appending an extended irq resource. This may have broken APIC routing. This bug has been present since rev 1.33.
|
#
127315 |
|
22-Mar-2004 |
njl |
Shorten some printfs to fit better. No other functional changes.
|
#
127314 |
|
22-Mar-2004 |
njl |
Whitespace and comment changes. No MD5 change to the object file.
|
#
127240 |
|
20-Mar-2004 |
njl |
Fix loop termination condition for parsing resources in _PRS buffers. This completes the effort to handle dependent functions, which are used in some machines for irq link resources. Also, clean up some nearby comments while I'm at it.
|
#
127156 |
|
18-Mar-2004 |
njl |
Support the DPF (start dependent function) resource type in parsing _PRS. This should fix this error people get attaching cardbus controllers:
pcib0: _PRS resource entry has unsupported type 2
|
#
123642 |
|
18-Dec-2003 |
kan |
Initialize acpi buffer structs early in order to avoid freeing unallocated pointers later in done: section.
|
#
123619 |
|
18-Dec-2003 |
njl |
Add support for multiple CIDs since _CID can contain a package of values. Implement this in acpi_MatchHid() and acpi_isa_get_compatid(). This should fix mouse support for some users.
Move all users of AcpiGetObjectInfo() to use dynamic storage instead of a devinfo on the stack. This is necessary since ACPI-CA needs to allocate different sized arrays for the CompatList.
|
#
122928 |
|
20-Nov-2003 |
jhb |
Fix a typo in my patches to support extended IRQ resources that broke the type checking for _PRS for a link device's interrupt resources.
Approved by: re (scottl)
|
#
122706 |
|
14-Nov-2003 |
jhb |
Improve support for extended IRQ resources: - 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
|
#
119418 |
|
24-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor style cleanups.
|
#
119281 |
|
22-Aug-2003 |
imp |
Prefer new location of pci include files (which have only been in the tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
|
#
117530 |
|
13-Jul-2003 |
njl |
Update code to work with 0619 dist
* 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
|
#
106158 |
|
29-Oct-2002 |
jhb |
Add a missing newline to the end of a device_printf().
Reported by: Michael G. Petry <petry@NetMasters.Com>
|
#
104494 |
|
05-Oct-2002 |
iwasaki |
Add code for ACPI PCI link object manipulation. This allocate the best IRQ to boot-disable devices (have IRQ 0). Allocated IRQ will be used for PCI interrupt routing when ACPI is enabled.
Note that verbose messaging enabled for the time being so that people can easily notice the strange behavior if it happened.
|
#
104431 |
|
03-Oct-2002 |
peter |
Fix printf format errors on 64 bit systems where sizes are long instead of just int.
|
#
104430 |
|
03-Oct-2002 |
peter |
Display the name of the acpi node that we do not find the pci interrupt routing table for.
|
#
103869 |
|
23-Sep-2002 |
jhb |
Now that we only probe host-PCI bridges once, we no longer have to check to see if we have been probed before by checking for a pciX bus device.
|
#
102977 |
|
05-Sep-2002 |
jhb |
Make the printf messages when routing interrupts more consistent in the various PCI bridge drivers.
|
#
102447 |
|
26-Aug-2002 |
jhb |
Overhaul the ACPI PCI bridge driver a bit: - Add an ACPI PCI-PCI bridge driver (the previous driver just handled Host-PCI bridges) that is a PCI driver that is a subclass of the generic PCI-PCI bridge driver. It overrides probe, attach, read_ivar, and pci_route_interrupt. - The probe routine only succeeds if our parent is an ACPI PCI bus which we test for by seeing if we can read our ACPI_HANDLE as an ivar. - The attach routine saves a copy of our handle and calls the new acpi_pcib_attach_common() function described below. - The read_ivar routine handles normal PCI-PCI bridge ivars and adds an ivar to return the ACPI_HANDLE of the bus this bridge represents. - The route_interrupt routine fetches the _PRT (PCI Interrupt Routing Table) from the bridge device's softc and passes it off to acpi_pcib_route_interrupt() to route the interrupt. - Split the old ACPI Host-PCI bridge driver into two pieces. Part of the attach routine and most of the route_interrupt routine remain in acpi_pcib.c and are shared by both ACPI PCI bridge drivers. - The attach routine verifies the PCI bridge is present, reads in the _PRT for the bridge, and attaches the child PCI bus. - The route_interrupt routine uses the passed in _PRT to route a PCI interrupt. The rest of the driver is the ACPI Host-PCI bridge specific bits that live in acpi_pcib_acpi.c. - We no longer duplicate pcib_maxslots but use it directly. - The driver now uses the pcib devclass instead of its own devclass. This means that PCI busses are now only children of pcib devices. - Allow the ACPI_HANDLE for the child PCI bus to be read as an ivar of the child bus. - Fetch the _PRT for routing PCI interrupts directly from our softc instead of walking the devclass to find ourself and then fetch our own softc.
With this change and the new ACPI PCI bus driver, ACPI can now properly route interrupts for devices behind PCI-PCI bridges. That is, the Itanium2 with like 10 PCI busses can now boot ok and route all the PCI interrupts. Hopefully this will also fix problems people are having with CardBus bridges behind PCI-PCI bridges not properly routing interrupts when ACPI is used.
Tested on: i386, ia64
|
#
102439 |
|
26-Aug-2002 |
jhb |
In acpi_pcib_route_interrupt(), the code claims to check to see if a PCI LNK device (interrupt source provider sort of) is present before using it, but the code actually tested the status (_STA) of the PCI bridge device doing the routing, not the actual LNK device. Fix it to check the status of the LNK device.
|
#
96926 |
|
19-May-2002 |
peter |
Brutally deal with __func__ being 'const char *' on gcc-3.1.
|
#
92849 |
|
21-Mar-2002 |
msmith |
Fix error introduced in the 20020217 update, where GetPossibleResources was spammed with GetCurrentResources.
Submitted by: Munehiro Matsuda <haro@h4.dion.ne.jp>
|
#
91124 |
|
23-Feb-2002 |
msmith |
Match namespace cleanup changes in ACPI CA 20020217 update. Use ACPI_SUCCESS/ACPI_FAILURE consistently. The AcpiGetInto* interfaces are obsoleted by ACPI_ALLOCATE_BUFFER.
Use _ADR as well as _BBN to get our bus number.
|
#
89054 |
|
08-Jan-2002 |
msmith |
Staticise devclasses and some unnecessarily global variables.
|
#
84630 |
|
07-Oct-2001 |
dfr |
Make the interrupt routing a bit less chatty unless bootverbose is set.
|
#
84573 |
|
06-Oct-2001 |
peter |
Fix a stack trashing bug when int != sizeof(pointer) This fixes the ia64 boot! We have scsi disks!
|
#
84500 |
|
04-Oct-2001 |
msmith |
Update usage of AcpiEnableEvent to reflect a new argument.
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.
|
#
82372 |
|
26-Aug-2001 |
msmith |
Updates to match the ACPI CA 20010816 import:
- New debug macro (ACPI_DEBUG_PRINT), reducing debug-case code size. - New debug level/subsystem codes.
|
#
81093 |
|
03-Aug-2001 |
msmith |
Shoud build resources in the _CRS buffer. Oops.
Submitted by: "neckpain@nettaxi.com" <neckpain@nettaxi.com>
|
#
80605 |
|
30-Jul-2001 |
msmith |
The current resource buffer returned from an interrupt link device in the case where there are no interrupts routed for it does not contain enough space to use it to route an interrupt. In the case where we need to route an interrupt, throw away the returned buffer and create a new one containing the interrupt we want.
|
#
80078 |
|
21-Jul-2001 |
msmith |
Convert from acpi_strerror() to AcpiFormatException()
Fix dangling include of the dear departed acpi_ecreg.h
|
#
79384 |
|
07-Jul-2001 |
msmith |
Oops, have to use AcpiSetCurrentResources, not invoke the _SRS method directly.
|
#
79284 |
|
05-Jul-2001 |
msmith |
Implement PCI interrupt routing using the ACPI data attached to the PCI bus object. This should deal both with already-routed interrupts as well as devices that need an interrupt routed.
Note that it *doesn't* deal with interlocked interrupt dependancies, nor does it select between interrupt options in a smart way. These are optimisations that need further work.
|
#
78993 |
|
29-Jun-2001 |
msmith |
Update for new debug layer constant names in the ACPI CA 20010615 import.
|
#
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.
|
#
70468 |
|
29-Dec-2000 |
msmith |
Hack in interrupt routing support (using the core $PIR support, not using ACPICA properly). This makes it possible to use ACPICA in conjunction with CardBus before I get around to implementing ACPI/PCI interrupt routing.
|
#
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.
|
#
69505 |
|
01-Dec-2000 |
scottl |
Revert attach() back to the old behaviour of calling bus_generic_attach(). The new way doesn't seem to work reliably and was causing devices to not be seen.
Approved by: msmith
|
#
69458 |
|
01-Dec-2000 |
msmith |
Update to work with the new ACPI CA snapshot.
- Use ACPI_PHYSICAL_ADDRESS - RSDT -> XSDT - FACP -> FADT - No APIC table support - Don't install a global EC handler; this has bad side-effects (it invokes _REG in *all* EC spaces in the namespace!) - Check for PCI bus instances already existing before adding them
|
#
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.
|