1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Early initialization code for ARM architecture.
5 * This file is based off of the OMAP3530/ARM Cortex start.S file from Das
6 * U-Boot, which itself got the file from armboot.
13 * Set the CPU to System mode with IRQ and FIQ disabled. Prefetch/Data
14 * aborts may happen early and crash before the abort handlers are
15 * installed, but at least the problem will show up near the code that
21 * Initialize the stack to a known value. This is used to check for
22 * stack overflow later in the boot process.
33 /* Set stackpointer in internal RAM to call bootblock main() */
35 ldr sp, =_estack /* Set up stack pointer */
38 * The current design of cpu_info places the
39 * struct at the top of the stack. The number of
40 * words pushed must be at least as large as that
44 bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
46 * Use "bl" instead of "b" even though we do not intend to return.
47 * "bl" gets compiled to "blx" if we're transitioning from ARM to
48 * Thumb. However, "b" will not and GCC may attempt to create a
49 * wrapper which is currently broken.