summaryrefslogtreecommitdiffstats
path: root/sys/pci/pci_compat.c
Commit message (Collapse)AuthorAgeFilesLines
* * Implement bus_set/get/delete_resource for pci.dfr1999-10-141-4/+4
| | | | | | | * 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
|
* Add support for SYS_RES_DENSE and SYS_RES_BWX resource types. These aredfr1999-07-281-29/+21
| | | | | | | | | equivalent to SYS_RES_MEMORY for x86 but for alpha, the rman_get_virtual() address of the resource is initialised to point into either dense-mapped or bwx-mapped space respectively, allowing direct memory pointers to be used to device memory. Reviewed by: Andrew Gallatin <gallatin@cs.duke.edu>
* Eliminate a bunch of #include "pci.h" and #if NPCI > 0 around entirepeter1999-07-031-5/+1
| | | | files. config will leave the whole file out if configured to do so.
* On the new Meteor cards, the Philips SAA 7116 is connected to the PCI busroger1999-05-311-1/+13
| | | | | | | | | | | | | | | | | | | | 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)
* Take a shot at handling INTR_FAST and INTR_EXCL for CY_PCI_FASTINTR.peter1999-05-111-12/+21
| | | | | Bruce suggested a patch before but that was based on the old DRIVER_TYPE_* interfaces.
* Fix 'assignment used as truth value' on alpha.peter1999-05-101-3/+5
|
* Move the declaration of the interrupt type from the driver structuredfr1999-05-081-10/+11
| | | | to the BUS_SETUP_INTR call.
* Minor style nit (this minor style.9 violation caused a grep miss here)peter1999-05-071-3/+5
|
* Zap some #if 0 code for wired PCI devices. This will look quite differentpeter1999-04-241-155/+1
| | | | under new-bus.
* Well folks, this is it - The second stage of the removal for build supportpeter1999-04-171-48/+1
| | | | for LKM's..
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-161-108/+84
| | | | | | | | | | | | | | | | | | 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
* pci_register_lkm can fail gracefully, so let it do that when there iseivind1999-04-111-2/+2
| | | | | | no more memory (M_WAITOK -> M_NOWAIT). It may be called early enough during boot that M_WAITOK isn't OK. (In theory - right now it isn't called from anywhere).
* Fix problem with zero valued map registers followed by valid map entries.se1999-01-191-8/+11
| | | | | | 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.
* Replace includes of <sys/kernel.h> with includes ofjdp1999-01-141-2/+2
| | | | | <sys/linker_set.h> in those files that use only the linker set definitions.
* Let drivers specify interrupt flags (INTR_EXCL and/or INTR_FAST)bde1999-01-131-5/+12
| | | | | | | | | 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-3/+3
| | | | | | 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.
* Bailing out when malloc returns != NULL will not help anybody.eivind1998-12-091-2/+2
|
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-7/+5
| | | | and local variables, goto labels, and functions declared but not defined.
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()archie1998-12-041-1/+2
| | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
* Fix a warning (#include the apic_next_irq() prototype for APIC_IO)peter1998-11-091-1/+5
|
* Add functions for accessing dense and bwx memory for pci devices. Thesedfr1998-10-061-1/+44
| | | | | | | 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-2/+21
| | | | Submitted by: "Kenneth D. Merry" <ken@plutotech.com>
* Maintain a mapping from irq number to (ioapic number, int pin) tuple,tegge1998-09-061-6/+6
| | | | | | | | | | | | 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.
* Remove a stupid hack of mine which prevented PCI io memory access on the alpha.dfr1998-08-071-5/+2
|
* On the alpha, ports may be allocated above 64k.dfr1998-07-221-3/+10
| | | | | | | | 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>
* Add two workarounds for broken MP tables:tegge1998-04-011-2/+46
| | | | | | | | | | | | | - 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.
* Yank the casts.fsmp1997-08-211-2/+2
|
* A few more casts and a function declaration for warning free kernel builds.fsmp1997-08-211-2/+2
|
* Removed unused #includes.bde1997-08-021-6/+1
|
* Remove use of intrec*, use void* instead.se1997-05-301-2/+4
| | | | Disable test entries for wired PCI devices on bus 1.
* Add consistency check to the functions that map port or memory ranges:se1997-05-281-3/+16
| | | | | | | | | | Return failure, if the enable bit corresponding to the map type has not been set in the command register. This feature was requested by Justin Gibbs, who pointed out that some early PCI to PCI bridges do not correctly support memory windows (I assume because of the risk of deadlocks that have been taken care of in the PCI 2.2 spec) and that some BIOS clears the memory address decode enable bit in the command register of the PCI device, if it finds them behind such a bridge.
* Completely replace the PCI bus driver code to make it better reflectse1997-05-261-0/+351
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).
OpenPOWER on IntegriCloud