summaryrefslogtreecommitdiffstats
path: root/sys/arch/sgi/pci (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove the unused interrupt type (edge/level) from the mace interruptvisa2018-12-031-3/+3
| | | | | | | | handler registration. The code is inherited from isa(4), but on the O2, although some interrupt sources on CRIME are edge-triggered, all the MACE interrupts are level-triggered. From miod@
* The device_to_pa routine really isn't needed. We always have physicalvisa2017-05-111-16/+3
| | | | | | | addresses. While there, pave the way for BUS_DMA_64BIT (not working yet). Diff from miod@; OK dlg@
* Initial support for MSI-X. Only supported on amd64 for now. I have diffs tokettenis2016-05-041-1/+2
| | | | | | | | | | actually use this in em(4) and xhci(4), but I'm not committing those yet because we almost certainly need to save and restore the MSI-X registers during suspend/resume. However, this allows mpi@ to play with multiple-vector support in networking hardware. Requested by mpi@ ok mlarkin@, mikeb@
* Take the PHY of iec(4) out of reset before attaching the interface.visa2016-01-022-3/+17
| | | | | | | | | | | | Otherwise the PHY goes undetected on the slave node of a dual-node Origin 200. The PHY gets enabled by diagnostic checks but only on the master node. As the attach code will now do the enabling, the checks can be disabled on reboot, making reboots faster especially on IP27. Tested on Origin 200 (IP27), Fuel (IP35 with iec), and Origin 350 (IP35 without iec). Diff from miod@, ok krw@
* Format string fixes and removal of -Wno-format for sgi. Based upon anmiod2014-05-193-9/+7
| | | | initial diff from jasper@
* Moar <uvm/uvm.h> -> <uvm/uvm_extern.h> love.mpi2014-04-031-2/+1
|
* Fix IOC4DEV_xxx numbers, so that devices besides the first two serial portsmiod2013-12-301-7/+7
| | | | actually handle their own interrupts. How could this get unnoticed so far?
* Add a stub for the new MD hook needed to handle ACPI Power Resources.mpi2013-11-051-1/+2
| | | | ok kettenis@
* Proide a mips_sync() macro to wrap asm("sync"), and replace gazillions ofmiod2012-09-291-2/+2
| | | | such statements with it.
* Implement pci_min_powerstate().kettenis2012-08-291-1/+3
|
* Correctly compute the IOC3 device mask on MENET boards.miod2012-05-301-2/+2
|
* No longer allow bus_space_barrier() to be a NULL pointer on a givenmiod2012-03-151-5/+12
| | | | | bus_space_tag on sgi, but rather always provide at least a dummy asm("sync") flavour. Saves a function pointer test at runtime.
* Extend pci_probe_device_hook() on sgi xbridge(4) to return either the straightmiod2011-10-103-80/+29
| | | | | | | | | | | accessors or the byte-swapped accessors, depending upon the byteswap setting of the device we are trying to attach. This allows for the removal of byteswap knowledge from ioc(4) and iof(4) drivers. While there, build pci_chipset_t md structs by bcopy'ing a template and filling the few runtime fields, instead of assigning every field of them.
* Introduce pci_probe_device_hook(pci_chipset_tag_t, struct pci_attach_args *).miod2011-10-102-8/+27
| | | | | | | | | | | | | | | | | | This mandatory function will get invoked in pci_probe_device(), and allows a pci host driver to alter the pci_attach_args passed to a device when attaching. This function will also, if returning non-zero, cause the device to be skipped completely during all the phases of the PCI device discovery (i.e. ressource enumeration, ressource assignment, and actual attachment). This particular feature is experimental and might be reverted in the future (or the scope narrowed to device attachment only). A dummy #define pci_probe_device_hook() 0 is added to all platforms except sgi, where real functions (currently only returning 0) are added; real meat will be added shortly. Discussed at s2k11, no objection from the usual suspects.
* Add pci_intr_map_msi() stub.kettenis2011-05-211-1/+2
|
* Introduce a new pci routine, pci_conf_size(), which returns the size of amiod2010-12-042-2/+13
| | | | | | | given pcitag_t configuration address space. Currently, all pci controllers will return the usual 0x100 bytes of PCI configuration space, but this will eventually change on PCIe-capable controlers. ok kettenis@
* remove unused offset argument to rbus functionsjsg2010-09-221-3/+3
| | | | ok krw@ kettenis@
* Get rid of evcount's support for arranging counters in a treematthew2010-09-202-4/+4
| | | | | | | hierarchy. Everything attached to a single root node anyway, so at best we had a bush. "i think it is good" deraadt@
* Implement bus_space_barrier() on sgi; on xbridge, this will also flushmiod2010-08-231-3/+5
| | | | the pci write buffers.
* Add support for mapping ACPI to PCI devicesjordan2010-06-291-1/+3
| | | | ok kettenis, deraadt
* Proper support for IP35 C-Brick types (i.e. Origin 3000): do not attachmiod2010-05-091-8/+33
| | | | | | | a (missing) second serial port to ioc(4), read spdmem(4) records from the right index, and query the Ethernet address from the I-Brick eeprom instead of the C-Brick eeprom. Tested by Sebastian Reitenbach, thanks!
* Obtain struct sgi_device_location for the console input and output devices,miod2010-04-066-50/+51
| | | | | and compare against them when attaching potential console drivers, to figure out whether they indeed are acting are console devices or not.
* Add code to tell Origin 200 and Origin 2000 / Onyx 2 apart.miod2010-03-201-26/+89
| | | | | | Use this to correctly handle the onboard IOC3 chip configuration on O2k (two IOC3 chips to be able to provide four serial ports, and the other subdevices are split accross the two IOC3 chips).
* Allow iockbc(4) and odysseey(4) to act as console devices and attach early;miod2010-03-074-4/+22
| | | | | | this gives us working glass console on Fuel, as well as on Octane systems with Odyssey graphics. Joint work with jsing@
* Add an MD interface for PCI drivers to be able to retrieve the node and widgetmiod2010-03-072-2/+24
| | | | | number the PCI bus they are on is connected to. Will be used shortly to help the console device selection logic.
* Add glue to attach iockbc(4) to iof(4) as well. Tested by deraadt@miod2009-11-182-32/+10
|
* Let ioc(4) pass the information whether it is an onboard device or not, to itsmiod2009-11-112-17/+25
| | | | | subdevices; use this on iockbc to only perform the fuel workaround on the onboard ioc.
* Perform a bit more kbc initialization, instead of relying upon the prom tomiod2009-11-111-1/+13
| | | | | | do this for us; PS/2 ports on CADduo boards attach keyboard and mouse now. ok jsing@
* It turns out PCI IOC3 card which embed both the Ethernet controller and themiod2009-11-111-127/+97
| | | | | | | | | | | | | | | superio chip interrupt on two different pins (yet do not advertize themselves as a multi-function device, of course). So, on one hand, this makes the ioc attachment code simpler, because it simply needs to map interrupt pins A and B, and another hand, this moves all the interrupt knowledge to the PCI bridge driver, since routing of pin B differs whether the device is the onboard IOC3 chip (and able to use any of the 8 bridge interrupt sources...) or on a PCI board (with pin mapping sane, since controlled by the bridge). This makes superio interrupts on CADduo boards work. Tested to cause no regressions on Origin 200, Octane and Fuel.
* Add iockbc(4), a driver for the PS/2 keyboard and mouse interface found onjsing2009-11-101-1/+26
| | | | | | ioc(4) devices. Joint work with miod@. Committed from the glass console on an SGI Fuel.
* Only invoke the L1 code if IP35.miod2009-11-091-3/+4
|
* Add code to send L1 commands and parse command results; use it to add a waymiod2009-11-081-20/+30
| | | | | for IP35 systems with IOC3 onboard Ethernet to get their Ethernet address since it's no longer stored as an owmac(4) device on the IOC3 device itself.
* Figure out the size of the SSRAM used as internal memory by the chip onmiod2009-11-081-1/+12
| | | | attach, print it, and decide how many RX descriptors to use accordingly.
* Do not risk touching nonexisting registers on MENET boards; untested due tomiod2009-11-081-9/+25
| | | | lack of such hardware.
* In case an ioc(4) device has lost its NIC component, do not recognize itmiod2009-11-071-4/+30
| | | | | | | as the onboard ioc device, if one has already been found on this node. Also, on Origin 300, do not attempt to attach the PS/2 controller on the onboard ioc(4) since PS/2 ports are not wired.
* Change sgi system identification from a single system type list, to a smallermiod2009-11-071-4/+4
| | | | | | system type list (which really is the system family) and a subsystem type. No functional change yet.
* A few cleanups and also reflect duplex state in mcr in addition to tcsr.miod2009-11-031-1/+6
|
* When the iec(4) Ethernet address is unkown, pass ff:ff:ff:ff:ff:ff instead ofmiod2009-11-021-2/+2
| | | | | 00:00:00:00:00:00, in order to trigger the code which will assign a `feel bad' random address.
* Driver for the sgi IOC3 onboard Ethernet interface. Tested on Octane only somiod2009-11-012-27/+116
| | | | | | | far, and needs help to figure out its Ethernet address on IP35 systems. Heavily derived from mec(4) written by Izumi Tsutsui and Christopher Sekiya, although it required many changes to fit the IOC3 chip.
* Add support for the Octane power button to power(4). Took me a while tomiod2009-10-261-14/+36
| | | | | figure out how the interrupt was routed from xbridge to xheart... (it bypasses the regular `have xbridge send a xio interrupt packet' mechanism)
* Better crime/mace interrupt handling; interrupt information is no longermiod2009-10-261-20/+17
| | | | | | | | specified in the kernel configuration file, but is provided by macebus(4) as part of the child device attachment args, and provide both crime and mace interrupt bitmasks; this allows us to only really enable interrupt sources we care about, and to avoid invoking interrupt handler we don't need to for the few mace interrupts multiplexed at the crime level.
* Implement bus_space_vaddr() for macepcibr.miod2009-10-221-1/+10
|
* Make macebus_intr_disestablish() signature sane, and update its caller.miod2009-10-221-3/+3
| | | | Still unimplemented for now.
* On IP30 and IP35 systems, try harder to figure out exactly what model we aremiod2009-10-141-6/+39
| | | | | running on, and report this both as the hw.product sysctl and in dmesg. Fuel and Origin 350 are no longer reported as being Origin 300 systems!
* Make iof(4) pass its bus speed to children, this in turn allows com(4) tomiod2009-10-133-3/+12
| | | | pick the right clock if the PCI bus the I/O board is on degrades to 33MHz.
* Attach DS1742 style dsrtc to iof (IOC4) too.miod2009-10-072-4/+15
|
* Missing semicolon in dmesgmiod2009-10-071-5/+7
|
* Constify the what/name parameter of pci_intr_establish().mk2009-08-222-5/+5
| | | | | | | | | Tested by myself, sthen, oga, kettenis, and jasper. Input from sthen and jasper. ok kettenis (Manpage follows shortly.)
* Blind partial support for IOC4 chip, found on IO8 and IO9 base I/O boards onmiod2009-08-183-0/+433
| | | | | | 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.
* Replace a few hardcoded numbers from the interrupt register with propermiod2009-08-182-30/+36
| | | | commented symbolic constants.