summaryrefslogtreecommitdiff
path: root/sys/dev/acpica/acpi_pci.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename kernel option ACPI_DMAR to IOMMU.Ruslan Bukin2020-09-291-1/+2
| | | | | | | | | | | This is mostly needed for a common arm64/amd64 iommu code. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D26587 Notes: svn path=/head/; revision=366267
* o Rename acpi_iommu_get_dma_tag() -> iommu_get_dma_tag().Ruslan Bukin2020-09-291-2/+5
| | | | | | | | | | | | | This function isn't ACPI dependent and we may use it on FDT systems as well. o Don't repeat the function declaration, include iommu.h instead. Reviewed by: andrew, kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D26584 Notes: svn path=/head/; revision=366257
* acpica: clean up empty lines in .c and .h filesMateusz Guzik2020-09-011-2/+1
| | | | Notes: svn path=/head/; revision=365096
* Rename dmar_get_dma_tag() to acpi_iommu_get_dma_tag().Ruslan Bukin2020-05-261-3/+3
| | | | | | | | | | This is needed for a new IOMMU controller support. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D24943 Notes: svn path=/head/; revision=361532
* Install an ACPI PCI bus notify handler.John Baldwin2019-10-151-0/+23
| | | | | | | | | | | | Rescan a PCI bus when the ACPI_NOTIFY_BUS_CHECK event is posted to a PCI bus. Reviewed by: scottl MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21948 Notes: svn path=/head/; revision=353587
* Support hot insertion and removal of PCI devices on EC2.John Baldwin2019-10-151-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | Install ACPI notify handlers on PCI devices with an _EJ0 method. This handler is invoked when devices are added or removed. - When an ACPI_NOTIFY_DEVICE_CHECK event posts, rescan the parent bus device. Note that strictly speaking we only need to rescan the specified device, but BUS_RESCAN is what is available, so we rescan the entire bus. - When an ACPI_NOTIFY_EJECT_REQUEST event posts, detach the device associated with the ACPI handle, invoke the _EJ0 method, and then delete the device. Eventually this might be changed to vector notify events to devd in userspace where devctl can be used instead to permit more complex actions such as graceful unmounting of filesystems. Tested by: cperciva Reviewed by: cperciva, imp, scottl MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21948 Notes: svn path=/head/; revision=353586
* Add a new bus method to fetch device-specific CPU sets.John Baldwin2016-05-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bus_get_cpus() returns a specified set of CPUs for a device. It accepts an enum for the second parameter that indicates the type of cpuset to request. Currently two valus are supported: - LOCAL_CPUS (on x86 this returns all the CPUs in the package closest to the device when DEVICE_NUMA is enabled) - INTR_CPUS (like LOCAL_CPUS but only returns 1 SMT thread for each core) For systems that do not support NUMA (or if it is not enabled in the kernel config), LOCAL_CPUS fails with EINVAL. INTR_CPUS is mapped to 'all_cpus' by default. The idea is that INTR_CPUS should always return a valid set. Device drivers which want to use per-CPU interrupts should start using INTR_CPUS instead of simply assigning interrupts to all available CPUs. In the future we may wish to add tunables to control the policy of INTR_CPUS (e.g. should it be local-only or global, should it ignore SMT threads or not). The x86 nexus driver exposes the internal set of interrupt CPUs from the the x86 interrupt code via INTR_CPUS. The ACPI bus driver and PCI bridge drivers use _PXM to return a suitable LOCAL_CPUS set when _PXM exists and DEVICE_NUMA is enabled. They also and the global INTR_CPUS set from the nexus driver with the per-domain set from _PXM to generate a local INTR_CPUS set for child devices. Compared to the r298933, this version uses 'struct _cpuset' in <sys/bus.h> instead of 'cpuset_t' to avoid requiring <sys/param.h> (<sys/_cpuset.h> still requires <sys/param.h> for MAXCPU even though <sys/_bitset.h> does not after recent changes). Notes: svn path=/head/; revision=299286
* Revert bus_get_cpus() for now.John Baldwin2016-05-031-1/+0
| | | | | | | | I really thought I had run this through the tinderbox before committing, but many places need <sys/types.h> -> <sys/param.h> for <sys/bus.h> now. Notes: svn path=/head/; revision=298951
* Add a new bus method to fetch device-specific CPU sets.John Baldwin2016-05-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bus_get_cpus() returns a specified set of CPUs for a device. It accepts an enum for the second parameter that indicates the type of cpuset to request. Currently two valus are supported: - LOCAL_CPUS (on x86 this returns all the CPUs in the package closest to the device when DEVICE_NUMA is enabled) - INTR_CPUS (like LOCAL_CPUS but only returns 1 SMT thread for each core) For systems that do not support NUMA (or if it is not enabled in the kernel config), LOCAL_CPUS fails with EINVAL. INTR_CPUS is mapped to 'all_cpus' by default. The idea is that INTR_CPUS should always return a valid set. Device drivers which want to use per-CPU interrupts should start using INTR_CPUS instead of simply assigning interrupts to all available CPUs. In the future we may wish to add tunables to control the policy of INTR_CPUS (e.g. should it be local-only or global, should it ignore SMT threads or not). The x86 nexus driver exposes the internal set of interrupt CPUs from the the x86 interrupt code via INTR_CPUS. The ACPI bus driver and PCI bridge drivers use _PXM to return a suitable LOCAL_CPUS set when _PXM exists and DEVICE_NUMA is enabled. They also and the global INTR_CPUS set from the nexus driver with the per-domain set from _PXM to generate a local INTR_CPUS set for child devices. Reviewed by: wblock (manpage) Differential Revision: https://reviews.freebsd.org/D5519 Notes: svn path=/head/; revision=298933
* Add a new PCI bus interface method to alloc the ivars (dinfo) for a device.John Baldwin2016-04-151-55/+22
| | | | | | | | | | | | | | | | | The ACPI and OFW PCI bus drivers as well as CardBus override this to allocate the larger ivars to hold additional info beyond the stock PCI ivars. This removes the need to pass the size to functions like pci_add_iov_child() and pci_read_device() simplifying IOV and bus rescanning implementations. As a result of this and earlier changes, the ACPI PCI bus driver no longer needs its own device_attach and pci_create_iov_child methods but can use the methods in the stock PCI bus driver instead. Differential Revision: https://reviews.freebsd.org/D5891 Notes: svn path=/head/; revision=298029
* Associate device_t objects with ACPI handles via PCI_CHILD_ADDED().John Baldwin2016-04-071-29/+27
| | | | | | | | | | | | | | | | | | | Previously, the ACPI PCI bus driver did a single pass over the devices in the namespace that were a child of a given PCI bus to associate the PCI bus-enumerated device_t devices with the corresponding ACPI handles. However, this meant that handles were only established at runtime for devices found during the initial PCI bus scan. PCI_IOV adds devices that show up after the initial PCI bus scan, and coming changes to add a bus rescan can also add devices after the initial scan. This change adds a pci_child_added() callback to the ACPI PCI bus that walks the namespace to find the ACPI handle for each device that is added. Using a callback means that the handle is correctly set for any device no matter how it is added (initial scan, IOV, or a bus rescan). Notes: svn path=/head/; revision=297679
* Convert pci_delete_child() to a bus_child_deleted() method.John Baldwin2016-04-061-0/+12
| | | | | | | | | | | | | | | | | | | | | | | Instead of providing a wrapper around device_delete_child() that the PCI bus and child bus drivers must call explicitly, move the bulk of the logic from pci_delete_child() into a bus_child_deleted() method (pci_child_deleted()). This allows PCI devices to be safely deleted via device_delete_child(). - Add a bus_child_deleted method to the ACPI PCI bus which clears the device_t associated with the corresponding ACPI handle in addition to the normal PCI bus cleanup. - Change cardbus_detach_card to call device_delete_children() and move CardBus-specific delete logic into a new cardbus_child_deleted() method. - Use device_delete_child() instead of pci_delete_child() in the SRIOV code. - Add a bus_child_deleted method to the OpenFirmware PCI bus drivers which frees the OpenFirmware device info for each PCI device. Reviewed by: imp Tested on: amd64 (CardBus and PCI-e hotplug) Differential Revision: https://reviews.freebsd.org/D5831 Notes: svn path=/head/; revision=297608
* Implement interface to create SR-IOV Virtual FunctionsRyan Stone2015-03-011-0/+28
| | | | | | | | | | | | | | | | | | | Implement the interace to create SR-IOV Virtual Functions (VFs). When a driver registers that they support SR-IOV by calling pci_setup_iov(), the SR-IOV code creates a new node in /dev/iov for that device. An ioctl can be invoked on that device to create VFs and have the driver initialize them. At this point, allocating memory I/O windows (BARs) is not supported. Differential Revision: https://reviews.freebsd.org/D76 Reviewed by: jhb MFC after: 1 month Sponsored by: Sandvine Inc. Notes: svn path=/head/; revision=279447
* Add a bus method to fetch the VM domain for the given device/bus.Adrian Chadd2014-10-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | * Add a bus_if.m method - get_domain() - returning the VM domain or ENOENT if the device isn't in a VM domain; * Add bus methods to print out the domain of the device if appropriate; * Add code in srat.c to save the PXM -> VM domain mapping that's done and expose a function to translate VM domain -> PXM; * Add ACPI and ACPI PCI methods to check if the bus has a _PXM attribute and if so map it to the VM domain; * (.. yes, this works recursively.) * Have the pci bus glue print out the device VM domain if present. Note: this is just the plumbing to start enumerating information - it doesn't at all modify behaviour. Differential Revision: D906 Reviewed by: jhb Sponsored by: Norse Corp Notes: svn path=/head/; revision=272799
* msi: add Xen MSI implementationRoger Pau Monné2014-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for MSI interrupts when running on Xen. Apart from adding the Xen related code needed in order to register MSI interrupts this patch also makes the msi_init function a hook in init_ops, so different MSI implementations can have different initialization functions. Sponsored by: Citrix Systems R&D xen/interface/physdev.h: - Add the MAP_PIRQ_TYPE_MULTI_MSI to map multi-vector MSI to the Xen public interface. x86/include/init.h: - Add a hook for setting custom msi_init methods. amd64/amd64/machdep.c: i386/i386/machdep.c: - Set the default msi_init hook to point to the native MSI initialization method. x86/xen/pv.c: - Set the Xen MSI init hook when running as a Xen guest. x86/x86/local_apic.c: - Call the msi_init hook instead of directly calling msi_init. xen/xen_intr.h: x86/xen/xen_intr.c: - Introduce support for registering/releasing MSI interrupts with Xen. - The MSI interrupts will use the same PIC as the IO APIC interrupts. xen/xen_msi.h: x86/xen/xen_msi.c: - Introduce a Xen MSI implementation. x86/xen/xen_nexus.c: - Overwrite the default MSI hooks in the Xen Nexus to use the Xen MSI implementation. x86/xen/xen_pci.c: - Introduce a Xen specific PCI bus that inherits from the ACPI PCI bus and overwrites the native MSI methods. - This is needed because when running under Xen the MSI messages used to configure MSI interrupts on PCI devices are written by Xen itself. dev/acpica/acpi_pci.c: - Lower the quality of the ACPI PCI bus so the newly introduced Xen PCI bus can take over when needed. conf/files.i386: conf/files.amd64: - Add the newly created files to the build process. Notes: svn path=/head/; revision=272310
* Populate the device info string with _PXM (proximity domain) information.Adrian Chadd2014-09-201-3/+10
| | | | | | | | | | This is primarily useful for debugging right now - it'll show up in devinfo. Reviewed by: jhb Notes: svn path=/head/; revision=271889
* Import the driver for VT-d DMAR hardware, as specified in the revisionKonstantin Belousov2013-10-281-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.3 of Intelб╝ Virtualization Technology for Directed I/O Architecture Specification. The Extended Context and PASIDs from the rev. 2.2 are not supported, but I am not aware of any released hardware which implements them. Code does not use queued invalidation, see comments for the reason, and does not provide interrupt remapping services. Code implements the management of the guest address space per domain and allows to establish and tear down arbitrary mappings, but not partial unmapping. The superpages are created as needed, but not promoted. Faults are recorded, fault records could be obtained programmatically, and printed on the console. Implement the busdma(9) using DMARs. This busdma backend avoids bouncing and provides security against misbehaving hardware and driver bad programming, preventing leaks and corruption of the memory by wild DMA accesses. By default, the implementation is compiled into amd64 GENERIC kernel but disabled; to enable, set hw.dmar.enable=1 loader tunable. Code is written to work on i386, but testing there was low priority, and driver is not enabled in GENERIC. Even with the DMAR turned on, individual devices could be directed to use the bounce busdma with the hw.busdma.pci<domain>:<bus>:<device>:<function>.bounce=1 tunable. If DMARs are capable of the pass-through translations, it is used, otherwise, an identity-mapping page table is constructed. The driver was tested on Xeon 5400/5500 chipset legacy machine, Haswell desktop and E5 SandyBridge dual-socket boxes, with ahci(4), ata(4), bce(4), ehci(4), mfi(4), uhci(4), xhci(4) devices. It also works with em(4) and igb(4), but there some fixes are needed for drivers, which are not committed yet. Intel GPUs do not work with DMAR (yet). Many thanks to John Baldwin, who explained me the newbus integration; Peter Holm, who did all testing and helped me to discover and understand several incredible bugs; and to Jim Harris for the access to the EDS and BWG and for listening when I have to explain my findings to somebody. Sponsored by: The FreeBSD Foundation MFC after: 1 month Notes: svn path=/head/; revision=257251
* Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵Sofian Brabez2013-01-301-1/+1
| | | | | | | | | | device_method_t arrays Reviewed by: cognet Approved by: cognet Notes: svn path=/head/; revision=246128
* - Add a bus_dma tag to each PCI bus that is a child of a Host-PCI bridge.John Baldwin2012-03-021-5/+7
| | | | | | | | | | | | | | | | | | The tag enforces a single restriction that all DMA transactions must not cross a 4GB boundary. Note that while this restriction technically only applies to PCI-express, this change applies it to all PCI devices as it is simpler to implement that way and errs on the side of caution. - Add a softc structure for PCI bus devices to hold the bus_dma tag and a new pci_attach_common() routine that performs actions common to the attach phase of all PCI bus drivers. Right now this only consists of a bootverbose printf and the allocate of a bus_dma tag if necessary. - Adjust all PCI bus drivers to allocate a PCI bus softc and to call pci_attach_common() from their attach routines. MFC after: 2 weeks Notes: svn path=/head/; revision=232403
* Don't create a device_t object or parse current resources (via _CRS) forJohn Baldwin2011-06-171-20/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ACPI Device() objects that do not have any device IDs available via the _HID or _CID methods. Without a device ID a device driver cannot attach to the device anyway. Namespace objects that are devices but not of type ACPI_TYPE_DEVICE are not affected. A few BIOSes have also attached a _CRS method to a PCI device to allocate resources that are not managed via a BAR. With the previous code those resources are allocated from acpi0 directly which can interfere with the new PCI-PCI bridge driver (since the PCI device in question may be behind a bridge and its resources should be allocated from that bridge's windows instead). The resources were also orphaned and and would end up associated with some other random device whose device_t reused the pointer of the original ACPI-enumerated device (after it was free'd by the ACPI PCI bus driver) in devinfo output which was confusing. If we want to handle _CRS on PCI devices we can adjust the ACPI PCI bus driver to do that in the future and associate the resources with the proper device object respecting PCI-PCI bridges, etc. Note that with this change the ACPI PCI bus driver no longer has to delete ACPI-enumerated device_t devices that mirror PCI devices since they should in general not exist. There are rare cases when a BIOS will give a PCI device a _HID (e.g. I've seen a PCI-ISA bridge given a _HID for a system resource device). In that case we leave both the ACPI and PCI-enumerated device_t objects around just as in the previous code. Notes: svn path=/head/; revision=223207
* Remove bogus check. pcib_get_bus() (like other BUS_ACCESSOR() methods)John Baldwin2011-01-181-2/+0
| | | | | | | | | | | | doesn't "fail", it may merely return garbage if it is not a valid ivar for a given device. Our parent device must be a 'pcib' device, so we can just assume it implements pcib IVARs, and all pcib devices have a bus number. Submitted by: clang via rdivacky Notes: svn path=/head/; revision=217537
* Introduce a new tunable 'hw.pci.do_power_suspend'. This tunable lets youJung-uk Kim2010-10-201-1/+1
| | | | | | | | avoid PCI power state transition from D0 to D3 for suspending case. Default is 1 or enabled. Notes: svn path=/head/; revision=214110
* Remove PCI_SET_POWERSTATE method from acpi.c and eradicate all PCI-specificJung-uk Kim2010-10-191-2/+6
| | | | | | | | | | | | | | | | | knowledges from the file. All PCI devices enumerated in ACPI tree must use correct one from acpi_pci.c any way. Reduce duplicate codes as we did for pci.c in r213905. Do not return ESRCH from PCIB_POWER_FOR_SLEEP method. When the method is not found, just return zero without modifying the given default value as it is completely optional. As a side effect, the return state must not be NULL. Note there is actually no functional change by removing ESRCH because acpi_pcib_power_for_sleep() always returns zero. Adjust debugging messages and add new ones under bootverbose to help debugging device power state related issues. Reviewed by: jhb, imp (earlier versions) Notes: svn path=/head/; revision=214072
* Make any PCI devices enumerated in ACPI tree honor do_power_resume as well.Jung-uk Kim2010-10-191-1/+1
| | | | Notes: svn path=/head/; revision=214068
* Merge ACPICA 20091112.Jung-uk Kim2009-11-161-1/+1
| | | | Notes: svn path=/head/; revision=199337
* Import ACPICA 20090521.Jung-uk Kim2009-06-051-1/+3
| | | | Notes: svn path=/head/; revision=193530
* Don't destroy an ACPI device_t for a PCI device and reassign the ACPIJohn Baldwin2007-10-271-2/+13
| | | | | | | | | | | | | handle to the PCI device_t if the ACPI device_t is already attached to a driver. This happens on the Tablet TC1000 which for some reason includes two PCI-ISA bridges and treats the second bridge as an ACPI system resource device. Reviewed by: njl (a while ago) MFC after: 3 days Notes: svn path=/head/; revision=173062
* Make the PCI code aware of PCI domains (aka PCI segments) so we canMarius Strobl2007-09-301-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | support machines having multiple independently numbered PCI domains and don't support reenumeration without ambiguity amongst the devices as seen by the OS and represented by PCI location strings. This includes introducing a function pci_find_dbsf(9) which works like pci_find_bsf(9) but additionally takes a domain number argument and limiting pci_find_bsf(9) to only search devices in domain 0 (the only domain in single-domain systems). Bge(4) and ofw_pcibus(4) are changed to use pci_find_dbsf(9) instead of pci_find_bsf(9) in order to no longer report false positives when searching for siblings and dupe devices in the same domain respectively. Along with this change the sole host-PCI bridge driver converted to actually make use of PCI domain support is uninorth(4), the others continue to use domain 0 only for now and need to be converted as appropriate later on. Note that this means that the format of the location strings as used by pciconf(8) has been changed and that consumers of <sys/pciio.h> potentially need to be recompiled. Suggested by: jhb Reviewed by: grehan, jhb, marcel Approved by: re (kensmith), jhb (PCI maintainer hat) Notes: svn path=/head/; revision=172394
* Fixup some comments to allow for the fact that PCI domains are not specificJohn Baldwin2006-05-111-3/+3
| | | | | | | to Alpha hoses. Notes: svn path=/head/; revision=158457
* Make the ACPI and OpenFirmware PCI bus drivers subclasses of the genericJohn Baldwin2006-01-201-32/+2
| | | | | | | PCI bus driver. Notes: svn path=/head/; revision=154600
* Add a new method PCI_FIND_EXTCAP() to the pci bus interface that is usedJohn Baldwin2005-12-201-0/+1
| | | | | | | | | | to search for a specific extended capability. If the specified capability is found for the given device, then the function returns success and optionally returns the offset of that capability. If the capability is not found, the function returns an error. Notes: svn path=/head/; revision=153560
* Canonize the include of acpi.h.David E. O'Brien2005-09-111-1/+1
| | | | Notes: svn path=/head/; revision=150003
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139749
* Instead of translating PCI to ACPI power states, just use a CTASSERTNate Lawson2004-11-291-18/+10
| | | | | | | that they are equivalent. Notes: svn path=/head/; revision=138200
* Add a couple of macros to extract the PCI slot (device) and function fromJohn Baldwin2004-09-221-2/+2
| | | | | | | | an ACPI _ADR value and use that rather than inlining the same shifts and masks everywhere. Notes: svn path=/head/; revision=135574
* MPSAFE lockingNate Lawson2004-08-131-4/+10
| | | | | | | * Serialize access to acpi_pci_set_powerstate_method(). Notes: svn path=/head/; revision=133619
* Follow PnP location string change in acpi.c.Takanori Watanabe2004-07-141-1/+1
| | | | Notes: svn path=/head/; revision=132136
* Move flags into a private ivar so it can't collide with device flags.Nate Lawson2004-06-301-2/+25
| | | | | | | | | | 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). Notes: svn path=/head/; revision=131341
* Attach the correct handle, not the one that was just deleted. Also,Nate Lawson2004-06-241-3/+2
| | | | | | | remove some duplicated code. Notes: svn path=/head/; revision=131009
* Now that we associate a device_t with ACPI device handles, lookup theJohn Baldwin2004-06-231-7/+41
| | | | | | | | | | device associated with any PCI devices that are enumerated in the ACPI tree when adding children to an ACPI PCI bus and remove the duplicate ACPI-only device_t and replace the device_t associated with the handle with the ACPI and PCI aware device_t. Notes: svn path=/head/; revision=130978
* Remove accidental change.Nate Lawson2004-06-071-1/+1
| | | | Notes: svn path=/head/; revision=130210
* Avoid printing extraneous warning messages when trying to switch a deviceNate Lawson2004-06-071-9/+6
| | | | | | | | | | | which doesn't support ACPI power states. Return AE_NOT_FOUND for these cases and don't print the warning message. Also, print the name of the handle instead of device when unable to switch states. The device is often not attached at this point and so its name is NULL, which doesn't help debugging. Notes: svn path=/head/; revision=130208
* Style cleanups, don't set the device description before the probe routineNate Lawson2004-05-291-18/+13
| | | | | | | has completed successfully. Notes: svn path=/head/; revision=129829
* Make unnecessary globals static and remove unused includes.Nate Lawson2004-05-061-2/+0
| | | | | | | Pointed out by: cscout Notes: svn path=/head/; revision=128990
* Fix two typos from PR: 65694Warner Losh2004-04-261-1/+1
| | | | | | | | | | | | | 1) In pci.c, we need to check the child device's state, not the parent device's state. 2) In acpi_pci.c, we have to run the power state change after the acpi method when the old_state is > new state, not the other way around. Submitted by: Dmitry Remesov PR: 65694 Notes: svn path=/head/; revision=128652
* Only try to set the ACPI power state if the handle is valid. There wasNate Lawson2004-04-141-6/+10
| | | | | | | | probably no problem with this except it may have had the side effect of registering a NULL consumer. Notes: svn path=/head/; revision=128247
* Add MODULE_DEPEND entries so some of these drivers can eventually beNate Lawson2004-04-091-1/+2
| | | | | | | loaded separately from ACPI (i.e., embedded use). Notes: svn path=/head/; revision=128071
* Omnibus PCI commit:Warner Losh2004-04-091-2/+2
| | | | | | | | | | | | | | | | | o Save and restore bars for suspend/resume as well as for D3->D0 transitions. o preallocate resources that the PCI devices use to avoid resource conflicts o lazy allocation of resources not allocated by the BIOS. o set unattached drivers to state D3. Set power state to D0 before probe/attach. Right now there's two special cases for this (display and memory devices) that need work in other areas of the tree. Please report any bugs to me. Notes: svn path=/head/; revision=128058
* Implement an ACPI-aware pci_set_powerstate() method for PCI busses thatJohn Baldwin2004-04-071-15/+45
| | | | | | | | | | | | are enumerated in the ACPI device tree. In addition to the normal PCI powerstate functionality, the ACPI _PSx methods are executed and ACPI PowerResources are switched on and off via the acpi_pwr_switch_consumer() function. Glanced at by: imp, njl Notes: svn path=/head/; revision=128016
* Staticize pnp methods, style fixes. Remove unused variable to unbreakNate Lawson2004-03-311-5/+5
| | | | | | | kernel build. Notes: svn path=/head/; revision=127681