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