diff options
author | Stefano Babic <sbabic@denx.de> | 2016-05-24 14:55:06 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2016-05-24 14:55:06 +0200 |
commit | 08ca213acadef61748dc62d48b0f5c4bed8b8c2d (patch) | |
tree | 36cf415b78775ee63acdfc34d636d2b7d7936a78 /arch/m68k/cpu/mcf5445x/start.S | |
parent | d15a244b059e361475302bccd471e65a48ee2b1f (diff) | |
parent | d7d000311285e4b8d11e089ca13ea456a01be3b8 (diff) | |
download | blackbird-obmc-uboot-08ca213acadef61748dc62d48b0f5c4bed8b8c2d.tar.gz blackbird-obmc-uboot-08ca213acadef61748dc62d48b0f5c4bed8b8c2d.zip |
Merge branch 'master' of git://git.denx.de/u-boot
Diffstat (limited to 'arch/m68k/cpu/mcf5445x/start.S')
-rw-r--r-- | arch/m68k/cpu/mcf5445x/start.S | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/arch/m68k/cpu/mcf5445x/start.S b/arch/m68k/cpu/mcf5445x/start.S index f50f147a4f..ba38678be3 100644 --- a/arch/m68k/cpu/mcf5445x/start.S +++ b/arch/m68k/cpu/mcf5445x/start.S @@ -657,17 +657,34 @@ _start: movec %d0, %RAMBAR1 #endif - /* set stackpointer to end of internal ram to get some stackspace for - the first c-code */ - move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET), %sp - clr.l %sp@- + /* put relocation table address to a5 */ + move.l #__got_start, %a5 + + /* setup stack initially on top of internal static ram */ + move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE), %sp - move.l #__got_start, %a5 /* put relocation table address to a5 */ + /* + * if configured, malloc_f arena will be reserved first, + * then (and always) gd struct space will be reserved + */ + move.l %sp, -(%sp) + move.l #board_init_f_alloc_reserve, %a1 + jsr (%a1) + + /* update stack and frame-pointers */ + move.l %d0, %sp + move.l %sp, %fp + + /* initialize reserved area */ + move.l %d0, -(%sp) + move.l #board_init_f_init_reserve, %a1 + jsr (%a1) /* run low-level CPU init code (from flash) */ move.l #cpu_init_f, %a1 jsr (%a1) /* run low-level board init code (from flash) */ + clr.l %sp@- move.l #board_init_f, %a1 jsr (%a1) |