summaryrefslogtreecommitdiff
path: root/sys/arch/m88k/include
AgeCommit message (Collapse)Author
2008-01-13Add a machdep.cputype sysctl, which returns the processor type (0 for 88100,Miod Vallat
1 for 88110), for userland to have an easy way to figure out.
2007-12-31replace ctob/btoc by ptoa/atop as done for other architecturesMartin Reindl
2007-12-29Override SoftFloat's countLeadingZeros32() with a faster, ff1-based, versionMiod Vallat
on m88k.
2007-12-29Had I known we had a kernel version of John Hauser's SoftFloat code, I wouldMiod Vallat
have jumped on it instead of basing the FPU completion work on the sparc FPU code. This is now repaired with this commit, and m88110_fp.c changes directory again, for the last time.
2007-12-25Do not make struct pmap visible unless _KERNEL.Miod Vallat
2007-12-25Restart the m88110 floating-point trap code from scratch, basing it on theMiod Vallat
sparc{,64} floating-point emulator, adapted to the 88110 specifics. Handling of these traps is now entirely done in C for convenience. Although there are a few rounding issues to address, and the XRF is ignored, this allows all the ieee754 regression tests to pass (lib/libc/ieeefp, sys/kern/signal/fpsig, sys/kern/signal/sigfpe).
2007-12-20Get rid of disable_interrupt() and have caller use get_psr() and set_psr();Miod Vallat
this allows us to get rid of the dependency of asm_macro.h on asm.h, which was really only there to bring in psl.h.
2007-12-20Do not protect this file with _KERNEL; other header files which include it do itMiod Vallat
in a _KERNEL-only section, and we want to eventually be able to use it from the bootblocks.
2007-12-15Since the 88110 can not invalidate a particular tlb entry, do not stackMiod Vallat
invalidate tlb ipis, and turn them into simple ``handle once'' ipis.
2007-12-15Move the cmmu lock back from 8820x-specific code to global, and use it onMiod Vallat
MVME197DP to serialize 88410 operations.
2007-12-08Better siginfo fault codes for floating point exceptions on 88110, withMiod Vallat
more work in progress to handle these exceptions correctly, and document a new undocumented and evil chip bug while there.
2007-12-05Make the CPU_88100 and CPU_88110 constants match the architectural numberMiod Vallat
field from the processor identification register; this allows .S code which needs to decide on the cpu type at runtime to check quicker, without needing to access memory. No functional change.
2007-12-05xmem can not be used as a reliable atomic operation, they way we do them,Miod Vallat
so do the naive operations with interrupts disabled, and an interlock held if MULTIPROCESSOR.
2007-12-04Work in progress SMP code for 88110 processor using the BusSwitch chip asMiod Vallat
an IPI facility, for MVME197DP. It's still missing a few remote cache IPIs and IPI do not seem to be reliably triggered on remote processors at the moment (but this could be a problem on the board I am currently testing on), at least it will boot multiuser using only cpu0 to schedule processes.
2007-12-02Sort and clean definitions. No functional changes.Miod Vallat
2007-12-02Provide a specific rw_cas() function for MP kernels, simulating a reallyMiod Vallat
atomic compare-and-swap operation.
2007-12-02Rework the __mp_lock code to not spin at spllock(), kinda similar to theMiod Vallat
x86 __mp_lock changes, but keeping the internal __cpu_simplelock_t to guarantee atomic access to the __mp_lock fields.
2007-11-22Remove the cpu parameter from cmmu_set_sapr(), since it is only invokedMiod Vallat
for the current processor. And remove now unused cmmu_flush_data_page().
2007-11-22Move the cmmu lock to 88200-specific code. 88110 MP code will use ipisMiod Vallat
and will not require such a lock.
2007-11-21TypoMiod Vallat
2007-11-21Move pmap_set_modify() prototype to a header fileMiod Vallat
2007-11-21Move external interrupt and ast handling from m881[01]0_trap() to theirMiod Vallat
own functions, which do not need to be processor-specific. This speeds up the exception return sequence a bit.
2007-11-17Replace many ``unsigned'' variables with ``unsigned int'', ``u_int'' or otherMiod Vallat
appropriate types. No functional change.
2007-11-17Rework {get,set,raise}ipl() to minimize psr modification, especially onMiod Vallat
boards such as mvme1[89]7 where spl changes can be atomic.
2007-11-15Resolve the struct trapframe tf_mode/tf_flags duality by getting rid ofMiod Vallat
the tf_mode name. This field only contains flags used internally by the exception processing code.
2007-11-15Stop referring the initial kernel stack as the ``interrupt stack''. It'sMiod Vallat
been years since it has last been used for that purpose, so name it the initialization/startup stack. While there, do not store the initialization stack in cpu_info, and have secondary_pre_main() return its value so that the bootstrap code does not need to fetch it from cpu_info. This might be reconsidered when the startup stacks will be freed after they are not used anymore, but there are more things to do first.
2007-11-14Merge the ci_alive and ci_primary boolean values of struct cpu_info intoMiod Vallat
a single ci_flags bitfield. Also, set_cpu_number() will no longer set CIF_PRIMARY on the primary processor, it's up to the initialization code to do this.
2007-11-14Let ``machine cpu #'' hop to the given cpu.Miod Vallat
2007-11-06Keep a pending software interrupts mask per processor, instead of having itMiod Vallat
global; and only schedule software interrupts on the currently running cpu.
2007-11-06Remove the now unused idle_u, and call the secondary processors startupMiod Vallat
stack a startup stack.
2007-10-29When a secondary cpu gets its interrupt pin stuck, be sure to savectxMiod Vallat
and put the process it was running back on the run queue (unless this was the idle proc).
2007-10-27Use the same assembly constraints for all inline assembler xmem constructs.Miod Vallat
2007-10-27In __cpu_simple_lock() and __cpu_simple_lock_try(), use a local u_int insteadMiod Vallat
of a local __cpu_simple_lock_t (which is volatile), so that the compiler can optimize it to a register, instead of using a memory location (and doing stores into it when __cpu_simple_lock() is spinning). This makes the MP code a bit smaller and a bit faster.
2007-10-27No need for an explicit pipeline synchronization in invalidate_pte(), theMiod Vallat
xmem instruction does it for us.
2007-10-24Turn curcpu() into an inline function instead of a macro relying on a GCCMiod Vallat
extension.
2007-10-16Do not expose the end of the proc_trampoline bowels to C code anymore, andMiod Vallat
get rid of the ``switchframe'' struct definition. As a bonus, this makes cpu_fork() simpler and unwastes 8 bytes of u area.
2007-10-13It is no longer necessary to fiddle with spl in cpu_idle_{enter,leave} nowMiod Vallat
that proc_trampoline has been fixed.
2007-10-10Make context switching much more MI:Artur Grabowski
- Move the functionality of choosing a process from cpu_switch into a much simpler function: cpu_switchto. Instead of having the locore code walk the run queues, let the MI code choose the process we want to run and only implement the context switching itself in MD code. - Let MD context switching run without worrying about spls or locks. - Instead of having the idle loop implemented with special contexts in MD code, implement one idle proc for each cpu. make the idle loop MI with MD hooks. - Change the proc lists from the old style vax queues to TAILQs. - Change the sleep queue from vax queues to TAILQs. This makes wakeup() go from O(n^2) to O(n) there will be some MD fallout, but it will be fixed shortly. There's also a few cleanups to be done after this. deraadt@, kettenis@ ok
2007-09-10Introduce a md pmap hook, pmap_remove_holes(), which is supposed to markMiod Vallat
the holes a MMU may have from a given vm_map. This will be automagically invoked for newly created vmspaces. On platforms with MMU holes (e.g. sun4, sun4c and vax), this prevents mmap(2) hints which would end up being in the hole to be accepted as valid, causing unexpected signals when the process tries to access the hole (since pmap can not fill the hole anyway). Unfortunately, the logic mmap() uses to pick a valid address for anonymous mappings needs work, as it will only try to find an address higher than the hint, which causes all mmap() with a hint in the hole to fail on vax. This will be improved later.
2007-05-28Move the MSIZE, MCLSHIFT, MCLBYTES and the MCLOFSETThordur I. Bjornsson
mbuf constants from MD param.h to MI param.h. Besides being the same on every arch, things will most probly break if any arch has different values then the others. The NMBCLUSTERS constants needs to be MD though; ok miod@,krw@,claudio@
2007-05-19Send an IPI in signotify() if the process runs on a different processor,Miod Vallat
similar to the fix which went into i386 and amd64 a few weeks ago.
2007-05-19Simpler asm constraints for simplelock operations.Miod Vallat
2007-05-16splassert_ctl defaults to 1 now, so dont wrap the checks forThordur I. Bjornsson
splassert_ctl > 0 in __predict_false(). ok deraadt@
2007-05-16The world of __HAVEs and __HAVE_NOTs is reducing. All architecturesArtur Grabowski
have cpu_info now, so kill the option. eyeballed by jsg@ and grange@
2007-05-15Remove the MI implementation of mutexes and remove the __HAVE_MUTEXArtur Grabowski
option. Every architecture implements mutexes now.
2007-05-14Work in progress IPI mechanism, currently only implemented on MVME188, toMiod Vallat
send clock ticks to secondary processors.
2007-04-18Use atomic operations to change the pending software interrupt mask.Miod Vallat
2007-03-21Real atomic_{set,clear}bits_int implementation, ok deraadtMiod Vallat
2007-03-15Since p_flag is often manipulated in interrupts and without biglockArtur Grabowski
it's a good idea to use atomic.h operations on it. This mechanic change updates all bit operations on p_flag to atomic_{set,clear}bits_int. Only exception is that P_OWEUPC is set by MI code before calling need_proftick and it's automatically cleared by ADDUPC. There's no reason for MD handling of that flag since everyone handles it the same way. kettenis@ ok
2007-02-19only make this interface available to the kernel for now, discussed withaTheo de Raadt
rt and such; tested and ok miod drahn