1/**
2 * \file
3 * \brief libc startup code.
4 */
5
6/*
7 * Copyright (c) 2007, 2008, 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 <asmoffsets.h>
16    .syntax unified
17    .text
18    .globl  _start, _start_init
19
20_start:
21        // Entry for processes other than init
22        // Prepare arg1 init_dom_arg (false)
23        mrc p15, 0, r0, c13, c0, 3 /* udisp */
24        mov     r1, #0
25
26_start_generic:
27        ldr     sp, =crt0_temp_stack
28        // Call barrelfish_init_disabled(struct dispatcher* d, bool init_dom_arg)
29        b    barrelfish_init_disabled
30
31_start_init:
32        // Entry for the init process
33        // Prepare arg1 init_dom_arg (true)
34        mrc p15, 0, r0, c13, c0, 3 /* udisp */
35        mov     r1, #1
36        b       _start_generic
37
38
39.section ".bss"
40crt0_temp_stack_base:
41        .space  8192
42crt0_temp_stack:
43