2 * Early initialization code for ARM architecture.
4 * This file is based off of the OMAP3530/ARM Cortex start.S file from Das
5 * U-Boot, which itself got the file from armboot.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; version 2 of
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
23 * Set the CPU to System mode with IRQ and FIQ disabled. Prefetch/Data
24 * aborts may happen early and crash before the abort handlers are
25 * installed, but at least the problem will show up near the code that
31 * Initialize the stack to a known value. This is used to check for
32 * stack overflow later in the boot process.
43 /* Set stackpointer in internal RAM to call bootblock main() */
45 ldr sp, =_estack /* Set up stack pointer */
48 * The current design of cpu_info places the
49 * struct at the top of the stack. The number of
50 * words pushed must be at least as large as that
54 bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
56 * Use "bl" instead of "b" even though we do not intend to return.
57 * "bl" gets compiled to "blx" if we're transitioning from ARM to
58 * Thumb. However, "b" will not and GCC may attempt to create a
59 * wrapper which is currently broken.