summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2012-04-26va is of type vaddr_t; allow sparc64 to build with DEBUGOkan Demirmen
ok miod@
2012-04-26Cleanup unp_bind() a little:Matthew Dempsky
- Require sun_family to be set to AF_UNIX (also in unp_connect()) - Ensure internal sockaddr_un's always have their length set to sizeof(struct sockaddr_un) regardless of the user specified length, implicitly extending with NUL characters as necessary. - Normalize sun_path to never contain a non-NUL character after a NUL character. Lack of NUL termination on truncated sockaddrs issue pointed out by Michael Kerrisk on the Austin Group mailing list. ok millert
2012-04-26Add strnlen() to libkern.Matthew Dempsky
ok deraadt
2012-04-25Skip cache flushes in pmap_zero_page() and pmap_copy_page() on systemsMiod Vallat
without virtual aliasing, or for pages which are not currently mapped cached. 1+% speed increase on sgi IP27 and loongson kernels. Tested on LS2F, R4400, R5000, R12000 and R16000.
2012-04-25Use explicit_bzero() for clearing key material.Matthew Dempsky
Pointed out by Michael W. Bombardieri on tech@. ok deraadt
2012-04-24Minor tweaks:Miod Vallat
- correctly gather version information. When reading device registers is a two step process (write address, read data), it is a very bad idea to call a wrapper around these two operations (to read register B) between the two operations inline (to read register A). Unless you want to know the version information for your garbage latches, that is. Now Indy 8-bit devices no longer get reported as 24-bit devices, and Indy 24-bit devices no longer get reported as 8-bit devices. (not that it mattered much anyway) - define and use symbolic constants when parsing the video mode settings to figure out the display resolution. This code still itches, but much less now.
2012-04-24Pour even more smarts into the GIO device identification code, to the pointMiod Vallat
that it can now tell ID-less framebuffers apart correctly. Therefore, we can use direct configuration instead of ugly games. Frame buffer drivers match routines now only need to check for the fake ID they receive. Tested on various newport and grtwo setups (including multihead configurations)
2012-04-24Harvest some low-hanging fruit in thu R5k/RM7k cache routines:Miod Vallat
- replace masking with large `power of two minus one' constants with a pair of shifts, this is shorter code and does not require the at register. - merge R5000 and RM52xx setup, as the configuration register layout is the same on both processors. - In Mips5k_IOSyncDCache(), delay building the call frame until we know we will not perform a leaf call. Replace leaf calls with jumps to the appropriate routines. Tested on R5000, RM5271 and RM7000.
2012-04-24Add support for wired mappings, using the last unused bit in the PTE.Miod Vallat
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.