Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1077 → Rev 1078

/kernel/trunk/arch/mips32/include/asm.h
57,6 → 57,6
 
extern void cpu_halt(void);
extern void asm_delay_loop(__u32 t);
extern void userspace_asm(__address ustack);
extern void userspace_asm(__address ustack, __address uspace_uarg);
 
#endif
/kernel/trunk/arch/mips32/src/mips32.c
37,6 → 37,7
#include <arch/console.h>
#include <memstr.h>
#include <proc/thread.h>
#include <proc/uarg.h>
#include <print.h>
 
#include <arch/interrupt.h>
120,14 → 121,14
*/
__address supervisor_sp __attribute__ ((section (".text")));
 
void userspace(uspace_arg_t *uarg)
void userspace(uspace_arg_t *kernel_uarg)
{
/* EXL=1, UM=1, IE=1 */
cp0_status_write(cp0_status_read() | (cp0_status_exl_exception_bit |
cp0_status_um_bit |
cp0_status_ie_enabled_bit));
cp0_epc_write(uarg->uspace_entry);
userspace_asm(uarg->uspace_stack+PAGE_SIZE);
cp0_epc_write((__address) kernel_uarg->uspace_entry);
userspace_asm(((__address) kernel_uarg->uspace_stack+PAGE_SIZE), (__address) kernel_uarg->uspace_uarg);
while (1)
;
}
/kernel/trunk/arch/mips32/src/start.S
226,6 → 226,7
 
userspace_asm:
add $sp, $a0, 0
add $v0, $a1, 0
eret
nop