summaryrefslogtreecommitdiff
path: root/sys/arch/sgi/pci
AgeCommit message (Collapse)Author
2009-08-22Constify the what/name parameter of pci_intr_establish().Michael Knudsen
Tested by myself, sthen, oga, kettenis, and jasper. Input from sthen and jasper. ok kettenis (Manpage follows shortly.)
2009-08-18Blind partial support for IOC4 chip, found on IO8 and IO9 base I/O boards onMiod Vallat
Origin 350 and Tezro systems. While this chip provides serial ports, an ATAPI interface and a PS/2 keyboard and mouse interface, this code currently only attempts to support the serial ports.
2009-08-18Replace a few hardcoded numbers from the interrupt register with properMiod Vallat
commented symbolic constants.
2009-08-18On dual interrupt IOC3 designs, disestablish the ethernet interrupt if noMiod Vallat
ethernet driver attaches; prevents interrupt storms on Octane caused by the way ARCS initializes the chip, when not booting from the network.
2009-08-09typo; bradMiod Vallat
2009-08-09Clear the upper part of 64 bit memory BARs, for they show up as 0xffffffffMiod Vallat
otherwise. Found the hard way by jasper@, playing with a bge card.
2009-07-26Rework ioc children attachment: instead of having ioc build a semi-bogusMiod Vallat
bus_space_handle_t, pass them ioc's own bus_space_handle and bus_space_tag, and have the children use bus_space_subregion() on it.
2009-07-26Don't forget to bus_space_unmap(), even if it's a no-op, in rbus_space_unmap().Miod Vallat
2009-07-23When computing the total resources required by devices behind a ppb, takeMiod Vallat
PCI ROM into account, if any.
2009-07-22Get rid of now unused extent_malloc_ok variable.Miod Vallat
2009-07-22Get rid of bus_space_tag_t now unused bus_extent and bus_reverse fields.Miod Vallat
2009-07-22Overhaul resource handling and mapping in macepcibr(4):Miod Vallat
- do not use a stinking extent to track bus_space_map allocations, but directly map in XKPHYS instead. What are 64 bit address spaces good for if we still need to use TLB for that? - provide proper resource management extents to the MI pci code, so that, in turn, the cardbus code can reuse them instead of providing their own. - use the whole 4GB address space window for PCI I/O resources, just because we can. - make sure no device can get assigned address zero in I/O space, because this address triggers a PCI error.
2009-07-21PCI-Cardbus bridge support for both O2 (macepcibr) and Octane/Origin (xbridge)Miod Vallat
class systems. Tested on O2 and Origin 200 with wi@pcmcia and xl@cardbus, using a Ricoh 5C475-based cbb(4) board. acx@cardbus doesn't work reliably yet, so your mileage may vary until more bugs are fixed. Thanks to matthieu@ for lending me some cardbus devices for testing.
2009-07-19Simplify code that sanitizes pci resources on the O2's mace PCI bridge.Mark Kettenis
The firmware messes up I/O BARs, so whack those back to 0, such that the MI PCI code initializes on an as-needed basis. ok miod@
2009-07-17Update bus_dma to the better codebase found on almost all other platforms,Miod Vallat
where the common part to all bus_dmamap_load*() functions is implemented in in an internal load_buffer routine. This allows the xbridge-specific dma code to only provide this function, instead of three; and this also brings us a working bus_dmamap_load_uio() on all supported sgi machines, which in turns make crpyto(4) devices really work. Tested with hifn(4).
2009-07-16Program PPB_REG_PREFLIM_HI32, not PPB_REG_PREFBASE_HI32 a second time. Oops.Miod Vallat
2009-07-16Make the PCI-PCI bridge initialization code bus-independent, relying on aMiod Vallat
per-pci_chipset_t function to perform actual resource allocation. Add the necessary bits to macepcibr(4), and enable ppb(4) on O2 kernels now. Joint effort with kettenis@
2009-07-16Cheat in pci_conf_read() and force the REXTVALID bit in the O2 onboard ahc(4)Miod Vallat
configuration register; this allows the driver to select ultra speed, which this particular hardware supports. From Linux, ok kettenis@
2009-07-13Extend xbridge to support shared interrupt handlers, and perform PCI-PCIMiod Vallat
bridge initialization if necessary; enable ppb on IP27 and IP30 kernels. With feedback from kettenis@; macepcibr to gain the same functionality soon.
2009-07-01The widget mapping code has been written back when I was only working onMiod Vallat
Octane support. The Octane being a single-node system, address space is ludicrous enough to allow the whole address space of every widget to be directly accessible in whole, using the address bits reserved to nasid. However, on IP27 and IP35, things do not work this way - while we still have the low 16MB address space of each widget available (the so-called ``short window''), access to other parts of the wiget address space is done through translation slots (IOTTE) at the Hub I/O space level, on a per-node basis. Given the imminent release lock, give up completely on ``large'' mappings of widgets, and restrict ourselves to short window operation, all the time (thus reinforcing the use of devio registers to map pci resources on xbridge). A proper interface to request mappings of specific widget areas, either directly on Octane, or through IOTTE if available on Origin, will appear post-release. No functional change (except from silently repairing Octane support which the previous xbridge commit silently broke).
2009-06-21Remove the ioc interrupt probe code, the heuristic is correct; origin 300Miod Vallat
is still unhappy due to ``interferences'' between the L1 console and the brick's serial ports, unfortunately.
2009-05-27Yet another attempt at a more reliable detection of the second interruptMiod Vallat
used by onboard IOC chips, by forcing the IOC to trigger this interrupt, and some help from the PCI bridge driver to report which interrupt has fired through a fake PCI configuration register. This works nicely on IP27 and IP35, but on IP30 the interrupt doesn't happen, for some reason; so keep the existing heuristic in case the above trick did not give us a valid interrupt number. In case we got an interrupt, this will also detect IOC configurations where there is actually one interrupt, should such configurations exist. <rant style="beck"> I probably deserve to rot in hell for this abomination, but I won't mind as long as the IOC designers who came with the bright ``let's use more than one interrupt and defecate on the pci spec'' ideas are there, too. </rant>
2009-05-22According to pics on ebay, CADDuo boards indeed have Ethernet connectors.Miod Vallat
2009-05-08Attach children with config_found_sm() instead of directly invokingMiod Vallat
config_search(), so that disabled or unconfigured child device appear in dmesg as ``not configured''.
2009-05-03Pass 0 as base offset, not -1, for child devices which ignore the value.Miod Vallat
2009-05-02Let ioc(4) decide which child devices to attach depending on its identificationMiod Vallat
information, instead of trying to attach whatever is defined in the kernel configuration file.
2009-04-25More IOC3 flavour partnumbers. And apparently there are some flavours whichMiod Vallat
have a shared ethernet/superio interrupt source, so deal with this.
2009-04-25Extend PCI mmio address space by using a bigger window that requires 64-bitMark Kettenis
adressing (no problem since we only support 64-bit mode). ok miod@, jsing@
2009-04-24Fix the superio irq discovery heuristic to work on systems where there isMiod Vallat
an empty slot before the ioc card (such as on Fuel).
2009-04-19Attach the 1-Wire devices early, and pick our partnumber; based on thisMiod Vallat
partnumber, decide what components of the IOC3 really are available, and how many interrupts to register. Based on knowledge found in Linux source code, only tested on full-blown IOC3 devices so far.
2009-04-19Use correct device index for Ethernet interrupt handler.Joel Sing
2009-04-19Fix interrupt mapping for devices behind PCI-PCI bridges.Mark Kettenis
ok miod@
2009-04-19A much more reliable logic to find out the second interrupt of the ioc boards.Miod Vallat
2009-04-18Attach pci busses with pba_bus being zero, and not our bridge unit number,Miod Vallat
these are completely unrelated as long as there is only one pci bus per bridge.
2009-04-18Simplify ethernet interrupt dispatching, since it is not shared with anythingMiod Vallat
else.
2009-04-15Only enable the passthrough interrupt for serial ports, and let com(4) manage.Miod Vallat
Otherwise we get stuck interrupted by the ``tx empty'' condition. Also, on Origin 200 the second interrupt vector has to be computed differently, which adds to the ``I wish I never had looked at this code'' trauma.
2009-04-13The start of Origin 200 support. Based on some code contributed by pefo@Miod Vallat
some years ago for KL enumeration, building on the existing XBow support to limit ourselves to a single node for now. This is a work-in-progress; it currently lacks complete interrupt code, as well as PCI resource management. And there are likely bugs creeping inside.
2009-04-12Interrupt support for IOC3 and its subdevices (currently limited to theMiod Vallat
SuperIO part, the Ethernet part needs a whole driver); kernel now boot single user (or bsd.rd). Joint work with jsing@
2009-03-30bzero pci attach argsMark Kettenis
2009-03-29make various strings ("can't map mem space" and similar) more consistentStuart Henderson
between instances, saving space in the kernel. feedback from many (some incorporated, some left for future work). ok deraadt, kettenis, "why not" miod.
2008-07-30Implement bus_space_{read,write}_raw_mult_[248] correctly, it needsMiod Vallat
endianness conversion on pci bridges. ok deraadt@ jsing@
2008-07-30Proper interrupt values for pci interrupt pins B to D, found in some IRIXMiod Vallat
developer documentation some time ago.
2008-04-07Preliminary IOC3 multi-function chip driver, from jsing@ and I. CurrentlyMiod Vallat
missing a driver for the ethernet part, and interrupt handling is not written yet.
2008-02-20Completely overhault attachment rules on sgi. No more indirect configurationMiod Vallat
inherited from OpenBSD/arc machines with ISA bus; mainbus children match on device name and other hierarchies match on simplified locators. As a bonus, attachment lines in dmesg will now print their locators. ok jsing@
2008-02-16Remove unused fields of struct mips_pci_chipset.Miod Vallat
2007-10-18No need to include <machine/pte.h> here.Miod Vallat
2007-06-21Extent sgi bus_dma to cope with different views of memory: non-contiguousMiod Vallat
for the cpu, contiguous from different bases for devices. This allows memory above 256MB to be used with bus_dma (and we had really been lucky with the first few large-memory builds). Information about memory accesses taken from Linux.
2007-05-20Remove irrelevant code and defines.Miod Vallat
2006-12-14Make pci subsystem aware of domains. Each host bridge gets assigned a uniqueMark Kettenis
domain number such that we can distinguish between busses with the same bus number that are behind different host bridges. Domains can be accessed by using different device nodes. ok deraadt@
2006-03-13* Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set toBrad Smith
NULL for root PCI busses. For busses behind a bridge, it points to a persistent copy of the bridge's pcitag_t. This can be very useful for machine-dependent PCI bus enumeration code. From NetBSD ok grange@ kettenis@