summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/pci_map.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* No longer #ifdef BUS_SPACE_MAP_PREFETCHABLE, as all <machine/bus.h> aremiod2013-02-091-5/+2
| | | | expcted to provide it nowadays.
* Some stupid hardware marks PCI BARs as prefetchable that aren't side-effectkettenis2010-09-061-5/+4
| | | | | | | | | | | | | | free. Mapping those with BUS_SPACE_MAP_PREFETCHABLE can have disastrous effects, like the NMIs observed by jsg@ with certain Intel 10Gb Ethernet devices. So stop trusting the devices and instead require drivers to explicitly pass the BUS_SPACE_MAP_PREFECTHABLE flag to pci_mapreg_map(). The pci_mapreg_info() call will continue to return BUS_SPACE_MAP_PREFECTHABLE flags for prefetchable BARs as an easy way to figure out whether a BAR is prefetchable. Since the vga_pci.c code uses this interface, all consumers of VGA BARs will still use the BUS_SPACE_MAP_PREFETCHABLE flag when appropriate. ok oga@, jsg@
* In pci_mapreg_map(), do not blindly dereference a possible NULL pointermiod2010-02-281-5/+9
| | | | | upon stumbling on a BAR which value is zero. Found the hard way by kurt@, ok kettenis@
* Allow MD limits for allocating PCI io and mem space and specify limits onkettenis2009-10-061-4/+27
| | | | | | | i386 and amd64 to make avoid legacy ISA I/O registers. Fixes issues with ThinkPad T-series Dock II units as reported by sobrado@ ok miod@
* We can treat BARs initialized to 0 as invalid now on socppc.kettenis2009-08-251-2/+2
|
* Avoid twiddling the lower bits of a BAR such that the code becomes usablekettenis2009-07-231-2/+2
| | | | for mapping ROM BARs.
* Set a first step on the road towards proper accounting of PCI resources bykettenis2009-04-061-3/+17
| | | | | | | | | | | | 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@
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* On socppc, we need to be able to map a zero base address too.kettenis2008-05-101-2/+2
|
* On sparc64, a zero base address doesn't mean the BAR is invalid. We probablykettenis2008-04-091-1/+3
| | | | | | | need a MD base address validation function, but skipping the check on sparc64 will do for now. ok deraadt@
* As per PCI specs, disable an adapter's transaction response whiletsi2007-01-261-8/+26
| | | | | | | sizing its BARs. tested niallo@, tsi@, ian@, mk@, sturm@, kettenis@, krw@, beck@, drahn@ ok beck@, kettenis@, drahn@
* ignore bars which are 0; ok kettenisderaadt2006-12-121-7/+7
|
* puc@cardbus (only added (commented out) to whom has puc@pci enabled)mickey2006-07-311-6/+1
| | | | | | tested on puc@pci by fkr and meself on the cardbus. still needs a bit more work but generally works. deraadt@ ok and some input from miod@
* Do not blindly enable io and mem space for all matched PCI devices. This iskettenis2006-07-041-1/+11
| | | | | | | | known to be wrong for legacy VGA devices. It also seems to have bad side effects for some unconfigured PCI-PCI bridges. Instead, enable io or mem space when we map it. ok deraadt@
* Damnit! no static functions in the kerneljason2006-05-311-5/+5
|
* Don't check for a BAR address past PCI_MAPREG_END; some devicesbrad2006-04-071-3/+19
| | | | | | have BARs way out in left field. From NetBSD
* implement a check whether a BAR is present at all at a givenbrad2006-04-071-8/+27
| | | | | | | | configuration space address, pci_mapreg_probe(). From NetBSD ok dlg@
* ANSIfybrad2006-03-191-59/+23
|
* Only print warning messages in pci_{io,mem}_find() if option DEBUG; instead,miod2005-03-151-16/+31
| | | | | | | do not return 1 on failure but a real errno the caller can check for proper action. tweaks and ok mickey@
* When testing for a void region, use PCI_MAPREG_MEM_SIZE() for 32bit memaddr.brad2004-10-091-2/+3
| | | | | | | | | If the 32bit mask read is 0, wmask will be 0xffffffff00000000, and PCI_MAPREG_MEM64_SIZE() won't make this 0. From NetBSD ok mickey@
* this bit is defined as prefetchable and not cachable and thus rename and use appropriatelymickey2003-08-271-5/+6
|
* remove non-typo changes. sorry folksmickey2003-02-281-2/+2
|
* typo; from weissmanndudemickey2003-02-281-2/+2
|
* First round of __P removal in sysmillert2002-03-141-5/+5
|
* typo spotted by Mike Pechkin <mpech@prosoft.org.lv>niklas2001-06-131-2/+2
|
* Make pci_mapreg_map take an extra argument where we canniklas2001-06-121-6/+16
| | | | | | | put a size limitation of the PCI region to map. That makes the PERC 3/Di raid controller usable, as it publishes too much PCI memory for us to map in the kernel virtual memory. As we only access the first 256 byte it is of no use to map 128MB of kvm.
* support 64bit BARs from NetBSDniklas2000-09-201-14/+48
|
* Import pci_mapreg_type from NetBSDchris2000-06-091-1/+16
|
* Import of NetBSD ATA/IDE stuff.csapuntz1999-07-181-0/+1
| | | | | | | | | | | | | | Introduction of home-grown To enable this stuff in your configuration, look at the NEWATA conf file and go through dev/isa/files.isa dev/pci/files.pci conf/files arch/i386/conf/files.i386 and follow the instructions on commenting/uncommenting stuff
* Added pci_mapreg* interface from NetBSD.csapuntz1999-07-181-0/+274
Added PCI 2.2 stuff from NetBSD Modified if_de to use mapreg interface