summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_pcib.c
Commit message (Collapse)AuthorAgeFilesLines
* Initialize acpi buffer structs early in order to avoid freeingkan2003-12-181-3/+3
| | | | unallocated pointers later in done: section.
* Add support for multiple CIDs since _CID can contain a package of values.njl2003-12-181-8/+16
| | | | | | | | | 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.
* 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)
* Improve support for extended IRQ resources:jhb2003-11-141-20/+47
| | | | | | | | | | | | | | | - 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
* Use __FBSDID().obrien2003-08-241-2/+4
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | 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 code to work with 0619 distnjl2003-07-131-3/+4
| | | | | | | | * 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
* Add a missing newline to the end of a device_printf().jhb2002-10-291-1/+1
| | | | Reported by: Michael G. Petry <petry@NetMasters.Com>
* Add code for ACPI PCI link object manipulation.iwasaki2002-10-051-0/+8
| | | | | | | | | 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.
* Fix printf format errors on 64 bit systems where sizes are longpeter2002-10-041-2/+4
| | | | instead of just int.
* Display the name of the acpi node that we do not find the pci interruptpeter2002-10-041-2/+3
| | | | routing table for.
* Now that we only probe host-PCI bridges once, we no longer have to check tojhb2002-09-231-12/+0
| | | | see if we have been probed before by checking for a pciX bus device.
* Make the printf messages when routing interrupts more consistent in thejhb2002-09-051-5/+6
| | | | various PCI bridge drivers.
* Overhaul the ACPI PCI bridge driver a bit:jhb2002-08-261-244/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* In acpi_pcib_route_interrupt(), the code claims to check to see if a PCIjhb2002-08-261-2/+2
| | | | | | | 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.
* Brutally deal with __func__ being 'const char *' on gcc-3.1.peter2002-05-191-2/+2
|
* Fix error introduced in the 20020217 update, where GetPossibleResourcesmsmith2002-03-211-1/+1
| | | | | | was spammed with GetCurrentResources. Submitted by: Munehiro Matsuda <haro@h4.dion.ne.jp>
* Match namespace cleanup changes in ACPI CA 20020217 update.msmith2002-02-231-19/+37
| | | | | | | 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.
* Staticise devclasses and some unnecessarily global variables.msmith2002-01-081-1/+1
|
* Make the interrupt routing a bit less chatty unless bootverbose is set.dfr2001-10-071-3/+5
|
* Fix a stack trashing bug when int != sizeof(pointer)peter2001-10-061-1/+3
| | | | This fixes the ia64 boot! We have scsi disks!
* Update usage of AcpiEnableEvent to reflect a new argument.msmith2001-10-041-4/+3
| | | | | | | | 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.
* Updates to match the ACPI CA 20010816 import:msmith2001-08-261-3/+5
| | | | | - New debug macro (ACPI_DEBUG_PRINT), reducing debug-case code size. - New debug level/subsystem codes.
* Shoud build resources in the _CRS buffer. Oops.msmith2001-08-031-1/+1
| | | | Submitted by: "neckpain@nettaxi.com" <neckpain@nettaxi.com>
* The current resource buffer returned from an interrupt link devicemsmith2001-07-301-7/+20
| | | | | | | 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.
* Convert from acpi_strerror() to AcpiFormatException()msmith2001-07-211-6/+6
| | | | Fix dangling include of the dear departed acpi_ecreg.h
* Oops, have to use AcpiSetCurrentResources, not invoke the _SRS methodmsmith2001-07-071-4/+1
| | | | directly.
* Implement PCI interrupt routing using the ACPI data attached to themsmith2001-07-051-5/+255
| | | | | | | | | 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.
* Update for new debug layer constant names in the ACPI CA 20010615msmith2001-06-291-1/+1
| | | | import.
* - Updates for new constant naming in the ACPI CA 20010518 update.msmith2001-05-291-3/+3
| | | | | | | | | | | - 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).
* ACPI_NUMBER becomes ACPI_INTEGER. acpi_EvaluateNumber becomesmsmith2001-01-311-2/+2
| | | | | | | | | | | 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.
* Hack in interrupt routing support (using the core $PIR support, not usingmsmith2000-12-291-3/+5
| | | | | ACPICA properly). This makes it possible to use ACPICA in conjunction with CardBus before I get around to implementing ACPI/PCI interrupt routing.
* - Convert a lot of homebrew debugging output to use the ACPI CA debuggingmsmith2000-12-081-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Revert attach() back to the old behaviour of calling bus_generic_attach().scottl2000-12-021-4/+5
| | | | | | | The new way doesn't seem to work reliably and was causing devices to not be seen. Approved by: msmith
* Update to work with the new ACPI CA snapshot.msmith2000-12-011-13/+16
| | | | | | | | | | - 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
* Initial FreeBSD OSPM (operating system power management) modules formsmith2000-10-281-0/+236
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.
OpenPOWER on IntegriCloud