summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
Commit message (Collapse)AuthorAgeFilesLines
* Re-route interrupts on ia64 so that we can get the I/O SAPIC interruptdfr2001-10-051-1/+12
| | | | | numbers (the BIOS leaves legacy PIC interrupt numbers in the intline registers).
* o Modify access control code for /dev/pci device to use securelevel_gt()rwatson2001-09-261-3/+9
| | | | | | instead of direct securelevel variable test. Obtained from: TrustedBSD Project
* Add a standard hack in the spirit of PCI_ENABLE_IO_MODES to allow systemsbrooks2001-09-261-0/+4
| | | | | | | | with weird PCI-PCI bridge configurations to work. Defining PCI_ALLOW_UNSUPPORTED_IO_RANGE causes the sanity checks to pass even with out of range values. Reviewed by: msmith
* KSE Milestone 2julian2001-09-121-6/+6
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Small nit: Make both prints use 'at device %d.%d'.n_hibma2001-09-011-1/+1
|
* Ugggg. I thought I'd already committed this to -current:imp2001-08-271-1/+1
| | | | | If the intline is 0 or 255, then it needs an interrupt routed. Some Sony laptops improperly flag devices that need an interrupt with 0 :-(.
* Fix reversed arguments to pci_write_config()peter2001-06-031-2/+2
| | | | | PR: kern/9408 Submitted by: Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
* Backout previous revision. While it fixed many platforms, it brokegallatin2001-05-311-5/+1
| | | | | | | all alphas with devices behind ppb's. I'm working on a better solution now. Note that all alphas that use per-platform interrupt mapping are broken again (as they have been for several months)
* finally fix intr routing on alphas such as the as500 after months ofgallatin2001-05-271-1/+5
| | | | | | | | | | | | | | | | | | | breakage: - call PCIB_ROUTE_INTERRUPT() regardless of how valid the intline looks. Some alphas leave garbage in the intline and leave the intr mapping to OS platform support routines that map slots/buses to intlines - Down in the alpha pci code, first try platform.pci_intr_route() and if it doesn't exist or returns garbage, just read the intline out of config space. tested on AS500 (garbage in intline) and UP1000 (PC-like, intline is valid) Note that a nice little hack like the APIC_IO section of pci_cfgregread() is not workable. This is because the calling interface for alpha_pci_route_interrupt() requires us to figure out the bus/slot/etc from a device_t. At pci_read_device() time, we don't have a device_t for the bus/slot/func in question.
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* The serverworks OSB4 pci->isa bridge has the same mapping register atpeter2001-03-151-3/+3
| | | | offset 0x90 for the SMBus device as the PIIX4.
* Slightly reimplement some recently added helper functions as methods, sopeter2001-02-273-35/+113
| | | | | that drivers are not reaching into the internals of the pci bus. There are no driver changes, the public interface is the same.
* Fix typo: wierd -> weird.asmodai2001-02-061-1/+1
| | | | There is no such thing as wierd in the english language.
* Remove vga_pci generic driver.nsouch2001-01-051-75/+0
| | | | Approved by: Mike Smith <msmith@freebsd.org>
* Sanity check ptr for legal values so it is less likelymjacob2001-01-011-0/+6
| | | | | | (but not impossible) to get stuck in an infinite loop. Obtained from: msmith@freebsd.org
* Add PCIR_CAP_PTR as a define for the location of the capabilitygibbs2000-12-201-0/+1
| | | | pointer of type 0 devices. This is required by my last aic7xxx change.
* Remove a redundant prototype.msmith2000-12-131-1/+0
|
* Don't try to free the now-nonexistent hdrspec field. This one snuck bymsmith2000-12-131-2/+0
| | | | me in the previous round of patches. Oops.
* Next round of PCI subsystem updates:msmith2000-12-136-694/+930
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* - We have access to our own device_t here, so use pci_read_configmsmith2000-12-122-30/+77
| | | | | | | | | | | | | | rather than finding our parent pcib and using its PCI_READ_CONFIG method. - Fix the defines for the 32-bit I/O decode registers, and properly process the 16-bit versions. Now we will correctly check that I/O resources behind the bridge are going to be decoded. - Bring the quirk for the Orion PCI:PCI bridge in here (since it seems to want to set the secondary/supplementary bus numbers). - Use PCI_SLOTMAX rather than a magic number.
* Don't try to fix up the Orion here; the interface we use is wrong for themsmith2000-12-121-16/+0
| | | | new code (and about to disappear too).
* - Don't return early from the PCI:EISA bridge attachment, or we will losemsmith2000-12-122-42/+41
| | | | | | | | | the ISA bus. - Don't expect that a PCI:ISA bridge will have a correct class value; if we're checking PCI IDs, only depend on these. This should fix the loss of ISA on machines with PCI:EISA bridges like the AS4100.
* It looks like we can't count on these devices always having a consistentmsmith2000-12-111-44/+43
| | | | | | class/subclass, so give up trying to cull the list. Instead, complain in the bootverbose case, but otherwise just accept that we will have to carry this list of device IDs around.
* The ICH2 reports itself as a PCI:ISA bridge, so don't special-case itmsmith2000-12-101-1/+0
| | | | | | here. Submitted by: Michael Harnois <mdharnois@home.com>
* Cosmetic nit; separate slot/function with '.' not ':'msmith2000-12-091-1/+1
|
* - Fix the device database parsing code so that it actually works.msmith2000-12-093-12/+30
| | | | | | | | | | - Improve the formatting for devices identified by the database. - Fix the pcib_route_interrupt method definition, as an old version snuck in here somehow 8( - Remove a couple of the vendor/device IDs for PCI:ISA bridges which correctly identify themselves. Submitted by: peter
* Next phase in the PCI subsystem cleanup.msmith2000-12-088-138/+1105
| | | | | | | | | | | | | | | | | | | | - 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.
* Convert the pcib_{read,write}_config args from signed to unsigned,gallatin2000-12-011-8/+8
| | | | | | | | | | | like the args to the config space accessors these functions replaced. This reduces the likelyhood of overflow when the args are used in macros on the alpha. This prevents memory management faults when probing the pci bus on sables, multias and nonames. Approved by: dfr Tested by: Bernd Walter <ticso@cicely8.cicely.de>
* Reduce code duplication by using the GET_RESOURCE_LIST bus method and relatedmdodd2000-11-281-45/+18
| | | | | | | | generic resource_list management functions. I'll deal with the EISA bits later. Not objected to by: new-bus
* fix warning compile error about unused variabledarrenr2000-10-291-0/+2
|
* Fix params passed to pci_porten() and pci_memen().phk2000-10-291-2/+2
|
* Unconditionally turning on the I/O and memory enable bits in the PCImsmith2000-10-281-1/+14
| | | | | | | command register is too aggressive. Revert to the previous behaviour, but leave the new behaviour available as an undocumented option. It's not clear what the Right, Right Thing is to do here, but the more conservative approach is safer.
* Allow PCI busses to be connected to host bridges detected by ACPI as well.msmith2000-10-281-0/+1
|
* Write the routed interrupt back to PCI configuration space.msmith2000-10-191-1/+1
|
* Forgot to commit this last night.imp2000-10-161-0/+10
| | | | | | Define interrupt routing method. Submitted by: msmith
* The previous commit broke kernel builds on alpha (and probably ia64).gallatin2000-10-161-0/+2
| | | | | | #ifdef away the offending code until somebody with more newbus fu than me can figure out where to put a default function that returns 255 without touching each alpha chipset driver..
* When a pci device hasn't had an interrupt routed to it (signified byimp2000-10-161-0/+19
| | | | | | | the intline of 255) go ahead and route the interrupt when we allocate an interrupt. Submitted by: msmith
* Validate the PCI bus number that we fetch from our parent, since there's nomsmith2000-10-091-2/+5
| | | | guarantee that everything attached to *it* is a PCI bus.
* Add definition for PCIS_SERIALBUS_SMBUS PCI device subclass.archie2000-10-021-2/+1
| | | | Remove cut & paste leftovers.
* 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.
* Add PCIM_CMD_MWRICEN, the bit in the command register in PCI spacegibbs2000-09-161-0/+1
| | | | that enables memory write and invalidate cycles on a bus master.
* When dumping the 'found devices' list in verbose mode, actually show thepeter2000-09-051-0/+2
| | | | | | bus/slot/function numbers. The old PCI code used other markers or something, but without it here under the new pci code it is very hard to tell which device is which (this only affects bootverbose mode).
* If a base address register has been set up by the BIOS, but the relevantmsmith2000-09-011-6/+13
| | | | | | | enable bit hasn't been set in the command register, set the bit and honour the register. It seems that quite a few lazy BIOS writers aren't bothering to do this, which upsets the existing code and causes us to miss out on properly-configured devices.
* Remove duplicate static definition of pci_devclasspeter2000-08-311-1/+0
|
* * Completely rewrite the alpha busspace to hide the implementation fromdfr2000-08-283-182/+248
| | | | | | | | | | | | 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-092-0/+2
| | | | a functional driver for the device.
* Encapsulate the old PCI compatability support and APIs completely underpeter2000-05-283-123/+22
| | | | | | "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.
* Back out the previous change to the queue(3) interface.jake2000-05-261-3/+3
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-3/+3
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Print the correct value for the map type on a verbose boot.dfr2000-05-181-1/+1
| | | | | PR: kern/18662 Submitted by: tamaru@ap.t.u-tokyo.ac.jp
OpenPOWER on IntegriCloud