1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * A lowlevel_init function that sets up the stack to call a C function to
4 * perform further init.
7 #include <asm-offsets.h>
9 #include <linux/linkage.h>
13 * Setup a temporary stack. Global data is not available yet.
15 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK)
16 ldr w0, =CONFIG_SPL_STACK
18 ldr w0, =CONFIG_SYS_INIT_SP_ADDR
20 bic sp, x0, #0xf /* 16-byte alignment for ABI compliance */
23 * Save the old LR(passed in x29) and the current LR to stack
25 stp x29, x30, [sp, #-16]!
28 * Call the very early init function. This should do only the
29 * absolute bare minimum to get started. It should not:
34 * - try to start a console
36 * For boards with SPL this should be empty since SPL can do all of
37 * this init in the SPL board_init_f() function which is called
38 * immediately after this.
43 ENDPROC(lowlevel_init)