summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2012-04-18Apparently, the Indigo 2 Impact GIO boards finally provide a real GIO IDMiod Vallat
register.
2012-04-18Put decent prefixes in the symbolic constants for GIO IDs in the generatedMiod Vallat
files, for them to become useful.
2012-04-18One more routine needed to cope for CTS and DCD being inverted on IP20.Miod Vallat
2012-04-18Driver for the GR2 family of frame buffers (Elan, XZ...). Based upon theMiod Vallat
NetBSD driver, with the infinite loops removed, the negative heights fixed, and the explicit delay() calls removed. And support for fonts wider than 8 pixels.
2012-04-18Do not mistake GR2 boards for GIO boards, as what could be a GIO productMiod Vallat
identifier is actually the first word of the boards' shared ram, and might have a legit value. Be sure to probe for the signature register before deciding we have found a GIO board. While there, if we have a glass console attached, don't bother probing it again at autoconf time, since we have already identified it.
2012-04-18Reading the IMC bus arbitration register is not reliable, at least on IP20,Miod Vallat
and can return completely bogus values; writing these values back to the register can have unexpected and hilarious side effects, such as disabling the frame buffer. Workaround this `feature' by reading the register in a loop until we read twice the same value, and the value looks legit; then cache this value in a global variable and handle the register from now on, as a write-only register.
2012-04-17Drivers for the SGI Indigo serial keyboard and mouse (not PS/2 devices).Miod Vallat
From NetBSD.
2012-04-17Don't try to cache the CPU's FS.base, as userland can make it a lie byPhilip Guenthe
setting %fs, resulting in it not getting restored properly later ok mikeb@ deraadt@
2012-04-17Driver for the ``Entry'' LG1 frame buffer found on low-range Indigo systemsMiod Vallat
only. Ported from NetBSD, not tested due to lack of hardware, hopefully it will be working as intended (fingers crossed)
2012-04-17panel@hpc: driver for the power button on IP22/IP24, and the volume buttonsMiod Vallat
where applicable (i.e. Indy only).
2012-04-17Infrastructure to allow an interrupt handler to request its interrupt to beMiod Vallat
temporarily disabled (and then reenabled later). Will be necessary for the next driver commit.
2012-04-17Add sgi_cpuspeed() setting HW_CPUSPEED sysctl node. Tested on SGI Fuel.Landry Breuil
ok miod@
2012-04-16Drivers for the Indy and Indigo 2 PS/2 keyboard ports, and the ``Newport''Miod Vallat
(NG1, XL, XGE) frame buffer. Adapted from NetBSD; newport extended to support underline and fonts wider than 8 pixels, such as the default 12x22 Gallant font. Framebuffer depth computation seems to be wrong on Indy models, to be investigated later (but doesn't prevent text console from working).
2012-04-16Improve the way frame buffers are probed to reduce (and hopefully avoid)Miod Vallat
false positives. Do not look for framebuffers past GIO EXP1, there shouldn't be anything there. Add the console code machinery to attach a glass console on IP22, when the appropriate drivers will exist. On multihead systems, get console framebuffer address (well, sort of) from a completely undocumented interface (knowledge taken from Linux, confirmed to work on a dual-head Indigo 2 here). While there, get frame buffer names from ARCBios whenever possible, to be used in dmesg eventually.
2012-04-16Move proc0 and trap handler setup before consinit(), but still wait for theMiod Vallat
initial setup to be complete before switching to our trap handlers. However, change guarded_{read,write}_* to clear BEV in the coprocessor 0 status register, and restore it afterwards, to use our fault handlers within these functions. This makes these functions usable from consinit().
2012-04-16Move OpenGL {logic,raster}ops defines to a separate file, to avoid duplicatingMiod Vallat
these among frame buffer drivers. No functional change.
2012-04-16Fix struct arc_param_blk_* layout to not embed pointers, as this messes theMiod Vallat
layout in 64-bit mode. Found the hard way, of course.
2012-04-15Overhaul hpc child device attachments:Miod Vallat
- 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.
2012-04-15Define symbolic constants for the interrupt controller pin assignments onMiod Vallat
IP20, IP22 and IP24, and provide the necessary macros to compute interrupt vectors numbers (from the int.c point of view) from given sources.
2012-04-15Declare most imc bus_space(9) methods in a visible header; this will be usedMiod Vallat
to make the hpc3 bus_space_tag (similar to the imc one except for the bus_space_barrier method) a global, compile-time known, object; which will in turn help getting glass console to work (pckbc will depend on this).
2012-04-15Provide an hpc_intr_establish() function for hpc subdevices, so they don'tMiod Vallat
need to have knowledge of the underlying interrupt controller. No functional change.
2012-04-15If the dma-usable area changes after autoconf, recompute the buffer count andMiod Vallat
invoke bufadjust() accordingly. Similar to what sysctl kern.bufcachepercent does.
2012-04-15Tell Indy and Challenge S apart.Miod Vallat
2012-04-15Add option EISAVERBOSE to IP22 kernelsMiod Vallat
2012-04-14User area hasn't been double-mapped in a long timePhilip Guenthe
2012-04-13Avoid horrible namespace pollution of <machine/signal.h> pulling inMiod Vallat
<machine/reg.h> for the needs of struct sigcontext; said struct ought to only use simple integer types. Fixes build of groff on landisk. ok pirofti@ (who had a similar diff)
2012-04-11The first ktrace record for a newly spawned thread is a returnMike Belopuhov
from a fork syscall done by the parent. Use __tfork, not rfork here to match the ktrace records for the parent (CALL __tfork, RET __tfork). ok guenther
2012-04-10Count traps and fpu context switches.Miod Vallat
2012-04-10Make the KERN_NPROCS and KERN_MAXPROC sysctl()s and the RLIMIT_NPROC rlimitPhilip Guenthe
count processes instead of threads. New sysctl()s KERN_NTHREADS and KERN_MAXTHREAD count and limit threads. The nprocs and maxproc kernel variables are replaced by nprocess, maxprocess, nthreads, and maxthread. ok tedu@ mikeb@
2012-04-09No need to round VCEI addresses, and VCED addresses only need to be roundedMiod Vallat
to a word boundary.
2012-04-09Attach eisa devices after all the onboard devices have attached rather thanMiod Vallat
before them.
2012-04-09More errata bandaid for the R4000SC is necessary in the tlb handlers.Miod Vallat
2012-04-08Enable option CPU_R4600, verified to work on an R4600PC Indy. The secondaryMiod Vallat
cache is still not supported yet (needs extra code being worked on, as does the R5000SC Indy).
2012-04-08Be more careful when reprogramming the sq(4) DMA and PIO timing parameters;Miod Vallat
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).
2012-04-06Make the logic for PMAP_PREFER() and the logic, inside pmap, to do theMiod Vallat
necessary cache coherency work wrt similar virtual indexes of different physical pages, depending upon two distinct global variables, instead of a shared one. R4000/R4400 VCE requires a 32KB mask for PMAP_PREFER, which is otherwise not necessary for pmap coherency (especially since, on these processors, only L1 uses virtual indexes, and the L1 size is not greater than the page size, as we are using 16KB pages).
2012-04-06Rework IP22 RTC year base computation, again. It turns out that differentMiod Vallat
Indy PROM versions use different year bases - after all, using 1970 instead of the previously used value of 1940 smelled like a bug, and probably was, so this eventually got fixed in later PROM versions. Instead of hardcoding a year base depending upon the system, we will now ask ARCBios for its current year, and compare it to what can be read from the RTC registers to figure out what year base is in use by the PROM.
2012-04-06Get serial console speed from ARCBios earlier; repairs serial console on OctaneMiod Vallat
and O2 (other systems unaffected).
2012-04-06tedu the raidframe.Joel Sing
ok deraadt@
2012-04-05In the neverending tradition of never making things simple, SGI used 1940 asMiod Vallat
the timebase on Indigo 2, but 1970 on Indy (verified with the `date' command at the PROM prompt and checking what values ended up in the DS1286). Indy will no longer be 30 years in the future from an IRIX point of view.
2012-04-05Bail out of bus_dmamap_sync() earlier in the non-PREWRITE cases on TGT_COHERENTMiod Vallat
kernels. No need to walk the whole dma map doing nothing. No functional change.
2012-04-05Lower ZS_DELAY() back to what it was, but issue a bus_space_barrier() afterMiod Vallat
every register write. Hinted by IRIX' <sys/z8530.h>. While there, flip the CTS, DCD, RTS and DTR bits in registers #0 and #5. Aforementioned header says they are inverted due to a hardware bug. Tested on IP20, IP22 and IP24.
2012-04-05Add an explicit bus_space_barrier() function for revision 3 hpc, which has aMiod Vallat
PIO write buffer.
2012-04-05DMA descriptors only need to be aligned on 8-byte boundaries, and the structMiod Vallat
layout is enough to enforce this. Don't request DMA page boundary alignment when allocating them.
2012-04-04Make sure that identifycpu() is run only once; fixes occasionalMike Belopuhov
hangs on resume. Discussed with and ok kettenis, haesbaert
2012-04-03Uncomment eisa0 attachment. People can then complain about their boards notMiod Vallat
being configured and we'll see which boards need care. (Only ep(4) is known to work so far, but I am waiting for review and approval of the changes required to make it work on sgi). Anyone with a working ahb(4) EISA board to spare?
2012-04-03Default DMA-reachable address constraints to the whole address space, andMiod Vallat
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).
2012-04-02EISA bus attachment glue for Indigo 2 systems. Currently only tested withMiod Vallat
PIO-only devices such as ep(4), with horrible performance on 3C579-TP.
2012-04-01Fix merge botch when porting this from NetBSD; we don't need to disable theMiod Vallat
TX interrupts since the TX interrupt handler now correctly acknowledges it.
2012-04-01Increase delay between chip register accesses. Fixes the console freeze duringMiod Vallat
install seen on IP22 and IP24.
2012-03-31softintr_establish() takes IPL_xxx, not SI_xxx (harmless here since they turnedMiod Vallat
out to be the same value).