summaryrefslogtreecommitdiff
path: root/sys/arch/usermode/dev/cpu.c
AgeCommit message (Collapse)Author
2012-07-29Do not call setroot() from MD code and from MI code, which hasmlelstv
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732. No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information as a side effect. Instead call MI rootconf() from MD code which makes rootconf() now a wrapper to setroot(). Adjust several MD routines to set the global booted_device,booted_partition variables instead of passing partial information to setroot(). Make cpu_rootconf(9) describe the calling order.
2012-06-25Implement dummy `cpu_mcontext_validate' to make it compile again. Thisreinoud
function needs to be implemented in the target secton one day for extra security.
2012-03-03Implement signal forwarding to userland for usermode kernels. Especiallyreinoud
SIGFPE is important since the urkel shouldn't stop when a userland program devides by zero!
2012-01-21Complete rewrite of the signal and spl framework for NetBSD/usermodereinoud
Signals are now moved from the sigaltstack ASAP and stacked on a replacement stack for each processes. Preemption now works though could be enhanced a bit more
2012-01-18Create an atomic switchto() that has SIGALRM and SIGIO signals blocked thatreinoud
might otherwise disrupt the setting of curlwp to match the lwp context.
2012-01-15sync disks and unmount at shutdown, and run shutdownhooks + pmf shutdownjmcneill
handlers
2012-01-15allow specifing the root device with 'root=ldN' parameterjmcneill
2012-01-14Reimplement userret() to also include AST for preemption.reinoud
Note it would be nice if we could do the check "are we going to userland?" in a less intrusive way.
2012-01-14Revamp the NetBSD/usermode pagefault and illegal instruction handing. It nowreinoud
can handle recursive entry and is a lot more memory tight compared to the old implementation. Performance wise: * slightly less number of syscalls/sec possible though could be optimized * a lot faster context creation / destruction making overall operation faster.
2012-01-12Remove old comment about space not being freed; it is now done correctly soreinoud
remove it to avoid confusion later.
2012-01-06Cleanup stack allocation and freeing. This means the memory leak on lwpreinoud
destruction ought to be solved.
2012-01-04No reason why to have a larger pagefault stackframe for lwp0reinoud
2012-01-04Zero the memory we claim for the stacksreinoud
2012-01-03Use M_WAITOK instead of M_NOWAIT for the stack allocationsreinoud
2012-01-03Rename the debug printf's to use a thunk_ prefix to avoid confusion.reinoud
2011-12-27Implement physio() for NetBSD/usermode the right way!reinoud
2011-12-24Implement cpu_getmcontext() and cpu_setmcontext()reinoud
2011-12-15Improve usermode timecounter. It's unreasonable to assume that we'll getjmcneill
100 "SIGALRM" per second with an ITIMER_REAL at 100Hz on a HZ=100 host as the timer may expire before a pending signal has been delivered. Instead of setitimer, use timer_create + timer_settime and from our intr handler use timer_getoverrun to determine how many ticks we have missed.
2011-12-15allocate msgbuf with kmem_zalloc instead of thunk_malloc, now dmesg worksjmcneill
2011-12-15implement cpu idle via sigsuspendjmcneill
2011-12-14only need to setup altstack after fork, not in lwp trampjmcneill
2011-12-14need to sigaltstack for each lwpjmcneill
2011-12-13Just in case ease up the stack space a bit morereinoud
2011-12-12No need for such big stack spaces on lwp_fork() with the new setup.reinoud
2011-12-11Free the systemcall and pagefault stacks on lwp destroy.reinoud
XXX what about the main ucps stackspace that is used for the trampoline?
2011-11-27Big patch that changes the signal stack usage of urkel significantly.reinoud
Formerly, all signals came on the signal stack and the two important ones were then forwared to either the system call or the pagefault handler. This worked fine but the signal stack remains that, a stack. When we go multi-process this stack gets corrupted and out-of-order with all kind of nastyness since a userland process switch can occure when a system call is called or when a process gets a page fault. The new scheme only uses the signal stack as a jumpboard. It swaps states and then returns from the signal, clearing the stack but instead of returning to the code it now jumpt to the handler and that handler then returns to the code when its finished.
2011-09-14Make stacksize of newly spawn lwp's bigger than one page. Actually use thereinoud
variable stack_size now
2011-09-10Make cpu_lwp_trampo only jump once and make successive jumps go to the funcreinoud
only
2011-09-09Make the trampoline only jump once!reinoud
All next calls are directed directly to the func specified.
2011-09-09Use the new thunk_makecontext() scheme with function and upto 3 agumentsreinoud
2011-09-09Streamline makecontext() calls to really only specify the number of argumentsreinoud
to prevent side-effects
2011-09-09Clean up cpu_trampoline and link the context so we dont have to manually doreinoud
that.
2011-09-08Use the machdep.h and now use the md_check_syscall_opcode()reinoud
2011-09-08Link syscall to userland so on exit is automatically goes to userland.reinoud
2011-09-08Cleanup syscall context creationreinoud
2011-09-08get rid of clock softintr and move setitimer call to cpu_initclocksjmcneill
2011-09-08White spacereinoud
2011-09-08Create a ucontext for the system call to work in; its cloned from the newreinoud
pcb's call `userland' ucontext.
2011-09-06cpu_lwp_inkernel approach won't work, back to the drawing boardjmcneill
2011-09-05Have the urkel maintain a 'cpu_lwp_inkernel' variable and read it from thejmcneill
urkelvisor to determine the origin of a syscall.
2011-09-05Restore errno just before switching to the new context and NOT after it gotreinoud
back again
2011-09-05Move kpreempt_enable/disable to splsched()reinoud
2011-09-05Disable kernel preemption in the critical section of cpu_switchto()reinoud
2011-09-04pcb->errno to pcb->pcb_errnoreinoud
2011-09-04Try to preserve errno over traps and on context switchesreinoud
2011-09-03unbreak build on netbsdjmcneill
2011-09-03Get this compiling (but not quite linking yet) on Linuxjmcneill
2011-09-03Oops forgot to commit this onereinoud
2011-09-02Update trapframe and add system call switchframereinoud
2011-08-29Dirty commit of machdep.c and cpu.creinoud