13a96baefc
Passes usertests and stressfs Seems to recover correctly in a number of simple cases
34 lines
463 B
ArmAsm
34 lines
463 B
ArmAsm
# Initial process execs /init.
|
|
|
|
#include "syscall.h"
|
|
#include "traps.h"
|
|
|
|
|
|
# exec(init, argv)
|
|
.globl start
|
|
start:
|
|
movl $SYS_init, %eax
|
|
int $T_SYSCALL
|
|
pushl $argv
|
|
pushl $init
|
|
pushl $0 // where caller pc would be
|
|
movl $SYS_exec, %eax
|
|
int $T_SYSCALL
|
|
|
|
# for(;;) exit();
|
|
exit:
|
|
movl $SYS_exit, %eax
|
|
int $T_SYSCALL
|
|
jmp exit
|
|
|
|
# char init[] = "/init\0";
|
|
init:
|
|
.string "/init\0"
|
|
|
|
# char *argv[] = { init, 0 };
|
|
.p2align 2
|
|
argv:
|
|
.long init
|
|
.long 0
|
|
|