接着第四节的继续分析,下面的是整个uboot前半部分的核心。
/*
* entry point of crt0 sequence
*/
ENTRY(_main)
/*
* Set up initial C runtime environment and call board_init_f(0).
*/
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK) /* 我们没定义这个 */
ldr sp, =(CONFIG_SPL_STACK)
#else
/* 在s5pv210.h中定义,上一节有分析,0x33000000 */
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
#endif
#if defined(CONFIG_CPU_V7M) /* v7M forbids using SP as BIC destination 没定义 不用分析*/
mov r3, sp
bic r3, r3, #7
mov sp, r3
#else
bic sp, sp, #7 /* 8-byte alignment for ABI compliance,sp 8字节对齐,我们本就是对齐的*/
#endif
mov r0, sp /* 把上面的0x33000000,作为参数传给下面c函数 */
bl board_init_f_alloc_reserve
mov sp, r0
/* set up gd here, outside any C code */
mov