1/** 2 * \file 3 * \brief libc startup code. 4 */ 5 6/* 7 * Copyright (c) 2007, 2008, 2010, ETH Zurich. 8 * All rights reserved. 9 * 10 * This file is distributed under the terms in the attached LICENSE file. 11 * If you do not find this file, copies can be found by writing to: 12 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 13 */ 14 15#include <barrelfish/dispatch.h> 16#include <asmoffsets.h> 17 18 .text 19 .globl _start, _start_init, _start_0deref 20 21_start_0deref: 22 movq $0, 0 23 24_start: 25 mov $0, %rsi 26 27_start_generic: // Assumption: rdi = dispatcher 28 // Initialize stack for setup code 29 movq %rdi, %rsp 30 addq $(OFFSETOF_DISP_PRIV_STACK_LIMIT), %rsp 31 subq $8, %rsp // align the stack 32 // Call barrelfish_init_disabled (doesn't return) 33 jmp barrelfish_init_disabled 34 35/* special entry point for init domain */ 36_start_init: 37 mov $1, %rsi 38 jmp _start_generic 39