summaryrefslogtreecommitdiffstats
path: root/arch/x86/lib/board.c
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2011-11-16 23:32:50 +0000
committerGraeme Russ <graeme.russ@gmail.com>2011-11-29 21:30:51 +1100
commit60a9b6bfddbe1e3ae280fe5422ccd283bc31a591 (patch)
treea1cd47b0ca6f0fd8822e30cbdef9dfa6b2c4be7e /arch/x86/lib/board.c
parent769db03a4a4ea1dc7e43c089c2227a0c8b4ffcbc (diff)
downloadblackbird-obmc-uboot-60a9b6bfddbe1e3ae280fe5422ccd283bc31a591.tar.gz
blackbird-obmc-uboot-60a9b6bfddbe1e3ae280fe5422ccd283bc31a591.zip
x86: Fix a few recently added bugs
Signed-off-by: Gabe Black <gabeblack@chromium.org> Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'arch/x86/lib/board.c')
-rw-r--r--arch/x86/lib/board.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c
index 18e0edee87..d742fec928 100644
--- a/arch/x86/lib/board.c
+++ b/arch/x86/lib/board.c
@@ -220,6 +220,9 @@ static int do_elf_reloc_fixups(void)
Elf32_Addr *offset_ptr_rom;
Elf32_Addr *offset_ptr_ram;
+ /* The size of the region of u-boot that runs out of RAM. */
+ uintptr_t size = (uintptr_t)&__bss_end - (uintptr_t)&__text_start;
+
do {
/* Get the location from the relocation entry */
offset_ptr_rom = (Elf32_Addr *)re_src->r_offset;
@@ -228,7 +231,8 @@ static int do_elf_reloc_fixups(void)
if (offset_ptr_rom >= (Elf32_Addr *)CONFIG_SYS_TEXT_BASE) {
/* Switch to the in-RAM version */
- offset_ptr_ram = offset_ptr_rom + gd->reloc_off;
+ offset_ptr_ram = (Elf32_Addr *)((ulong)offset_ptr_rom +
+ gd->reloc_off);
/* Check that the target points into .text */
if (*offset_ptr_ram >= CONFIG_SYS_TEXT_BASE &&
OpenPOWER on IntegriCloud