Lines Matching +full:boot +full:- +full:up

1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * crt0 - C-runtime startup Code for AArch64 U-Boot
9 * Albert ARIBAUD <albert.u.boot@aribaud.net>
13 #include <asm-offsets.h>
18 * This file handles the target-independent stages of the U-Boot
19 * start-up where a C runtime environment is needed. Its entry point
24 * 1. Set up initial environment for calling board_init_f().
39 * 3. Set up intermediate environment where the stack and GD are the
41 * initialized non-const data are still not available.
43 * 4a.For U-Boot proper (not SPL), call relocate_code(). This function
44 * relocates U-Boot from its current location into the relocation
50 * 5. Set up final environment for calling board_init_r(). This
51 * environment has BSS (initialized to 0), initialized non-const
53 * RAM (for SPL moving the stack and GD into RAM is optional - see
58 * 6. For U-Boot proper (not SPL), some CPUs have some work left to do
69 * Set up initial C runtime environment and call board_init_f(0).
81 bic sp, x0, #0xf /* 16-byte alignment for ABI compliance */
85 /* set up gd here, outside any C code */
94 * Set up intermediate environment (new sp and gd) and call
98 ldr x0, [x18, #GD_START_ADDR_SP] /* x0 <- gd->start_addr_sp */
99 bic sp, x0, #0xf /* 16-byte alignment for ABI compliance */
100 ldr x18, [x18, #GD_NEW_GD] /* x18 <- gd->new_gd */
104 /* Add in link-vs-runtime offset */
105 adr x0, _start /* x0 <- Runtime value of _start */
106 ldr x9, _TEXT_BASE /* x9 <- Linked value of _start */
107 sub x9, x9, x0 /* x9 <- Run-vs-link offset */
110 /* Add in link-vs-relocation offset */
111 ldr x9, [x18, #GD_RELOC_OFF] /* x9 <- gd->reloc_off */
113 ldr x0, [x18, #GD_RELOCADDR] /* x0 <- gd->relocaddr */
119 * Set up final (full) environment
125 /* set up gd here, outside any C code, if new stack is returned */
142 ldr x0, =__bss_start /* this is auto-relocated! */
143 ldr x1, =__bss_end /* this is auto-relocated! */
154 /* NOTREACHED - board_init_r() does not return */