summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/pcivar.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add a function to scan for PCI Express extended capabilities.kettenis2020-09-081-1/+3
| | | | From jordan@, with a few more tweaks by myself.
* add pci_intr_msix_count(), to get the msi-x table size for a device.dlg2020-06-171-1/+3
| | | | | | | | | | | | this basically tells us the number of interrupt vectors a pci device is able to support. it relies on the arch having __HAVE_PCI_MSIX defined. without that define it always returns 0. i think this originally came from haesbart via patrick@ as amd64 md code in the middle of a diff from 2018(!), but i've tweaked it to make it MI. tested on sparc64 and amd64 with various drivers.
* Implement suspend/resume support for MSI-X interrupts. Loosely based onkettenis2019-06-251-1/+10
| | | | | | an earlier diff from sf@. ok jmatthew@, also ok mlarkin@, sf@ for a slightly different earlier version
* Split out the code that assigns addresses to BARs into its own function.kettenis2019-06-171-1/+3
| | | | ok patrick@
* Add function to convert a PCI device "tag" into a PCIe requester ID.kettenis2018-07-281-2/+3
| | | | ok patrick@, mlarkin@, deraadt@
* Make it possible for graphics drivers to opt-out of VGA arbitration.kettenis2013-08-081-1/+2
| | | | | | | | | | | | The idea is that as soon the kernel driver switches out of vga text mode, it can disable decoding of legacy vga io and mmio and call pci_disable_legacy_vga() to take itself out of arbitration. The PCIGETVGA ioctl is extended such that it returns the legacy decoding state of a device. The X server can then query this state for all graphics devices in the system (through libpciaccess) and decide whether it needs to do arbitration. ok jsg@
* Mimic what's done on sparc64 and parse the OpenFirmware device tree tompi2013-08-071-3/+1
| | | | | | | | enumerate the pci devices. This allow us to not store the interrupt vector in the interrupt line register and to not try to attach pci devices disabled by firmware. With inputs from and ok kettenis@
* Add resource tracking for PCI bus numbers. This will allow us to preventkettenis2012-09-191-1/+4
| | | | | | | | attaching the same PCI bus twice and in the long run this will allown us to hot plug PCI busses and support CardBus on machines where the firmware doesn't assign a bus number to CardBus devices. While there, print a bit more information for memory and io conflicts.
* Enable MSI for HyperTransport devices that have MSI remapping enabled.kettenis2011-05-301-3/+5
|
* Introduce a flag to indicate that it is ok to use MSI on a certain PCI buskettenis2011-05-211-1/+3
| | | | and/or device. Discussed with miod@
* Pass flags down the PCI bus hierarchy. Soon to be used to selectively enablekettenis2011-05-141-1/+3
| | | | | | Message Signalled Interrupts. ok krw@ with a fix pointed out by many
* remove the powerhook code. All architectures now use the ca_activate treederaadt2010-09-071-2/+1
| | | | | traversal code to suspend/resume ok oga kettenis blambert
* Add an ioctl to figure out the non-sticky bits in PCI BARs used for determiningkettenis2010-09-051-2/+2
| | | | | | | the size of those BARs. Make pcidump use this new ioctl to print the size of PCI BARs. ok deraadt@, miod@
* Make PCI Power Management optional, and only enable it when acpi(4) attaches.kettenis2010-08-271-1/+2
| | | | ok deraadt@
* Power management for PCI devices. For now just put everything in the D3kettenis2010-08-171-1/+2
| | | | | | (deepest sleep) state upon suspend, and restore power upon resume. ok deraadt@
* Add extents for prefetchable memory mapped I/O. Should remove conflictkettenis2009-05-051-1/+4
| | | | messages for devices using prefetchable memory sitting behind bridges.
* Set a first step on the road towards proper accounting of PCI resources bykettenis2009-04-061-1/+11
| | | | | | | | | | | | keeping a per-bus extent containing the address space available to the bus. Address space assigned to devices will be removed from these extents when we attach a bus. And when we try to map a PCI BAR that hasn't had address space assigned to it, we will allocate free space from this extent. This won't do anything until the parent devices actually allocate and initialize the extents. ok oga@
* On some machines we get hotplug interrupts when they're resumed, so don'tkettenis2007-12-311-1/+2
| | | | | | | | rescan the pci bus if it already has devices attached to it. Make sure we clear the list of attached devices when we receive a surprise removal interrupt. Fixes kurt@'s T43. ok miod@, krw@
* Add PCI VPD read/write functions from NetBSD required for some thingsjsg2007-11-261-1/+7
| | | | | | dlg is playing with. 'put it in' dlg@
* Add pci_set_powerstate() to change the pm state for a given device.fgsch2007-10-221-1/+2
| | | | ok by many.
* cats went awayderaadt2007-08-011-3/+1
|
* Implement deep interrupt swizzling by mapping all four PCI interrupt pinskettenis2007-05-211-1/+4
| | | | | | | | | | for PCI-PCI bridges and passing the mapping to the attached bus device. MD code can use these when mapping PCI device interrupts. This diff adds such code for amd64 and i386. This fixes interrupt mapping for devices that sit behind two PCI-PCI bridges where the firmware only provides a mapping for the first PCI-PCI bridge. tested by sturm@, krw@, and a few others, ok deraadt@
* hide all the things userland should not see, so that this file can bederaadt2007-02-231-9/+13
| | | | | pulled into get at pcireg_t. otherwise it would hit nasty _KERNEL stuff; discussed with miod and dlg
* Provide a new function, pci_findproduct(), which is analog to pci_findvendor().mbalmer2007-01-021-1/+2
| | | | | | | | | | | Use these two functions in pci_devinfo() to remove some duplicated code and make it easier to read. Remove two now unused variables. This shrinks the size of the resulting object code. Drivers (or other kernel code) can now get at the PCI vendor and/or product strings using pci_findvendor() and pci_findproduct(). ok claudio, deraadt, mglocker
* Make pci subsystem aware of domains. Each host bridge gets assigned a uniquekettenis2006-12-141-3/+7
| | | | | | | | domain number such that we can distinguish between busses with the same bus number that are behind different host bridges. Domains can be accessed by using different device nodes. ok deraadt@
* On i386, swizzle interrupts for devices for which we don't have explicitkettenis2006-12-111-1/+3
| | | | | | inetrrupt routing information. ok deraadt@
* implement a check whether a BAR is present at all at a givenbrad2006-04-071-1/+2
| | | | | | | | configuration space address, pci_mapreg_probe(). From NetBSD ok dlg@
* Add pci_find_device() a helper function for enumerating thejsg2006-03-221-1/+3
| | | | | | | PCI bus, from NetBSD. This is useful for things like finding another device in a driver ie ISA bridge in pciide. ok brad@ grange@, looks ok kettenis@
* - check HDRTYPE early, and ignore if it is not supported (n > 2).brad2006-03-191-2/+3
| | | | | | | - defer access to interrupt configuration register, as its existence depends on HDRTYPE. From itojun NetBSD
* rev 1.86brad2006-03-191-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make the "generic" PCI bus enumeration code the standard case which gets used if nothing else is defined in MD headers, introduce a "PCI_MACHDEP_ENUMERATE_BUS" CPP definition which can be used by MD headers (just 1 port atm) to plug in special code rev 1.62 * Implement a machine-dependent pci_enumerate_bus() for sparc64 which uses OFW device nodes to enumerate the bus. When a PCI bus that is behind a bridge is attached, pci_attach_hook() allocates a new PCI chipset tag for the new bus and sets it's "curnode" to the OFW node of the bridge. This is used as a starting point when enumerating that bus. Root busses get the OFW node of the host bridge (psycho). rev 1.59 Split the code that enumerates the PCI bus and that actually probes for a device into two functions: * pci_probe_device() actually probes/attaches the device specified by the provide pcitag_t. * pci_enumerate_bus() enumerates the bus, and calls pci_probe_device() for each device on the bus. A pci_enumerate_bus_generic() is provided which implements the old method of doing this: If something found at dev0/func0, determine number of functions and probe each one. From NetBSD ok kettenis@ Tested on a good number of amd64/i386/macppc/sparc64 systems
* * Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set tobrad2006-03-131-1/+8
| | | | | | | | | | NULL for root PCI busses. For busses behind a bridge, it points to a persistent copy of the bridge's pcitag_t. This can be very useful for machine-dependent PCI bus enumeration code. From NetBSD ok grange@ kettenis@
* move PCI softc struct from pci.c to pcivar.hbrad2006-03-111-1/+11
| | | | ok krw@ kettenis@
* add some Power Management constantsbrad2005-06-291-1/+9
| | | | From NetBSD
* use much simpler switch for pci_machdep.h; ok drahn@ whatever tdr (;mickey2005-06-021-28/+8
|
* Remove the PCI-ISA bridge callback mechanism; it's no longer needed.brad2004-12-071-2/+1
| | | | | | From NetBSD ok deraadt@ miod@
* add hppa64 hookmickey2004-11-301-1/+4
|
* remove some old stuff and clean up. arc and galileo is gone.pefo2004-08-091-13/+7
| | | | ok mickey@
* sgi support; from pefo@mickey2004-08-061-2/+5
|
* Provide information about the raw (unswizzled) intrrupt pin inart2004-06-251-1/+2
| | | | | pci_attach_args. drahn@ deraadt@ ok
* Add pci_machdep hook for cats. ok deraadt@drahn2004-01-311-2/+5
|
* an amd64 arch support.mickey2004-01-281-2/+5
| | | | | | | hacked by art@ from netbsd sources and then later debugged by me into the shape where it can host itself. no bootloader yet as needs redoing from the recent advanced i386 sources (anyone? ;)
* another small compiler warning cleanup (#error instead of bailing out)hshoexer2003-12-121-2/+2
| | | | ok henning@
* more pci_flags, unused for now; from netbsd.fgsch2003-10-061-1/+5
| | | | ok deraadt@ henning@ krw@
* pci support for hppamickey2003-09-291-2/+5
|
* strcpy/sprintf cleanup of sys/dev. miod@, deraadt@ says to commit.ho2003-04-271-2/+2
|
* take too. patch ahs to screw up once in a whilemickey2003-02-281-210/+2
|
* remove non-typo changes. sorry folksmickey2003-02-281-1/+206
|
* typo; from weissmanndudemickey2003-02-281-2/+5
|
* Add a simplistic table driven lookup routine and use it where appropriate.jason2002-11-191-1/+8
|
* support for the agp gart on various agp chipsets.mickey2002-07-121-8/+5
| | | | | | | only i810 driver was tested though. based on the netbsd's lkm, initially ported by hunter@dg.net.ua and later made into shape by mickey. testing by art@ and millert@ .