diff options
author | Graeme Russ <graeme.russ@gmail.com> | 2011-02-12 15:11:58 +1100 |
---|---|---|
committer | Graeme Russ <graeme.russ@gmail.com> | 2011-02-12 15:11:58 +1100 |
commit | fb0029088e5b9d3f31870715ad23dda4a2c6e7f3 (patch) | |
tree | 9294628815df86aae20900995e2d4b1aec0725e4 /arch/i386/lib/board.c | |
parent | 96cd66426a6a615373f7f33fb2a8b7ee3925b1cf (diff) | |
download | u-boot-imx-fb0029088e5b9d3f31870715ad23dda4a2c6e7f3.zip u-boot-imx-fb0029088e5b9d3f31870715ad23dda4a2c6e7f3.tar.gz u-boot-imx-fb0029088e5b9d3f31870715ad23dda4a2c6e7f3.tar.bz2 |
x86: Defer setup of final stack
Diffstat (limited to 'arch/i386/lib/board.c')
-rw-r--r-- | arch/i386/lib/board.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/i386/lib/board.c b/arch/i386/lib/board.c index d716232..60fa982 100644 --- a/arch/i386/lib/board.c +++ b/arch/i386/lib/board.c @@ -189,6 +189,7 @@ void board_init_f(ulong boot_flags) ulong *src_addr; ulong *end_addr; + void *addr_sp; void *dest_addr; ulong rel_offset; Elf32_Rel *re_src; @@ -198,6 +199,7 @@ void board_init_f(ulong boot_flags) /* Calculate destination RAM Address and relocation offset */ dest_addr = (void *)gd->ram_size; + addr_sp = dest_addr; dest_addr -= CONFIG_SYS_STACK_SIZE; dest_addr -= (bss_end - text_start); rel_offset = text_start - dest_addr; @@ -242,9 +244,9 @@ void board_init_f(ulong boot_flags) gd->flags |= GD_FLG_RELOC; /* Enter the relocated U-Boot! */ - (board_init_r - rel_offset)(gd, (ulong)dest_addr); + relocate_code((ulong)addr_sp, gd, (ulong)dest_addr); - /* NOTREACHED - board_init_f() does not return */ + /* NOTREACHED - relocate_code() does not return */ while(1); } |