summaryrefslogtreecommitdiffstats
path: root/sys/pci/pci.c
Commit message (Collapse)AuthorAgeFilesLines
* Use "baseclass" instead of "class" for storing the contents of PCI registergibbs1998-08-131-4/+5
| | | | 0xB so that C++ programs can use the PCI conf interface.
* Add a call to a platform-specific irq remapping function for alpha platformsdfr1998-07-221-1/+4
| | | | | | which don't record the correct irqs in PCI config space. Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
* This commit fixes various 64bit portability problems required fordfr1998-06-071-2/+8
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* Add two workarounds for broken MP tables:tegge1998-04-011-4/+20
| | | | | | | | | | | | | - Attempt to handle PCI devices where the interrupt is an ISA/EISA interrupt according to the mp table. - Attempt to handle multiple IO APIC pins connected to the same PCI or ISA/EISA interrupt source. Print a warning if this happens, since performance is suboptimal. This workaround is only used for PCI devices. With these two workarounds, the -SMP kernel is capable of running on my Asus P/I-P65UP5 motherboard when version 1.4 of the MP table is disabled.
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.eivind1998-01-241-1/+3
| | | | | | | | This introduce an xxxFS_BOOT for each of the rootable filesystems. (Presently not required, but encouraged to allow a smooth move of option *FS to opt_dontuse.h later.) LFS is temporarily disabled, and will be re-enabled tomorrow.
* Remove a bunch of variables which were unused both in GENERIC and LINT.phk1997-11-071-3/+3
| | | | Found by: -Wunused
* Update select -> poll in drivers.peter1997-09-141-2/+2
|
* Removed unused #includes.bde1997-08-021-5/+1
|
* Modified to use renamed get_pci_apic_irq() -> pci_apic_pin() function.fsmp1997-06-251-5/+7
|
* Move call of pci_addcfg() before test of cfg->subordinatebus, since these1997-06-021-2/+13
| | | | | | device probe of a host to PCI bridge may modify that value, based on its knowledge of device specific registers. This makes the Intel XXpress work, as verified by: Terje Marthinussen <terjem@cc.uit.no>.
* Two minor changes to the code that builds the pci map array:se1997-05-281-29/+30
| | | | | | | | | | 1) Stop at the first map register that contains a zero value. 2) When testing for the map size work up from low values, since this works around a bug in some BusLogic SCSI card, which has the 16 upper port base address bits hardwired to zero. The config register dump printed in the bootverbose case has been slightly rearranged.
* Minor cleanup of APIC_IO code.fsmp1997-05-271-9/+6
| | | | Submitted by: Stefan Esser <se@freebsd.org>
* Add support for APIC_IO to pci IRQ configuration.fsmp1997-05-271-1/+19
| | | | | The support for APIC_IO was lost in the new set of pci modules. This patch restores the ability to build SMP/APIC_IO kernels.
* Completely replace the PCI bus driver code to make it better reflectse1997-05-261-1816/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* Initialize PCI/CardBus bridges.phk1997-05-031-40/+53
| | | | | Tested on: HP Omnibook 800 / TI PCI1130 Reviewed by: se
* Man the liferafts! Here comes the long awaited SMP -> -current merge!peter1997-04-261-4/+26
| | | | | | | | | | | | | | | | There are various options documented in i386/conf/LINT, there is more to come over the next few days. The kernel should run pretty much "as before" without the options to activate SMP mode. There are a handful of known "loose ends" that need to be fixed, but have been put off since the SMP kernel is in a moderately good condition at the moment. This commit is the result of the tinkering and testing over the last 14 months by many people. A special thanks to Steve Passe for implementing the APIC code!
* Add preliminary support for PCI config header type 2:se1997-04-231-10/+19
| | | | Fetch subvendor/device ID from config space register 0x40.
* Fix printing of map sizes: large numbers got a negative sign before.se1997-03-251-3/+3
|
* Add a few vendor IDs and class and sub-class encodings.se1997-03-251-2/+11
| | | | Submitted by: phk
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Fix misspelled variable name, -current build stopperache1997-02-051-1/+1
|
* Add interface revision field to pci_register_lkm parameter list.pci.c pcibus.hse1997-02-041-1/+5
| | | | | | | This parameter is intended to allow new kernels to work with old LKM binaries, provided the revision ID is incremented whenever the PCI LKM interface is changed. The revision ID does not at all protect against changes in data structures accesses by the driver.
* Improve on previous fix: Clean up getirq() as well, and remove redundantse1997-01-251-9/+8
| | | | warning messages.
* Make IRQ 0 invalid in pci_map_int(), since it is hardwired to these1997-01-231-1/+1
| | | | programmable interval timer chip in PC systems.
* Add PCI LKM support.se1997-01-211-290/+389
|
* 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.
* Add support for header type == 1 devices (PCI 2.1 compatible PCI to PCIse1996-11-121-2/+7
| | | | | | | | bridges with support for 64 bit memory addresses and 32 bit I/O addresses). The code is not complete. It ignores the upper half of the long addresses. This is not a problem on PC compatible systems, but has to be fixed for real computers.
* Fix PCI to PCI bridge register bit field masks.se1996-11-121-31/+6
| | | | | Thanks to "Mike Durian" <durian@plutotech.com> for the very good problem report and his support as a beta tester of this patch.
* Add support for ioctl() accesses to PCI config space registers.se1996-10-221-3/+165
| | | | | | | | | Garrett Wollman sent me this code a few weeks ago for review, and I made some significant changes, which he in turn accepted ... In order to make use of these changes, a device entry has to added to /dev. Submitted by: wollman
* pci_map_mem() did a too restrictive check on the mapping type:se1996-10-141-2/+4
| | | | | | PCI_MAP_MEMORY_TYPE_32BIT_1M should be accepted as well as PCI_MAP_MEMORY_TYPE_32BIT (and now is). (Problem reported by David Greenman.)
* Removed more devconf leftovers.bde1996-09-101-24/+1
|
* Remove devconf, it never grew up to be of any use.phk1996-09-061-77/+2
|
* Fix code that deals with multiple host to PCI bridges by making the nextse1996-09-051-1/+2
| | | | one use the highest seen bus number plus 1 as its starting point.
* Add preliminary support for the Orion PCI chip set. It is special in these1996-09-021-21/+52
| | | | | | | | | | | | | | | | way it attaches multiple PCI buses directly to the CPU, instead of having them hanging off from PCI to PCI bridges. This code is a hack, and will be obsoleted by the planned rework of the PCI code, which will change the dealing with PCI to PCI bridges and other special devices significantly. The patch also adds a kern_devconf entry for PCI bus 0 which is assumed to be a child of cpu0. The new PCI code will make it possible to hand out the kern_devconf structure to a pci device being attached, since this is (regretably, IMHO) required by a few ISA devices. Finally there are new PCI ids for some Intel chip set devices, which had already been known to 2.1.5R, but did not make it into -current. This closes "kern/1558: PCI probe seems to have lost a device in -current".
* Scan PCI buses in order the BIOS has assigned them. This is sometimesasami1996-06-091-2/+4
| | | | | | | necessary to boot from a SCSI disk connected to a twin-channel adapter, and you have multiple of them (disks and adapters). Reviewed by: se
* Fix range check to actually test the variable that will be used asse1996-05-181-2/+2
| | | | | | an index later. Submitted by: Erich Stefan Boleyn <erich@uruk.org>
* Fix logic bug in pci bridge code. For a PCI-PCI bridge, secondaryasami1996-04-251-2/+2
| | | | | | | | should be <= than subordinate, not the other way around. They are both true if the bridge is not cascaded (i.e., twin-channel scsi/e-net adapters won't be affected by this bug), which is probably why it was unnoticed until today.
* Update PCI bus code from my current sources:se1996-04-141-155/+165
| | | | | | | | | | | | - always use pci_conf_read() and pci_conf_write(). (This is required to simulate non-existant devices in my system for PCI bridge code tests.) - reorder some functions (put the main functions at the end). - correct off by one bug in the code dealing with unitialized PCI to PCI bridge chips. (Bug found by ASAMI Satoshi.) - print function number for multi-function devices.
* Removed now-unused #includes of <machine/cpu.h>. They were for bootverbosebde1996-04-071-3/+1
| | | | being declared in the wrong place.
* Remove limit of port I/O addresses to 65K, since PCI specifies 32 bitse1996-02-191-3/+5
| | | | | | | | | port addresses (even though the PC architecture doesn't support them). Add code to limit the I/O map size based on the lowest set bit of the address. This cures the problem with the BT946C only having a 16 bit map register, in voiolation of the PCI specs, without giving up the general support of >65K port regions.
* Add generic PCI to PCI bridge support.se1996-02-171-21/+68
| | | | Improve verbose boot messages for unidentified chips.
* Add heuristic to detect multi-function devices that don't announce thisse1996-01-301-34/+79
| | | | | | feature in the header type register, though it is required by the PCI spec. This should correctly probe both functions of the Intel 82371FB chip, without the need for a special case based on the device ID.
* Decode configuration for the IDE part of the Triton chipset. Thiswollman1996-01-271-1/+8
| | | | | | | | | | | includes a hack in the probe code: the 82371FB is a multifuction device, but doesn't properly set the configuration bit which indicates this. So, we just hard-wire all 82371FBs as multifunction devices. This does not actually make the bus-master IDE stuff work, although if anyone wants to work on that, I have the databooks that tell how to use it.
* Add support for multi-function devices.se1996-01-251-7/+19
|
* Make PCI interrupt handlers return void like everybody else does.se1996-01-231-25/+10
| | | | Reviewed by: davidg
* Improve PCI probe messages by printing the bus number.se1996-01-191-3/+3
| | | | | | Add missing newline to PCI to PCI bridge message. Submitted by: Matt Thomas <matt@lkg.dec.com>
* Completed function declarations and/or added prototypes and/or addedbde1995-12-161-7/+15
| | | | | | | | #includes to get prototypes. pci now uses a different interrupt handler type for interrupts that it dispatches and the isa interrupt handler type for the interrupts that it handles.
* Fix the off-by-one error in the calculation of the valid port range.se1995-12-151-4/+4
| | | | | | | Reduce default value of pcicb_membase to 0x2000000 (from 0x4000000) since this seems to be the lower bound used by many systems. Submitted by: Mihoko Tanaka <m_tanaka@pa.yokogawa.co.jp>
* Another mega commit to staticize things.phk1995-12-141-3/+3
|
* Untangled the vm.h include file spaghetti.dg1995-12-071-2/+2
|
OpenPOWER on IntegriCloud