summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
AgeCommit message (Collapse)Author
2007-12-04Remove remains of the idle pcb/stack.Mark Kettenis
ok miod@
2007-11-25libkern, begone. Move to a new mechanism where config(8)'s "file"Theo de Raadt
directive can select between MI and MD versions of these files. At the same time, adjust the boot programs to pick exactly what they need, instead of the 7 or 8 mechanisms previously used. There will be some fallout from this, but testing it all by myself is a ridiculously slow process; it will be finished in-tree. Various developers were very nice and avoided making fun of me when I was gibbering in the corner..
2007-11-14prettify the RCS id (less whitespace)Thordur I. Bjornsson
2007-11-14Turn the spl* macros into functions.Thordur I. Bjornsson
Shaves a few bytes of the kernel. No measurable performance loss. ok drahn@, kettenis@
2007-11-04replace even more ctob/btoc with ptoa/atopMartin Reindl
2007-10-27Grab kernel lock for EXC_DSI.Mark Kettenis
Requested by deraadt@
2007-10-21Make certain the output buffer is zeroed before starting processing.Dale Rahn
2007-10-13Remove leftovers art forgot to prune...Miod Vallat
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-15[fF]uther -> [fF]urther in comments and man page. First one spotted onKenneth R Westerback
tech@ by Jung.
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-09Make sure ptrace(2) cannot change any priviliged bits in the Machine StateMark Kettenis
Register. Fixes PR 5574. From Stefan Kempf. ok deraadt@
2007-06-20In vunmapbuf(), explicitely remove mappings before invoking uvm_km_free().Miod Vallat
Even if the latter would end up removing the mappings by itself, it would do so using pmap_remove() because phys_map is not intrsafe; but some platforms use pmap_kenter_pa() in vmapbuf(). By removing the mappings ourselves, we can ensure the remove function used matches the enter function which has been used. Discussed and theoretical ok art@
2007-05-31panic if mtx_leave is called on an unlocked mutex. ok kettenis@Dale Rahn
2007-05-29Panic if the locker is self.Dale Rahn
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-27pagemove() is no longer used.Miod Vallat
2007-05-27Move powerpc to vm_page_md, 'throw it in' kettenis@Dale Rahn
2007-05-19Use atomic operations in set_sint() instead of disabling interrupts in theMiod Vallat
function. ok kettenis@
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-13Ansi prototypes, not K&R. no binary difference.Dale Rahn
2007-05-05Define MUTEX_OLDIPL where they were missing, will be used (reasonably) shortly.Miod Vallat
2007-05-03Implement pmap_steal_memory() on powerpc. With some help from art@.Miod Vallat
2007-04-26Handle AltiVec Assist exceptions. Fixes a panic when running crashme.Mark Kettenis
ok thib@, deraadt@
2007-04-13Timecounters for macppc. As clean and simple as sparc64. Uses the %tbMark Kettenis
special register. ok drahn@
2007-04-13Relax the cache flags logic in pmap_kenter_pa, to make sure that mappingsMiod Vallat
entered before vm_physmem[] are initialized will be cached. This is a temporary measure until this pmap implements pmap_steal_memory(). Help and ok drahn@
2007-04-01Remove some leftovers from the userret cleanups.Artur Grabowski
No need to save sticks anymore. miod@ ok and test
2007-03-23Define PROC_PC and simplify userret(); ok kettenis@ (and I think drahn@ too)Miod Vallat
2007-03-22Move powerpc to __HAVE_MUTEX. With help from drahn@. Tested by nick@, xsa@,Mark Kettenis
deraadt@. "reads right" deraadt@
2007-03-20Move macppc to __HAVE_CPUINFO, and make locore.S and trap.c suitable forMark Kettenis
MULTIPROCESSOR. From now on sprg0 holds a pointer to struct cpuinfo, which is used to spill registers to during trap instead of the globals we used to use for that purpose. Bits and pieces from NetBSD. Help from drahn@ and art@. Tested by xsa@, thib@, miod@, gwk@, deraadt@. ok drahn@, gwk@
2007-03-17Implement proper atomic.h for powerpc. With help from art@ and drahn@.Mark Kettenis
ok drahn@
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-22Dont pass seemingly random numbers down as the flagThordur I. Bjornsson
parameter of pool_init() ok drahn@ no objections miod@
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-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
2006-12-24Check for want_resched when processing AST and nowhere else. But then, whenMiod Vallat
doing so, do not check for signals - userret() will do this.
2006-11-29Remove cpu_swapin() and cpu_swapout(), they are no longer necessary (exceptMiod Vallat
for cpu_swapin() on hppa* which is kept).
2006-05-29clean userland namespace a bit more; ok miodTheo de Raadt
2006-05-16Add struct fpreg.Mark Kettenis
2006-05-15Implement PT_{GET|SET}FPREGS.Mark Kettenis
"looks good to me" miod@, ok drahn@
2006-05-10Use a macro in the MI powerpc PCI header for pci_intr_line() insteadBrad Smith
of a function in the MD macppc host bridge code. ok drahn@
2006-04-17Remove unused struct mdproc fields.Miod Vallat
2006-04-09#ifdef lint wraps for va_startTheo de Raadt
2006-03-19Change BLKDEV_IOSIZE down to 2KB like on all other platforms; ok kettenis@Miod Vallat
2006-03-12remove IPL_IMP and splimp().Brad Smith
2006-03-11cbb needs IPL_VM to be defined now.Miod Vallat
2006-02-10Add a few more CPU types.Mark Kettenis
2006-01-13Make size_t, ssize_t, intptr_t and uintptr_t consistent amongst ourTodd C. Miller
architectures. They are now defined as unsigned long, long, long and unsigned long respectively.
2006-01-10Remove duplicate _C_LABEL define. OK miod@Todd C. Miller