summaryrefslogtreecommitdiffstats
path: root/sys/arch/sgi/hpc/hpc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Go back to the previous approach when managing individual HPC DMA descriptors:miod2015-09-181-22/+42
| | | | | | | | | | | | | | | | | | | provide again an optional storage for a copy of the descriptor in the `sync' (fetch) function, and use the returned address afterwards. On IP22 systems (in the broader sense of the term, thus IP20/IP22/IP24), descriptors will remain in uncached memory and no local copies need to be made. On IP28 systems, descriptors will remain in cached memory (so as to avoid switching to `slow mode'), but a local copy will be performed with the necessary cache eviction work, so that speculative code execution on R10000 will not touch the real descriptor. With this in place, all the explicit descriptor cache operations in if_sq, some of them being redundant or operating on the wrong number of descriptors, can be removed, with the HPC DMA wrappers taking care of doing the right thing. Tested on IP22 and IP28. IP26 still unhappy but no worse than before.
* Give up trying to map DMA descriptor in uncached memory on ECC flavours of themiod2015-09-051-40/+40
| | | | | | | | | | IP22 motherboard (IP26, IP28). Instead, do not ask for a BUS_DMA_COHERENT mapping, but perform explicit cache operations. This removes the need for the memory controller to switch between `fast' and `slow' mode every time a DMA descriptor is updated. Tested on IP22 and IP28.
* Correctly probe for the Ethernet chip on HPC 1.5 expansion boards. Gets rid ofmiod2013-09-281-5/+9
| | | | | false sq positives ("sq not configured" since rejected by the sq driver) in dmesg, for SCSI HPC boards.
* Handle the coprocessor 0 cause and status registers as a 64 bit value now,miod2012-09-291-2/+2
| | | | | as some odd mips designs need moro than 32 bits in there. This causes a lot of mechanical changes everywhere getsr() is used.
* Proide a mips_sync() macro to wrap asm("sync"), and replace gazillions ofmiod2012-09-291-3/+2
| | | | such statements with it.
* Proper support for the so-called `fast mode' of the Indigo2 ECC memorymiod2012-05-271-5/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | controller. In this mode, access to physical memory are not allowed to bypass the cache, and this allows the memory subsystem to run faster. Of course, some device drivers will require uncached memory access (e.g. for proper HPC DMA descriptor operation). New ip22-specific functions to switch between `fast mode' and `slow mode' are introduced. hpc(4) now provides read and write routines to fetch a dma descriptor from uncached memory into a local copy, and update it from said modified copy. On systems without the ECC MC, these will do nothing and operation will continue to access the uncached memory directly. On systems with the ECC MC, they will perform a copy, and the writeback will be done in slow mode. bus_dmamem_map() requests for DMA memory with BUS_DMA_COHERENT set in flags, which would return uncached memory, will now always fail on systems with the ECC memory controller. Drivers which really need uncached memory, and are aware of this particular setup, will now pass BUS_DMA_COHERENT | BUS_DMA_BUS1, which will let the request succeed. sq(4) will use all of the above to work mostly unmodified on ECC MC systems in fast mode. Finally, fast mode is enabled after autoconf. Tested on IP22 and IP28.
* Better probes for sq and wdsc in gio-masqueraded-as-hpc expansion boards.miod2012-05-171-11/+54
| | | | | Previous change was a tad too optimistic. This repairs E++ and GIO SCSI board operation.
* Add ifmedia support to sq(4).miod2012-04-301-5/+4
|
* Pass the base address of the hpc to child devices, to let them be able tomiod2012-04-301-1/+3
| | | | | figure out whether they attach to the onboard hpc or to an expansion slot (or the Challenge S IO+ mezzanine). No functional change (yet)
* Infrastructure to allow an interrupt handler to request its interrupt to bemiod2012-04-171-5/+23
| | | | | temporarily disabled (and then reenabled later). Will be necessary for the next driver commit.
* Overhaul hpc child device attachments:miod2012-04-151-136/+153
| | | | | | | | | | | | | | - break each hpc1/hpc3 child lists into two lists, one for the onboard devices, and one for the expansion devices. - do not try to attach Indy-only devices (pckbc, haltwo) on Challenge S. - do not duplicate entries for expansion devices, only with different interrupt numbers depending on the system, but instead use a single entry with -1 as the interrupt level, and have the attachment glue figure out which interrupt vector applies, depending upon the system. - on expansion hpc1 (or 1.5) boards, do a minimal bus check to decide whether or not the hardware we are attaching is there, since we currently don't know how to tell E++ (sq only) and GIO32 SCSI (wdsc only) boards apart. This hopefully will get rid of misleading `device not configured' messages.
* Provide an hpc_intr_establish() function for hpc subdevices, so they don'tmiod2012-04-151-2/+12
| | | | | need to have knowledge of the underlying interrupt controller. No functional change.
* Tell Indy and Challenge S apart.miod2012-04-151-4/+4
|
* Be more careful when reprogramming the sq(4) DMA and PIO timing parameters;miod2012-04-081-12/+46
| | | | | | | | | | | | | | | | | | | | | the current logic can be traced back to DaveM's intership at SGI in 1996, and are adequate for the hardware he had access to. However, ``recent'' Indigo2 and Indy systems are fit with a faster (33MHz instead of 25MHz) GIO64 bus, which need different timing parameters, and guess what? The PROM knows the right values to set. Since programming these timing registers was apparently only necessary for the Challenge S second interface: 1) only reprogram those registers on an IP24 (Indy, Challenge S) system. 2) pick proper values depending upon the actual GIO64 bus speed. Item #1 fixes Ethernet operation on Indigo2 (at least my teal R4400SC). Item #2 fixes Ethernet operation on my R5000SC Indy. For the record, programming unoptimal value caused `TX DMA underrun' errors (documented as `can't happen' in the HPC3 documentation, oh the irony), which could be reproduced reliably with ypbind(8).
* Add an explicit bus_space_barrier() function for revision 3 hpc, which has amiod2012-04-051-29/+28
| | | | PIO write buffer.
* DMA descriptors only need to be aligned on 8-byte boundaries, and the structmiod2012-04-051-3/+1
| | | | | layout is enough to enforce this. Don't request DMA page boundary alignment when allocating them.
* Default DMA-reachable address constraints to the whole address space, andmiod2012-04-031-1/+4
| | | | | | | | | narrow these in the various ipXX_machdep.c. On IP22-like systems, narrow them to 28 bit physical addresses, but unpessimize this by extending this to 32 bit after autoconf, if no 28-bit limited hpc(4) device has been found. Since physical memory on these systems start at 128MB, this means that Indigo systems with more than 128MB memory will behave correctly (and so will Indy systems with E++ boards and more than 128MB memory).
* Work in progress support for the SGI Indigo, Indigo 2 and Indy systemsmiod2012-03-281-0/+822
(IP20, IP22, IP24) in 64-bit mode, adapated from NetBSD. Currently limited to headless operation, input and video drivers will get ported soon. Should work on all R4000, R4440 and R5000 based systems. L2 cache on R5000SC Indy not supported yet (coming soon), R4600 not supported yet either (coming soon as well). Tested to boot multiuser on: Indigo2 R4000SC, Indy R4000PC, Indy R4000SC, Indy R5000SC, Indigo2 R4400SC. There are still glitches in the Ethernet driver which are being looked at. Expansion support is limited to the GIO E++ board; GIO boards with PCI-GIO bridges not ported yet due to the lack of hardware, and this kind of driver does not port blindly. Most of this work comes from NetBSD, polishing and integration work, as well as putting as many ``R4x00 in 64-bit mode'' erratas as necessary, by yours truly. More work is coming, as well as trying to get some easy way to boot install kernels (as older PROM can only boot ECOFF binaries, which won't do for the kernel).