diff options
author | Graeme Russ <graeme.russ@gmail.com> | 2011-02-12 15:11:54 +1100 |
---|---|---|
committer | Graeme Russ <graeme.russ@gmail.com> | 2011-02-12 15:11:54 +1100 |
commit | 96cd66426a6a615373f7f33fb2a8b7ee3925b1cf (patch) | |
tree | 4adf528d0ce2fb58f0c90933fd86c5b60a3be0fe /arch/i386/lib | |
parent | ed4cba79d640daa33806fa228c1a10c6bf9e2101 (diff) | |
download | u-boot-imx-96cd66426a6a615373f7f33fb2a8b7ee3925b1cf.zip u-boot-imx-96cd66426a6a615373f7f33fb2a8b7ee3925b1cf.tar.gz u-boot-imx-96cd66426a6a615373f7f33fb2a8b7ee3925b1cf.tar.bz2 |
sc520: Move RAM sizing code from asm to C
Diffstat (limited to 'arch/i386/lib')
-rw-r--r-- | arch/i386/lib/board.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/i386/lib/board.c b/arch/i386/lib/board.c index 4227312..d716232 100644 --- a/arch/i386/lib/board.c +++ b/arch/i386/lib/board.c @@ -176,7 +176,7 @@ gd_t *gd; /* * Load U-Boot into RAM, initialize BSS, perform relocation adjustments */ -void board_init_f(ulong mem_top) +void board_init_f(ulong boot_flags) { void *text_start = &__text_start; void *data_end = &__data_end; @@ -194,8 +194,12 @@ void board_init_f(ulong mem_top) Elf32_Rel *re_src; Elf32_Rel *re_end; + gd->flags = boot_flags; + /* Calculate destination RAM Address and relocation offset */ - dest_addr = (void *)mem_top - (bss_end - text_start); + dest_addr = (void *)gd->ram_size; + dest_addr -= CONFIG_SYS_STACK_SIZE; + dest_addr -= (bss_end - text_start); rel_offset = text_start - dest_addr; /* Perform low-level initialization only when cold booted */ |