summaryrefslogtreecommitdiff
path: root/sys/arch/m88k
AgeCommit message (Collapse)Author
2013-07-05Take II, this time without flubbing off_t: : move several internalPhilip Guenther
type definitions that are the same across all archs from <machine/_types.h> to <sys/_types.h> ok deraadt@ kettenis@ otto@
2013-07-04backout previous; off_t must be signed and there might be other C++ APIOtto Moerbeek
breakage lurking; ok kettenis@
2013-07-04To ease future changes, move several internal type definitions that arePhilip Guenther
the same across all archs from <machine/_types.h> to <sys/_types.h> ok deraadt@
2013-06-30Add a luna88k-specific function to initialize the instruction cmmuKenji Aoyama
SAPR register. On luna88k, secondary processors are not disabled while the kernel is initializing. They are running an infinite loop in locore.S:secondary_init on non-MULTIPROCESSOR kernel. Then, after initializing the CMMUs tied to the currently-running processor, we turn on the instruction cache of other processors to make them happier. As a bonus, on non-MULTIPROCESSOR kernel, the power switch LED of luna88k is blinking green and orange again. According to the hardware manual, it indicates processors' cache hit status. suggested and ok miod@
2013-06-07Add {,u}{div,mod}si3 to libkern and to the kernel as well.Miod Vallat
2013-06-04comment fix: actually called __cpu_simple_lock_tTed Unangst
2013-06-01cleanup and consolidate the spinlock_lock (what a name!) code.Ted Unangst
it's now atomic_lock to better reflect its usage, and librthread now features a new spinlock that's really a ticket lock. thrlseep can handle both types of lock via a flag in the clock arg. (temp back compat hack) remove some old stuff that's accumulated along the way and no longer used. some feedback from dlg, who is concerned with all things ticket lock. (you need to boot a new kernel before installing librthread)
2013-05-31remove counters for simplelocksTed Unangst
2013-05-27Use FLUSH_PIPELINE instead of rolling our own. No functional change.Miod Vallat
2013-05-25Fix wbinv routine used by bus_dmamap_sync() to correctly operate on all cmmus,Miod Vallat
instead of I$ cmmu only. This longstanding bug has been introduced in r1.44, which commit message was right mentioning that it `fixes some bugs, probably introduces new ones as well'.
2013-05-25Allow badaddr() to be used with a size of 8. Needed by the MVME181 memoryMiod Vallat
detection code, and forgotten in previous commit.
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