4 * This is the first jump from kernel to user mode.
5 * Fake a return from interrupt.
7 * Enter with R0 containing the user stack pointer.
8 * UTZERO + 0x20 is always the entry point.
11 TEXT touser(SB), 1, $-4
12 /* store the user stack pointer into the USR_r13 */
14 /* avoid the ambiguity described in notes/movm.w. */
16 ADD $4, R13 /* pop new user SP */
18 /* set up a PSR for user level */
22 /* push new user PSR */
25 /* push the new user PC on the stack */
26 MOVW $(UTZERO+0x20), R0
32 * here to jump to a newly forked process
34 TEXT forkret(SB), 1, $-4
35 ADD $(4*NREGS), R13 /* make r13 point to ureg->type */
36 MOVW 8(R13), R14 /* restore link */
37 MOVW 4(R13), R0 /* restore SPSR */