summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2012-04-24Introduce a #define for the number of PFN bits in a pte, to be used in theMiod Vallat
.S code when masking the upper bits, instead of hardcoding them. Makes code easier to understand (and also I might have a need to reduce PFN width on some particular CPU models in the future). No change in generated code.
2012-04-24In sosend() for AF_UNIX control message sending, correctly calculateTheo de Raadt
the size (internalized ones can be larger on some architectures) for fitting into the socket. Avoid getting confused by sb_hiwat as well. This fixes a variety of issues where sendmsg() would fail to deliver a fd set or fail to wait; even leading to file leakage. Worked on this with claudio for about a week...
2012-04-23When handling SIGFPE, do the `advance pc if exception is a fault (as opposedMiod Vallat
to a trap)' dance before invoking trapsignal(), which will mess with the pc too. My bug initially, can't believe I never noticed; fixed first in NetBSD. This makes libsqlite3 build.
2012-04-23Don't leak mbufs when bind() on a PF_UNIX socket fails.Matthew Dempsky
ok deraadt, miod, guenther
2012-04-22Test vendor against cpu_vendor instead of calling CPUID, this matchesChristiano F. Haesbaert
the other uses. ok mikeb@
2012-04-22Remove redundant returns from functions returning void. Wrap returnYASUOKA Masahiko
values in () for consistency. diff from Michael W. Bombardieri. ok sthen dlg mikeb
2012-04-22VT6410 and VT6415 controllers do not implement the `channel enable' register,Miod Vallat
so don't incorrectly assume both channels are disabled on these controllers. ok jsg@
2012-04-22Add struct proc * argument to FRELE() and FILE_SET_MATURE() inPhilip Guenthe
anticipation of further changes to closef(). No binary change. ok krw@ miod@ deraadt@
2012-04-22Reset t_column to 0 when initializing a tty.Matthew Dempsky
ok deraadt@
2012-04-21Fix math in previous. Oops.Miod Vallat
2012-04-21Round the reserved memory size up when printing it in MB unitsMiod Vallat
2012-04-21Remove long dead prototypes.Miod Vallat
2012-04-21Correct a wrong comment.Miod Vallat
2012-04-21Rework the signature of the cache handling routines again. It makes more senseMiod Vallat
to pass both the virtual and physical addresses of the page to clean to SyncDCachePage, which is the only routine using `Index' operations on the data cache, which might be virtually indexed at some levels but physically indexed at others. On the other hand, it does not make any sense to pass a physical address to routines using `Hit' operations (and they were discarding them anyway). In addition to making things cleaner, this fixes sporadic userland misbehaviour (read: SIGSGEV) on RM7000 O2 systems.
2012-04-19shrinkTheo de Raadt
2012-04-19Slightly tweak the emulation mode colormap to have fit in 4:8:4 instead ofMiod Vallat
8:8:8, and use the fast putchar code unconditionally: it turns out it expects the background color as 4:8:4. This fixes the `character background is too green and too light' effect that caused this code path to only be used for black background, and the slower code for the rest.
2012-04-19Print the currently active ASID in `machine tlb' ddb command.Miod Vallat
2012-04-19Be sure to update the currently active ASID in pmap_activate() if invoked onMiod Vallat
behalf of curproc.
2012-04-19missing ;Theo de Raadt
2012-04-19Backout misplaced optimization in vmmap.Ariane van der Steldt
(That means the misplaced optimization is back in.) It broke mips and possibly other architectures.
2012-04-18Split the existing impact@xbow attachment into generic impact routines, andMiod Vallat
bus-specific attachment; impactreg.h and impactvar.h move from sgi/xbow/ to sgi/dev/. Teach the generic impact code how to code with pre-ImpactSR boards, which have a slightly different register layout (information obtained from Peter Fuerst's Linux IP28 patches). Add an impact@gio attachment (unfortunately untested, no Impact GIO boards here). All Indigo 2 graphics options should be supported now (assuming the Extreme/Ultra will actually work with grtwo(4) out of the box). Tested not to disturb operation on IP30. ** ATTENTION! If you are building IP27 or IP30 kernels, be sure to rm impact.d ** before building a new kernel.
2012-04-18Don't attach a wsdisplay if not the console device, for part of the deviceMiod Vallat
is disabled, and nothing shows up on the monitor in this case. To be investigated later.
2012-04-18regenMiod Vallat
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-17Make it optional for kvm_getprocs() (and related sysctl) to returnPaul Irofti
thread information. Add a KERN_PROC_SHOW_THREADS flag that has to be set in order to get the thread info and make it off by default. This creates backwards compatibility for applications that relied on a given size/number of items to be returned. Modify ps(1) and top(1) accordingly. Okay guenther@.
2012-04-17Drivers for the SGI Indigo serial keyboard and mouse (not PS/2 devices).Miod Vallat
From NetBSD.
2012-04-17uvmspace_exec: Remove disfunctional "optimization".Ariane van der Steldt
The optimization goes through great lengths to use less optimized code paths in place of the simple path, where the latter is actually faster. ok tedu, guenther
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-17Add type numbers for upcoming sgi work, forgotten during newport(4) import.Miod Vallat
2012-04-17Output interrupts are raised when the uart is ready for output, whichAlexandre Ratchov
obviously can occur after the transfer complete. In this case, don't print a warning (if MIDI_DEBUG defined) and don't attempt to stop the transfer twice.
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