summaryrefslogtreecommitdiffstats
path: root/sys/pci/pci.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement the BUS_PROBE_NOMATCH method for the PCI bus.mdodd1999-07-271-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | This function is called for each device for which no driver was found. Output is similar to the eisa_probe_nomatch() function but with the added benefit of displaying the assigned IRQ (since PCI gives us this information up front.) Output is like so: pci0: unknown card CPQ0508 (vendor=0x0e11, dev=0x0508) at 11.0 irq 9 pci0: unknown card DFZ0508 (vendor=0x10da, dev=0x0508) at 11.0 irq 9 pci0: unknown card DBL0508 (vendor=0x104c, dev=0x0508) at 11.0 irq 9 pci0: unknown card DDM0011 (vendor=0x108d, dev=0x0011) at 11.0 irq 9 I'm not happy with the 3 lines of macro cruft that got added but I consider it a temporary annoyance as those bits will be moved to some place where PCI, EISA and ISAPNP code will be able to use them. (Not surprisingly, this message is longer than the code in question.) Reviewed by: peter, dfr
* Eliminate a bunch of #include "pci.h" and #if NPCI > 0 around entirepeter1999-07-031-6/+1
| | | | files. config will leave the whole file out if configured to do so.
* #include <machine/md_var.h> to bring the prototype forpeter1999-07-011-1/+2
| | | | alpha_platform_assign_pciintr() into scope (!).
* On the new Meteor cards, the Philips SAA 7116 is connected to the PCI busroger1999-05-311-1/+47
| | | | | | | | | | | | | | | | | | | | 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)
* Simplify cdevsw registration.phk1999-05-311-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
* This commit should be a extensive NO-OP:phk1999-05-301-3/+20
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
* In pci_alloc_resource() only check start and end to see if its a default.dfr1999-05-301-2/+2
|
* Add support for multiple PCI "hoses" used on various alpha platforms.gallatin1999-05-201-2/+37
| | | | | | | | | 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 )
* Add missing suspend/resume methods.dfr1999-05-101-1/+3
|
* For the ioctl that reads the pci configuration, look up the name and unitpeter1999-05-091-16/+14
| | | | | on the fly so that we can see the driver assignment of new pci devices as well in the 'pciconf -l' display.
* Argh, don't clobber the pci device list if there are multiple busses!peter1999-05-091-5/+2
| | | | | (An AGP counts as a PCI bus, it seems...) This stopped 'pciconf -l' from working on AGP or PCI->PCI bridge systems.
* Move the declaration of the interrupt type from the driver structuredfr1999-05-081-3/+1
| | | | to the BUS_SETUP_INTR call.
* Print 'irq nn' on the device attach line like the old pci code did.peter1999-05-081-1/+8
| | | | | However, we are not printing 'int a/b/c/d' yet, is it worth it on non-SMP systems? (It's useful when tracing PCI->IO-APIC routing on SMP systems)
* GC pci_bushigh() - no longer used.peter1999-05-081-11/+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-9/+17
| | | | | | | | | | 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.
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-161-112/+541
| | | | | | | | | | | | | | | | | | 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
* Staticize.eivind1999-04-111-3/+3
|
* Fix problem with zero valued map registers followed by valid map entries.se1999-01-191-1/+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.
* Remove 'pci_bridgeto' - it was just an empty placeholder.eivind1999-01-121-9/+1
|
* s/%#p/%p/ to fix a warning. This looks like a leftover of once beingpeter1998-11-091-3/+3
| | | | | %#x, which causes a leading 0x to be prepended. %p has this by default and the '#' is ignored by the kernel prinf code for %p.
* In the cyrix Cx5530, there are null (empty) Base address registers before thejulian1998-11-031-17/+25
| | | | | | | | base register that controls Ultra-DMA, so we need to examine all possible base registers instead of just giving up at the first empty one. Also, looking at the source code to the BIOS, I see that they are also checking for 0xffffffff as an invalid value so do the same. Stefan may like to clean this up, but at least now I can find my PCI IDE registers.
* Some workarounds for a common DEC pci-pci bridge found on alphas.dfr1998-09-161-5/+9
| | | | Fix printf format errors which show up on the alpha.
* Correct printf format bugs.gibbs1998-09-151-5/+5
|
* Revive PCIConf.gibbs1998-09-151-37/+358
| | | | Submitted by: "Kenneth D. Merry" <ken@plutotech.com>
* Maintain a mapping from irq number to (ioapic number, int pin) tuple,tegge1998-09-061-3/+3
| | | | | | | | | | | | and use this when masking/unmasking interrupts. Maintain a mapping from (iopaic number, int pin) tuple to irq number, and use this when configuring devices and programming the ioapics. Previous code assumed that irq number was equal to int pin number, and that the ioapic number was 0. Don't let an AP enter _cpu_switch before all local apics are initialized.
* 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.
OpenPOWER on IntegriCloud