summaryrefslogtreecommitdiff
path: root/sys/arch/m88k
AgeCommit message (Collapse)Author
2014-12-24Pass real sizes to free().Miod Vallat
2014-11-16Replace a plethora of historical protection options with justTheo de Raadt
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis
2014-10-09revert unintentional commit unrelated to LKMTed Unangst
2014-10-09remove LKM devicesTed Unangst
2014-08-21Kill the remaining <netinet/in_systm.h> inclusion!Martin Pieuchot
2014-07-18pass atomic_{cas,swap}_uint a volatile void * instead of a volatileDavid Gwynne
void **. the latter is really hard to cast for, and not what what solaris does. ok kettenis@
2014-07-15Implement rw_cas() with atomic_cas_ulong() now, instead of a dedicatedMiod Vallat
routine.
2014-07-15Fix stupid bug in atomic_{add,sub}_int_nv_mp, and stupider bug inMiod Vallat
atomic_cas_uint_mp. Also, make the interprocessor interlock the only thing on its cache line.
2014-07-13use nitems() instead of handrolling something identicalJasper Lievisse Adriaanse
ok mpi@ sthen@
2014-07-13Add missing atomic primitives and __sync_synchronize to let the kernelMiod Vallat
compile again; tested by aoyama@
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-12Tackle the endian.h mess. Make it so that:Philip Guenther
* you can #include <sys/endian.h> instead of <machine/endian.h>, and ditto <endian.h> (fixes code that pulls in <sys/endian.h> first) * those will always export the symbols that POSIX specified for <endian.h>, including the new {be,le}{16,32,64}toh() set. c.f. http://austingroupbugs.net/view.php?id=162 if __BSD_VISIBLE then you also get the symbols that our <machine/endian.h> currently exports (ntohs, NTOHS, dlg's bemtoh*, etc) * when doing POSIX compiles (not __BSD_VISIBLE), then <netinet/in.h> and <arpa/inet.h> will *stop* exporting the extra symbols like BYTE_ORDER and betoh* ok deraadt@
2014-07-11CPU_BUSY_CYCLE(): A new MI statement for busy loop power reductionMasao Uebayashi
The new CPU_BUSY_CYCLE() may be put in a busy loop body so that CPU can reduce power consumption, as Linux's cpu_relax() and FreeBSD's cpu_spinwait(). To start minimally, use PAUSE on i386/amd64 and empty on others. The name is chosen following the existing cpu_idle_*() functions. Naming and API may be polished later. OK kettenis@
2014-07-08Repair compilability after the recent uvmexp changes, especially forMiod Vallat
not compile-time-known page size platforms.
2014-07-02Be more careful when recreating single-precision (float) argument to serviceMiod Vallat
precise exceptions, as the actual data the FPU gives us is a 35-bit number, with the exponent sign-extended to the double-precision exponent width. Make sure we shrink it and fetch the remaining three low bits of mantissa from the LS registers.
2014-07-02In fpu_compare(), set the `not equal' bit when the result of the comparisonMiod Vallat
is `not comparable'. gcc relies upon `not equal' being set when comparing numbers to infinities.
2014-07-02Make sure the kernel lock is held when invoking process_domem(); fixesMiod Vallat
ptrace operation on MP kernels.
2014-07-01Replace the assembly 88100 FPU imprecise exception code (mostly triggered byMiod Vallat
denormal results) with C code using softfloat to correctly round the inexact results in the best possible way according to the current rounding mode. No functional change intended, and this assembly code was surprisingly almost non-buggy, as opposed to the precise exception code replaced a few weeks ago; still an improvement as this replaces 900 lines of arcane assembly with 90 lines of understandable C code.
2014-06-09Replace the unmaintainable assembler code responsible for 88100 precise FPUMiod Vallat
fault handling with a C wrapper around the softfloat code, as already done for 88110 kernels. As a bonus, attempting to read or write FPU control registers but fcr62 and fcr63 in userland will now correctly signal an illegal instruction, instead of leaving the destination register unchanged and pretending nothing bad happened. Be sure to rm m88100_fp.d in your kernel compile directory after updating your tree.
2014-06-09Remove redundant regdump() output.Miod Vallat
2014-06-09Doh, traps 128 and 129 need to point to sigsys, not unknown_vector.Miod Vallat
2014-06-09More format string fixes (in 88110 code)Miod Vallat
2014-06-09Split the 88100 floating point support code in two files, one for the preciseMiod Vallat
exceptions, one for the imprecise exceptions. No functional change.
2014-06-08Stop accepting system calls on trap vectors 128 and 129. Userland has notMiod Vallat
been doing this since almost 1.5 years and there has been the 64-bit time_t bump in between, so no old binary should remain.
2014-06-05Remove conditional pipeline rewind on 88100, introduced in 1.19 - this seemsMiod Vallat
to create subtle problems, and removing it does not prevent existing signal delivery tests from having the correct behaviour. And this is likely redundant with DAE processing in sigreturn. We should probably rewind if XIP_V is not set, but does this ever happen in real life? To be investigated on a rainy day. This seems to fix spurious signals encountered building libstdc++ and perl.
2014-06-02Apply the ``make sure sigcontext does not overlap pending DAE addresses''Miod Vallat
logic in the dedicated signal stack case, too. Also, every time the sigcontext position is recomputed by the above logic, recheck the DAE addresses from the beginning, in case a formerly avoided address now risks being overwritten.
2014-06-01Take subsequent stack alignment into account in local_stack_frame() whenMiod Vallat
making sure the sigcontext will not overlap pending DAE accesses. Fixes sporadic sys/kern/signal/earlysig regress failure.
2014-05-31Reduce MAXSSIZ to 32MB to match all other platforms; noticed by tobiasu@Miod Vallat
2014-05-31Address several problems in signal delivery on 88100 processors:Miod Vallat
- when building the sigcontext, rewind the pipeline for recoverable exceptions, so that sigreturn actually has a chance to cause the interrupted instruction to be run again. - when returning with sigreturn, and the sigcontext contains valid DAE information, the DAE need to be emulated before returning, for the processor will not reissue them. - finally, when the sigframe is allocated on the current process' stack, be careful not to stomp upon addresses referenced by the DAE information, for this would defeat the previous point. All these changes only affect 88100 processors only. 88110 operation is unchanged. While there, do not copyout an empty siginfo struct if the signal handler does not expect any. Hair-pulling evil testcase provided by aoyama@, based upon one of devel/libsigsegv configure tests (which would spin on 88100 and run happily on 88110).
2014-05-31In regdump(), print DAE registers when they are valid, regardless of theMiod Vallat
exception type.
2014-05-31Introduce m88100_rewind_insn() to rewind the execution pipeline oneMiod Vallat
instruction, rather than gazillions of inline variants. This also makes the situations where we clear specific bits in the fip or nip registers more visible. No functional change.
2014-05-26Do not change the state of the carry bit in the psr when returning withMiod Vallat
ERESTART or EJUSTRETURN, for we're not supposed to. (Actually, setting the carry bit upon syscall failure doesn't make much sense on m88k, since this is not how the syscall stubs check for failure)
2014-05-17In pmap_remove_page(), do not keep wired mappings; the callers want them gone.Miod Vallat
2014-05-11Move the increment of uvmexp.softs back to the caller of mi_ast():Philip Guenther
it needs to be done atomicly on some MP archs and we don't have atomic_add_int() everywhere yet. Also, mi_ast() was meant to be inline. noted by miod@
2014-05-10Factor out the common ast bits into mi_ast()Philip Guenther
ok deraadt@
2014-05-08Format string fixes for m88k; remove -Wno-format from the m88k kernels.Miod Vallat
2014-04-18Have each thread keeps its own (counted!) reference to the process's ucredsPhilip Guenther
to avoid possible use-after-free references when swapping ids in threaded processes. "Do I have the right creds?" checks are always made with the threads creds. Inspired by FreeBSD and NetBSD "right time" deraadt@
2014-03-29It's been a quarter century: we can assume volatile is present with that name.Philip Guenther
ok dlg@ mpi@ deraadt@
2014-03-26Move p_emul and p_sigcode from proc to process.Philip Guenther
Tweak the handling of ktrace EMUL when changing ktracing: only generate one per process (not one per thread) and pass the correct proc pointer down to the VFS layer. Permit generating of NAMI and CSW records inside ktrace(2) itself. ok deraadt@ millert@
2014-03-22Move p_sigacts from struct proc to struct process.Philip Guenther
testing help mpi@
2014-03-19It's safe to assumed 'signed' existsPhilip Guenther
2014-03-18Retire hp300, mvme68k and mvme88k ports. These ports have no users, keepingMiod Vallat
this hardware alive is becoming increasingly difficult, and I should heed the message sent by the three disks which have died on me over the last few days. Noone sane will mourn these ports anyway. So long, and thanks for the fish.
2014-03-16DDB supports ELF symbols are all archs, and it's always the same as thePhilip Guenther
native size, so eliminate the #defines. ok miod@
2014-02-02To prevent lock ordering problems with the kernel lock, we need to make sureMark Kettenis
we block all interrupts that can grab the kernel lock. The simplest way to achieve this is to make sure mutexes always raise the ipl to the highest level that has interrupts that grab the kernel lock. This will allow us to have "mpsafe" interrupt handlers at lower priority levels. No change for non-MULTIPROCESSOR kernels. ok miod@
2014-01-30Move declaration of struct vm_page_md from <machine/vmparam.h> toMiod Vallat
<machine/pmap.h> where it belongs, and compensate in <uvm/uvm_extern.h> by including <uvm/uvm_pmap.h> before <uvm/uvm_page.h>. Tested on all MACHINE_ARCH but amd64 and i386 (and hppa64).
2014-01-23unifdef -D__HAVE_VM_PAGE_MD - no functional change.Miod Vallat
2013-12-18Provide MI symbol _STACKALIGNBYTESTheo de Raadt
2013-11-16Allow initial device mappings (from pmap_table) to be backed up by BATC.Miod Vallat
Use this on luna88k to map the bitmap planes of the frame buffer used by the driver. 10% speedup under X.
2013-11-03Even saner kernel layout, so that .rodata can be batc mapped by a read-onlyMiod Vallat
dbatc. Add batc mapping support for 88110 systems as well.
2013-11-02Create the initial page tables in the area between the end of the firmwareMiod Vallat
data area and the kernel image, whenever possible. On 88100/88200 systems, use BATC mappings to map the kernel text (and the kernel data for non-MULTIPROCESSOR kernels). 88110 to follow soon.