summaryrefslogtreecommitdiff
path: root/sys/arch/sh/include
AgeCommit message (Collapse)Author
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-09-02Fix typos in comments: soruce -> sourceHans-Joerg Hoexer
2007-06-21Attach interrupt counters to intc interrupt sources too, so that clockMiod Vallat
interrupts get counted; from mickey
2007-06-20b_cylinder does not need to be set on the callpath down into drivers.Theo de Raadt
cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
2007-06-17significantly simplified disklabel infrastructure. MBR handling becomes MITheo de Raadt
to support hotplug media on most architectures. disklabel setup and verification done using new helper functions. Disklabels must *always* have a correct checksum now. Same code paths are used to learn on-disk location disklabels, to avoid new errors sneaking in. Tested on almost all cases, testing help from todd, kettenis, krw, otto, dlg, robert, gwk, drahn
2007-06-06now that all partition size/offsets are potentially 64-bit, change theTheo de Raadt
type of all variables to daddr64_t. this includes the APIs for XXsize() and XXdump(), all range checks inside bio drivers, internal variables for disklabel handling, and even uvm's swap offsets. re-read numerous times by otto, miod, krw, thib to look for errors
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-26tyopsMiod Vallat
2007-05-20Fix KERNBASE, so that profiling kernels initialize (but profiling is brokenMiod Vallat
at the moment).
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-14Switch sh to __HAVE_CPUINFO. The least possible effort for now.Artur Grabowski
deraadt@ ok
2007-05-10evcnt & friends were replaced by a proper interrupt counting mechanism 3 ↵Theo de Raadt
years ago; ok miod
2007-05-05Define MUTEX_OLDIPL where they were missing, will be used (reasonably) shortly.Miod Vallat
2007-05-01Simple monoprocessor mutex implementation, faster than the MI code, four leftMiod Vallat
to go.
2007-04-29machdep.led_blink sysctl for landisk, also move cpu_sysctl() code and relatedMiod Vallat
variables from arch/sh/ to arch/landisk/. ok deraadt@
2007-04-05Disable interrupts around bit operations for propert atomicity against them.Miod 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-03-05Add pmap_prefer() for SH4, from NetBSD; ok drahn@Miod Vallat
2007-03-03Kernel crash dumps and associated libkvm bits for landisk.Miod Vallat
2007-03-02Move landisk to hardware floating point. At the moment the FPU context isMiod Vallat
always saved upon context switches, as FPU registers are heavily used for long long computations (don't ask). Gcc default to -m4. Credits to drahn@ otto@ and deraadt@ for feedback and help testing. Upgrade procedure if you don't want to use the damn snapshots: - build and install new kernel, reboot off it - build new gcc, do not install it yet - make includes - install new gcc - build and install lib/csu and lib/libc - make build
2007-02-26FPU disabled bit on SH4 is not a ``must be zero'' bit, but userland shall notMiod Vallat
be allowed to fiddle with it anyway.
2007-02-19only make this interface available to the kernel for now, discussed withaTheo de Raadt
rt and such; tested and ok miod drahn
2007-02-11typo in commentMartin Reindl
2007-02-06Define trap #0x81 for cache range flush, will be necessary soon for gccMiod Vallat
trampoline code and ld.so.
2007-02-06Add machine/atomic.h to all architectures and define two operationsArtur Grabowski
right now that are supposed to be atomic with respect to interrupts and SMP: atomic_setbits_int and atomic_clearbits_int. All architectures other than i386 and amd64 get dummy implementations since at first we'll be replacing operations that are done with "a |= bit" and "a &= ~bit" today. More proper implementations will follow kettenis@, miod@ ok
2007-01-15power(4) driver for the power switch on many landisk models, hookedMartin Reindl
up to machdep.kbdreset; modelled after the sparc64 power(4) driver discussed with miod@ and jsg@
2006-11-29Remove cpu_swapin() and cpu_swapout(), they are no longer necessary (exceptMiod Vallat
for cpu_swapin() on hppa* which is kept).
2006-11-28Implement PT_STEP.Mark Kettenis
2006-11-27Add PT_STEP.Mark Kettenis
2006-11-14match other architectures: _spinlock_lock_t is not volatile itself, butTheo de Raadt
code that uses it declares a volatile form
2006-11-10relocations belong in reloc.hDale Rahn
2006-11-10Correct order of the bitfields of float and double. Fixes ldexp() (andOtto Moerbeek
some more), which fixeds drand48(), which fixes perl build. ok miod@ drahn@ deraadt@
2006-11-10Will be needed at some point.Dale Rahn
2006-11-05Use TF_SPC instead of hardcoding its value.Miod Vallat
2006-11-05Some basic fpu trap handling.Miod Vallat
2006-11-05define the bit that sh4 uses for FPU disable.Dale Rahn
2006-11-03For now use 3 pages like netbsd, allows the kernel to get _MUCH_ farther.Dale Rahn
I suspect this is really a bug in the P1_STACK code path.
2006-11-02proper brkpt detection so continue does restart properMichael Shalayeff
2006-10-23Add interrupt name, however need to determine if the passed parameter is safeDale Rahn
to store or might be on the stack.
2006-10-20Try again with local variable to avoid alignment issues.Kenneth R Westerback
"The dosparts member of cpu_disklabel was not used for any persistant data. Eliminate it, and just use the data being read in while processing MBR and EBR records. Should be no functional change. ok weingart@ deraadt@"
2006-10-18back out disksubr changes ... since they violate strict alignment onTheo de Raadt
some architectures (kaboom); that will be fixed in the next iteration hopefully!
2006-10-17The dosparts member of cpu_disklabel was not used for any persistantKenneth R Westerback
data. Eliminate it, and just use the data being read in while processing MBR and EBR records. Should be no functional change. ok weingart@ deraadt@
2006-10-14ps uses KERNBASE so define it to the correct value (pointed out by miod)Dale Rahn
2006-10-11tsk, tskDale Rahn
2006-10-10Match the SH4 FPSCR bits.Miod Vallat
2006-10-06few more filesMichael Shalayeff
2006-10-06Sync with recent disklabel.h changes. Zap dkbad.Kenneth R Westerback
"Free commits" miod@
2006-10-06a few fixes to get thru the autoconfMichael Shalayeff