Date: Tue, 19 Sep 2006 23:29:51 GMT From: Suleiman Souhlal <ssouhlal@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 106368 for review Message-ID: <200609192329.k8JNTpb7021448@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=106368 Change 106368 by ssouhlal@ssouhlal-maho on 2006/09/19 23:29:38 - Implement exec_setregs(). - Make fork_trampoline() return to userland. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips/machdep.c#21 edit .. //depot/projects/mips2/src/sys/mips/mips/swtch.S#4 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips/machdep.c#21 (text+ko) ==== @@ -279,7 +279,11 @@ void exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings) { + struct trapframe *tf = td->td_frame; + tf->tf_regs[TF_EPC] = (register_t)entry; + tf->tf_regs[TF_SP] = (register_t)stack; + /* XXX tf->tf_regs[TF_SR] |= MIPS_SR_KSU_USER; ? */ } intptr_t ==== //depot/projects/mips2/src/sys/mips/mips/swtch.S#4 (text+ko) ==== @@ -72,7 +72,6 @@ li v0, 1 jr ra nop - END(cpu_throw) /* @@ -109,7 +108,21 @@ move a0, s0 move a1, s1 move a2, s2 - j fork_exit + jal fork_exit + nop + + /* XXX AST */ + + .set at + lw t2, pcpup + .set noat + lw t3, PC_CURTHREAD(t2) + lw t0, TD_FRAME(t3) + + move k1, t0 + jal exception_restore_registers nop + addu sp, sp, TF_SIZE + eret END(fork_trampoline)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609192329.k8JNTpb7021448>