xv6

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 4f6df00d81fbb25b7a288cfe412f8773ae8d182a
parent 0875d4b58721f2b8e64aebf924bb664c00b1f817
Author: Brian Swetland <swetland@frotz.net>
Date:   Thu,  2 Jan 2014 01:13:30 -0800

64bit version of the init glue

Diffstat:
Akernel/initcode64.S | 30++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+), 0 deletions(-)

diff --git a/kernel/initcode64.S b/kernel/initcode64.S @@ -0,0 +1,30 @@ +# Initial process execs /init. + +#include "syscall.h" +#include "traps.h" + + +# exec(init, argv) +.globl start +start: + mov $init, %rdi + mov $argv, %rsi + mov $SYS_exec, %rax + int $T_SYSCALL + +# for(;;) exit(); +exit: + mov $SYS_exit, %rax + int $T_SYSCALL + jmp exit + +# char init[] = "/init\0"; +init: + .string "/init\0" + +# char *argv[] = { init, 0 }; +.p2align 2 +argv: + .quad init + .quad 0 +