summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/pcivar.h
Commit message (Collapse)AuthorAgeFilesLines
* Add a new cardbus specific ivar: PCI_IVAR_ETHADDR. Some pci-likeimp2002-11-271-0/+2
| | | | | | | | buses support querying the MAC address in a standard-for-that-bus way. The base pci bus returns NULL for this IVAR always. Submitted by: sam Approved by: re (blanket for NEWCARD)
* style(9) nit.mux2002-08-191-1/+1
|
* Use the __BUS_ACCESSOR macro for PCIB_ACCESSOR instead ofmux2002-08-191-14/+2
| | | | | | reimplementing it. Reviewed by: tmm
* 0 is not an invalid interrupt in the PCI world (just in the ia32imp2002-06-071-2/+4
| | | | | | world), do not treat it as such. This fixes the alpha boot problem. Reviewed by: drew, des
* Define a PCI_INVALID_IRQ to augment PCI_INTERRUPT_VALIDimp2002-06-011-1/+2
|
* Don't claim to have routed an interrupt when the method actually returned anmsmith2002-02-121-0/+5
| | | | error.
* Implement 2 small helper functions:mdodd2002-01-101-0/+2
| | | | | pci_find_bsf() - Find a device_t by bus/slot/function. pci_find_device() - Find a device_t by vendor/device ID.
* Use the new resource_list_print_type() function to print resource listtmm2001-12-211-14/+2
| | | | | contents, and the new __BUS_ACCESSOR macro to construct the accessor functions.
* Don't put variable declarations in header files, put prototypes.mdodd2001-12-191-2/+4
| | | | 'pci_devq' provides useful information now.
* Slightly reimplement some recently added helper functions as methods, sopeter2001-02-271-6/+34
| | | | | that drivers are not reaching into the internals of the pci bus. There are no driver changes, the public interface is the same.
* Next round of PCI subsystem updates:msmith2000-12-131-91/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Break out the /dev/pci driver into a separate file. - Kill the COMPAT_OLDPCI support. - Make the EISA bridge attach a bit more like the old code; explicitly check for the existence of eisa0/isa0 and only attach if they don't already exist. Only make one bus_generic_attach() pass over the bridge, once both busses are attached. Note that the stupid Intel bridge's class is entirely unpredictable. - Add prototypes and re-layout the core PCI modules in line with current coding standards (not a major whitespace change, just moving the module data to the top of the file). - Remove redundant type-2 bridge support from the core PCI code; the PCI-CardBus code does this itself internally. Remove the now entirely redundant header-class-specific support, as well as the secondary and subordinate bus number fields. These are bridge attributes now. - Add support for PCI Extended Capabilities. - Add support for PCI Power Management. The interface currently allows a driver to query and set the power state of a device. - Add helper functions to allow drivers to enable/disable busmastering and the decoding of I/O and memory ranges. - Use PCI_SLOTMAX and PCI_FUNCMAX rather than magic numbers in some places. - Make the PCI-PCI bridge code a little more paranoid about valid I/O and memory decodes. - Add some more PCI register definitions for the command and status registers. Correct another bogus definition for type-1 bridges.
* Next phase in the PCI subsystem cleanup.msmith2000-12-081-7/+0
| | | | | | | | | | | | | | | | | | | | - Move PCI core code to dev/pci. - Split bridge code out into separate modules. - Remove the descriptive strings from the bridge drivers. If you want to know what a device is, use pciconf. Add support for broadly identifying devices based on class/subclass, and for parsing a preloaded device identification database so that if you want to waste the memory, you can identify *anything* we know about. - Remove machine-dependant code from the core PCI code. APIC interrupt mapping is performed by shadowing the intline register in machine- dependant code. - Bring interrupt routing support to the Alpha (although many platforms don't yet support routing or mapping interrupts entirely correctly). This resulted in spamming <sys/bus.h> into more places than it really should have gone. - Put sys/dev on the kernel/modules include path. This avoids having to change *all* the pci*.h includes.
* Get out the roto-rooter and clean up the abuse of nexus ivars by thepeter2000-09-281-2/+6
| | | | | | | | | | | | i386/isa/pcibus.c. This gets -current running again on multiple host->pci machines after the most recent nexus commits. I had discussed this with Mike Smith, but ended up doing it slightly differently to what we discussed as it turned out cleaner this way. Mike was suggesting creating a new resource (SYS_RES_PCIBUS) or something and using *_[gs]et_resource(), but IMHO that wasn't ideal as SYS_RES_* is meant to be a global platform property, not a quirk of a given implementation. This does use the ivar methods but does so properly. It also now prints the physical pci bus that a host->pci bridge (pcib) corresponds to.
* * Completely rewrite the alpha busspace to hide the implementation fromdfr2000-08-281-5/+3
| | | | | | | | | | | | the drivers. * Remove legacy inx/outx support from chipset and replace with macros which call busspace. * Rework pci config accesses to route through the pcib device instead of calling a MD function directly. With these changes it is possible to cleanly support machines which have more than one independantly numbered PCI busses. As a bonus, the new busspace implementation should be measurably faster than the old one.
* Nuke the useless chip driver. It gets in the way when you want to loaddfr2000-06-091-0/+1
| | | | a functional driver for the device.
* Encapsulate the old PCI compatability support and APIs completely underpeter2000-05-281-13/+13
| | | | | | "options COMPAT_OLDPCI". This option already existed, but now also tidies up the declarations in #include <pci/pci*.h>. It is amazing how much stuff was using the old pre-FreeBSD 3.x names and going silently undetected.
* Unused definitions.peter2000-03-201-10/+0
|
* Bandaid for src/sys/modules which broke worldpeter2000-03-201-1/+1
|
* Connect the ISA and PCI compatability shims to an option. In this casepeter2000-03-191-0/+12
| | | | | | | | it's options COMPAT_OLDISA and COMPAT_OLDPCI. This is meant to be a fairly strong incentive to update the older drivers to newbus, but doesn't (quite) leave anybody hanging with no hardware support. I was talking with a few folks and I was encouraged to simply break or disable the shims but that was a bit too drastic for my liking.
* Remove the vga-pci driver. It serves no purpose and it hides the hardwaredfr2000-02-191-0/+1
| | | | | | | | from useful drivers such as the 3D DRI drivers I will be porting for hardware accelerated OpenGL. The hardware will still be reported during boot using the nomatch system. Approved by: jkh
* Clean up the cfgmech/pci_mechanism debris. The reason for the existancepeter2000-01-081-2/+0
| | | | | | | of this is no longer an issue as we have a replacement driver for the one that needed it. Reviewed by: dfr
* Zap pci_map_dense() and pci_map_bwx() - they were for compatability butpeter2000-01-051-2/+0
| | | | | are not used. All the drivers that use memory mapped IO on the Alpha have been ported already.
* Make the usb and ide/ata device identification a little saner. Rather thanpeter1999-12-101-1/+2
| | | | | | attaching to the device via chip*, use the newbus nomatch method to report the device. This leaves them unattached so that a driver can be easily loaded to grab them later.
* [ repository copy of sys/pci/pci_ioctl.h to sys/sys/pciio.h happened in theken1999-12-081-1/+0
| | | | | | | | | | | | | | | | | background ] Rename sys/pci/pci_ioctl.h to sys/sys/pciio.h to make it easier for userland programs to use this interface. Reformat the file, and add a BSD-style copyright to it. Add a new man page for pci(4). The PCIOCGETCONF, PCIOCREAD, and PCIOCWRITE ioctls are documented, but the PCIOCATTACHED ioctl is not documented because it is not implemented. Change includes of <pci/pci_ioctl.h> to <sys/pciio.h> or remove them altogether. In many cases, pci_ioctl.h was unused. Reviewed by: steve
* * Implement bus_set/get/delete_resource for pci.dfr1999-10-141-23/+7
| | | | | | | * Change the hack used on the alpha for mapping devices into DENSE or BWX memory spaces to a simpler one. Its still a hack and should be a seperate api to explicitly map the resource. * Add $FreeBSD$ as necessary.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* On the new Meteor cards, the Philips SAA 7116 is connected to the PCI busroger1999-05-311-1/+7
| | | | | | | | | | | | | | | | | | | | via an IBM PCI-PCI bridge (82351 or 82352 or 82353) The driver must identify if it is on a secondary PCI bus, which is created via the IBM PCI-PCI bridge. If it is, then it must initialise the IBM PCI-PCI bridge correctly. To do this, the following new functions are added. Because they use the pcici_t tag, they are considered 2.2 compatibility APIs pcici_t * pci_get_parent_from_tag(pcici_t tag); int pci_get_bus_from_tag(pcici_t tag); (The _from_tag suffix is used to prevent clashes with similarly named newbus PCI API functions) Submitted by: Anton Berezin <tobez@plab.ku.dk> Reviewed by: Doug Rabson <dfr@nlsystems.com> Reworked by: Me (roger)
* Add support for multiple PCI "hoses" used on various alpha platforms.gallatin1999-05-201-1/+30
| | | | | | | | | The specific intent of this commit is to pave the way for importing Compaq XP1000 support. These changes should not affect the i386 port. Reviewed by: Doug Rabson <dfr@nlsystems.com> (actually, he walked me through most of it & deserves more than reviewd-by credit )
* Move pcibus (host -> pci bus) probe/attach routines from nexuspeter1999-05-181-2/+1
| | | | | to pcibus.c. pci_cfgopen() becomes static and there are no more bus #ifdef's in nexus.c.
* Use the probe priority mechanism to make sure the chip* probes do notpeter1999-05-111-3/+2
| | | | | | | | | | | | | displace a real driver. Revert rev 1.109. Pick up a few things from elsewhere (a couple of SiS id's). As an *experiment*, have the chip* driver claim (for reporting purposes) IDE controllers if there isn't another PCI-aware ide or ata driver to grab them. I've exported the match function since it could be used from the ata-all.c code replacing ata_pcimatch() - but I have not touched the ata code. I'd like to catch a few more devices this way, including USB and other bridges etc.
* GC unused variable in struct.peter1999-05-091-2/+1
|
* Fix a goof on my part; s/struct moduledata */struct module */peter1999-05-061-3/+3
|
* Replace the pcidevice_set linker set based configuration mechanism for oldpeter1999-04-241-2/+12
| | | | | | | | | | style pci drivers with a simple one-line change to use a module that registers itself under new-bus and should in theory enable just about all of the pci drivers to be loadable (kldload and loader(8)) but without having the impact of converting the APIs yet. This also fixes the problem of having undefined variables when only new-style pci drivers are present.
* Well folks, this is it - The second stage of the removal for build supportpeter1999-04-171-8/+1
| | | | for LKM's..
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-161-1/+78
| | | | | | | | | | | | | | | | | | i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core
* Fix problem with zero valued map registers followed by valid map entries.se1999-01-191-2/+2
| | | | | | The previous code just ignored the invalid map register, but this gave surprising results because of the way pci_map_port() associated the map register offset supplied with a map entry in the map array.
* Let drivers specify interrupt flags (INTR_EXCL and/or INTR_FAST)bde1999-01-131-2/+5
| | | | | | | | | using the new pci_map_int_right() variant of pci_map_int(). Fast interrupts work for PCI devices if and only if they are exclusive. (The PCI interrupt mux doesn't support fast interrupts and can't support a mixture of fast and slow interrupts even in principle.) Don't assume that intrmask_t == unsigned in pci_map_int().
* pci_device pd_probe function changed from returning char * to returningdillon1998-12-141-2/+2
| | | | | | const char *. Originally I was going to add casts from const char * to char * in some of the pci device drivers, but the reality is that the pci device probes return constant quoted strings.
* Add functions for accessing dense and bwx memory for pci devices. Thesedfr1998-10-061-2/+7
| | | | | | | routines are necessary to allow the use of certain types of hardware on the alpha, particularly a Myrinet card. Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
* Revive PCIConf.gibbs1998-09-151-7/+23
| | | | Submitted by: "Kenneth D. Merry" <ken@plutotech.com>
* Use "baseclass" instead of "class" for storing the contents of PCI registergibbs1998-08-131-2/+2
| | | | 0xB so that C++ programs can use the PCI conf interface.
* On the alpha, ports may be allocated above 64k.dfr1998-07-221-2/+8
| | | | | | | | Change the port address argument to pci_map_port to pci_port_t* which is defined as u_int on the alpha, u_short on i386. This is a stopgap with a hopefully limited lifetime. Discussed with: Stefan Esser <se@freebsd.org>
* Reorder function decls alphabetically.fsmp1997-08-211-2/+2
|
* A few more casts and a function declaration for warning free kernel builds.fsmp1997-08-211-1/+2
|
* Completely replace the PCI bus driver code to make it better reflectse1997-05-261-216/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reality. There will be a new call interface, but for now the file pci_compat.c (which is to be deleted, after all drivers are converted) provides an emulation of the old PCI bus driver functions. The only change that might be visible to drivers is, that the type pcici_t (which had been meant to be just a handle, whose exact definition should not be relied on), has been converted into a pcicfgregs* . The Tekram AMD SCSI driver bogusly relied on the definition of pcici_t and has been converted to just call the PCI drivers functions to access configuration space register, instead of inventing its own ... This code is by no means complete, but assumed to be fully operational, and brings the official code base more in line with my development code. A new generic device descriptor data type has to be agreed on. The PCI code will then use that data type to provide new functionality: 1) userconfig support 2) "wired" PCI devices 3) conflicts checking against ISA/EISA 4) maps will depend on the command register enable bits 5) PCI to Anything bridges can be defined as devices, and are probed like any "standard" PCI device. The following features are currently missing, but will be added back, soon: 1) unknown device probe message 2) suppression of "mirrored" devices caused by ancient, broken chip-sets This code relies on generic shared interrupt support just commited to kern_intr.c (plus the modifications of isa.c and isa_device.h).
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Removed more devconf leftovers.bde1996-09-101-16/+1
|
* Various cleanups for remanents of devconf.phk1996-09-081-11/+1
|
* Remove devconf, it never grew up to be of any use.phk1996-09-061-2/+3
|
OpenPOWER on IntegriCloud