- mov PSR_S, %l0 ! user psr
-#define XADDR 0x2000 /* XXX */
- set XADDR, %l1 ! pc
- add %l1, 4, %l2 ! npc
- b return_from_trap
- wr %l0, 0, %psr ! just like syscall()
-
-/*
- * Icode is copied out to process 1 to exec init.
- * If the exec fails, process 1 exits.
- *
- * We depend here on the fact that we are copied to address XADDR
- * (but so does the code above).
- */
- .globl _icode, _szicode
-_icode:
- mov SYS_execve, %g1
- set init - _icode + XADDR, %o0 ! actual location of pathname
- set argv - _icode + XADDR, %o1 ! ... and of argv
- clr %o2 ! no environment
- t ST_SYSCALL
- mov SYS_exit, %g1
- t ST_SYSCALL