summaryrefslogtreecommitdiff
path: root/sys/arch/m88k
AgeCommit message (Collapse)Author
2013-05-17Unnecessary includeMiod Vallat
2013-05-17Extend cmmu routines to return the caching mode to use for page tables.Miod Vallat
Alter the 88200-specific code to enforce cache-inhibited page tables for extremely old 88200 versions, and to disable write-back caching on systems where xmem instructions do not behave correctly when applied to write-back cached addresses. No change introduced on 88110 systems, as well as most 88100 systems; the affected systems are 88100 systems with 88100 revision < 10 and/or 88200 revision < 7; that is, only early MVME181 and MVME188 (not 188A) systems.
2013-05-17Fix comments telling that the `serial mode' bit in PSR only applies to 88110,Miod Vallat
it also exists on 88100. While there, do not allow userland to set it.
2013-05-15Initialize a teeny few more globals to reasonable values to allow for printf()Miod Vallat
to work as soon as cn_tab is initialized. Allows us to correctly printf or panic early on unrecognized systems. This used to be the case but got lost a long time ago.
2013-05-14Declare the cmmu-related variables which are set early in the kernel life,Miod Vallat
before pmap_bootstrap(), as located in .rodata. This will get them write-protected after pmap has initialized, for free.
2013-04-20Prefer the processor-specific _DYNAMIC[] tags value to find out the boundariesMiod Vallat
of the .plt whenever possible, and fallback to the old behaviour of searching for special symbols pointing to its boundaries. No functional change.
2013-04-12Double-register load and store instructions using an odd-numbered register asMiod Vallat
the low part trigger an `illegal instruction' trap on the 88110 (and I can't see this documented anywhere in the manual). Of course there is code "in the wild" which uses such constructs (libgmp is one such example). Extend double_reg_fixup() to take the trap type as an extra argument, and explicitely allow ld.d or st.d instructions with odd-numbered registers at aligned addresses if we are invoked from the `illegal instruction' trap handler, to give this code a chance to run on 88110.
2013-04-01Unbreak 1.16Miod Vallat
2013-03-28Add STRONG_ALIAS macros to be used from assembly code in libc andMartynas Venckus
libm. While at it, remove now unused workarounds for lint. Agreed by kettenis@, guenther@, matthew@.
2013-03-28Add __strong_alias macros for all architectures to be able to aliasMartynas Venckus
another symbol without weak attribute. To be used in libc and libm soon. Agreed by kettenis@, guenther@, matthew@.
2013-03-26PGSHIFT and PGOFSET are now contained inside the kernel namespace.Theo de Raadt
2013-03-25ALIGNBYTES/ALIGN/ALIGNED_POINTER can move to the MI file.Theo de Raadt
2013-03-23refactor sys/param.h and machine/param.h. A lot of #ifdef _KERNEL is addedTheo de Raadt
to keep definitions our of user space. The MD files now follow a consistant order -- all namespace intrusion is at the tail can be cleaned up independently. locore, bootblocks, and libkvm still see enough visibility to build. Checked on 90% of platforms...
2013-03-12Fix kernel profiling on MP systems by using per-CPU buffers and teachMartin Pieuchot
kgmon(8) to deal with them, this time without public header changes. Previously various CPUs were iterating over the same global buffer at the same time to modify it and never ended. This diff includes some ideas submited by Thor Simon to NetBSD via miod@. ok deraadt@, mikeb@, haesbaert@
2013-02-20Increase maximum text and data size limits, and double the default data sizeMiod Vallat
limit. This allows c++ memory hogs, such as pcre's pcrecpp_unittest.cc, to compile on m88k.
2013-02-19Introduce a new cmmu method to return the preferred cache mode bits for theMiod Vallat
kernel APR. Return write-back for every design but those involving 88410, where write through is returned. Apparently the use of writeback on single-processor kernels using 88410 (197SP, 197DP) has only been working by fat chance, and the last two years of uvm changes, as well as the switch to ELF (causing kernel rodata to move `up') exposes silent memory corruption on (88410-size) aliased addresses. (I am guilty of not using my 197DP board much after making 197LE write-back capable, as 197LE turned out to be faster and more stable, for I would have noticed this earlier). Further thought needs to happen about this. It might be possible to switch to writeback by default again as long as bus_dma maps things write-through on 88410 designs, and perhaps with a part of the kernel mapped with a write-through BATC, since BATC have precedence upon page tables. Right now I'm trying to get a stable release out of the door.
2013-02-17Constify struct cmmu.Miod Vallat
2013-02-17Missing end-of-commentMiod Vallat
2013-02-14A really working version of MCOUNT.Miod Vallat
2013-02-14Be sure to writeback D$ in addition to invalidate I$ in pmap_proc_iflush(),Miod Vallat
or I$ may reload with stale data. It used to work without this because the kernel used to run in write-through mode. Repairs gdb single-stepping.
2013-02-12Back out per-CPU kernel profiling, it shouldn't modify a public headerMartin Pieuchot
at this moment.
2013-02-11Fix kernel profiling on MP systems by using per-CPU buffer. PreviouslyMartin Pieuchot
various CPUs were iterating over the same global buffer at the same time to modify it and never ended. This diff includes some ideas submited by Thor Simon to NetBSD via miod@. ok mikeb@, haesbaert@
2013-02-09No longer define the a.out relocation format struct.Miod Vallat
2013-01-26Make sure new processes get a clean FPU configuration upon startup, byMiod Vallat
resetting the appropriate register in setregs(). Similar in spirit to what m68k does (restoring a null frame), and necessary since m88k doesn't do lazy fpu switching.
2013-01-16cpu_coredump() also needs to invoke vn_rdwr() without IO_NODELOCKED; onlyMiod Vallat
affects a.out binaries' core dumps.
2013-01-11Do not use `#' to introduce comments anymore, as(1) will no longer supportMiod Vallat
this RSN.
2013-01-11Make ENTRY() generate a .type @function declaration as well if __ELF__.Miod Vallat
Add an END() macro, to be used to match ENTRY(), which produces a .size directive.
2013-01-07Correctly signal SIGSEGV, instead of SIGBUS, for faults caused by access toMiod Vallat
pages mapped without read (or write) permissions. The existing logic would incorrectly match uvm_fault() returning EACCES with the CMMU fault logic reporting a bus error (which will still cause SIGBUS to be sent).
2013-01-05Switch m88k ports to ELF.Miod Vallat
2013-01-01Crank NMBCLUSTERS to 4096 to match other 32-bit platforms.Miod Vallat
2013-01-01Add a "memory" clobber to the flush_pipeline() assembly construct, to make sureMiod Vallat
the compiler won't try to outsmart me.
2012-12-31Remove emulation errno mapping code from platforms that no longer havePhilip Guenther
non-native emulations. ok miod@
2012-12-30Prevent a branch-with-delay-slot instruction to be the delay slot of a previousMiod Vallat
branch-with-delay-slot instruction, in the 88100 exception code path, in kernels configured without DDB. This is undefined behaviour, but we have apparently be lucky enough since RAMDISK is known to work on 88100.
2012-12-04Remove the gcc 2 m88k varargs logic. You gave me a lot of trouble and no pony,Miod Vallat
therefore I don't mind you rotting in the Attic for eternity (scheduled to start on the 21st anyway, according to MayaBSD developers). reminded by deraadt@
2012-12-02Determine whether we're currently on the alternative signal stackPhilip Guenthe
dynamically, by comparing the stack pointer against the altstack base and size, so that you get the correct answer if you longjmp out of the signal handler, as tested by regress/sys/kern/stackjmp/. Also, fix alt stack handling on vax, where it was completely broken. Testing and corrections by miod@, krw@, tobiasu@, pirofti@
2012-09-15Adapt ieee.h, gdtoa and libc to the fact that we don't have 80-bitMartynas Venckus
floats on m88k. Agreed by miod@.
2012-09-15m88k does not have the m68k long double type actually (long double == doubleMiod Vallat
on this platform), so don't pretend it does, and don't build long double libm routines.
2012-08-22sigpid should be of type pid_t (only visable with DEBUG).Okan Demirmen
ok miod@ (who found others to fix as well)
2012-08-07<sys/ktrace.h> is now pulled in via <sys/syscall_mi.h>, so drop it from herePhilip Guenthe
2012-08-07Move the common bits of syscall invocation and return handling intoPhilip Guenthe
an MI file, <sys/syscall_mi.h>, correcting inconsistencies and the handling when copyin() of arguments fails. Tested on i386, amd64, sparc64, and alpha (thanks naddy@) Any issues with other platforms will be fixed in tree. header name from millert@; ok miod@
2012-06-26create new machine/_float.h which is namespace clean. create a newTheo de Raadt
MI float.h which pulls in and defines the values that are needed from there, and repair sys/limits.h so that it defines the values it needs as well (depending on POSIX version, XPG version, etc). guenther has a more exact selection of that coming for limits.h. this also fixes a few mistakes for the vax. reviewed by kettenis and guenther.
2012-05-09Do not include <machine/reg.h> and pollute userland namespace with struct regMiod Vallat
in <machine/signal.h>.
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-03-23Make rusage totals, itimers, and profile settings per-process insteadPhilip Guenthe
of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it. ok kettenis@
2011-11-16Make userret() MI. On architectures which jammed stuff into it in theTheo de Raadt
past, pull that code out seperately. ok guenther miod
2011-11-15label_t is the kernel setjmp buffer. It should simply be an array ofTheo de Raadt
the right type, noone will ever fiddle with the internals. discussed with jsing
2011-10-27Specify the TLS variant for each platform.Philip Guenthe
2011-10-25Replace the naive 88110 tlb update code, which would always invalidate theMiod Vallat
whole tlb (32 of 'em), with smarter `tlb probe and update with new pte if tlb match found' code. This makes the 88110-specific pmap_update() unnecessary, as updates are no longer aggregated to avoid the number of flushes. This also makes tlb handling similar between 88100 and 88110, from the pmap's point of view, so there is no need to use different routines. No impact on 88100, no user-noticeable performance change on 88100 GENERIC, slight improvement on 88110 GENERIC.MP.
2011-10-09Let BUS_DMA_COHERENT allocations return cache-inhibited pages.Miod Vallat
2011-10-09Finally fix the kernel mode apr to remove the forced write-through cacheMiod Vallat
control, and enjoy the joys of write back (16% performance improvement for non-cpu bound workloads). While there, there is no need to map the page tables cache inhibited on 88100 systems; they only need to be write-through, and snooping will do the rest. Kernel WB is still disabled on 88110 SMP kernels, until the last MP bootstrap bug is understood and fixed.