xv6-65oo2/user/initcode.S

29 lines
413 B
ArmAsm
Raw Normal View History

2020-08-15 09:46:32 +00:00
# Initial process that execs /init.
2016-08-11 19:41:53 +00:00
# This code runs in user space.
#include "syscall.h"
# exec(init, argv)
2007-08-27 23:32:16 +00:00
.globl start
start:
2019-05-31 13:45:59 +00:00
la a0, init
la a1, argv
li a7, SYS_exec
ecall
# for(;;) exit();
exit:
2019-05-31 13:45:59 +00:00
li a7, SYS_exit
ecall
jal exit
2007-08-24 19:37:24 +00:00
# char init[] = "/init\0";
init:
.string "/init\0"
2007-08-24 19:37:24 +00:00
# char *argv[] = { init, 0 };
.p2align 2
argv:
.long init
.long 0