diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2011-07-01 11:22:21 +0200 |
---|---|---|
committer | Thomas Huth <thuth@linux.vnet.ibm.com> | 2011-10-12 08:43:50 +0200 |
commit | 7a3606eeb9fc778bab000dd50bf7fbee6bc59ee4 (patch) | |
tree | c5ddffb8aae325b7db5d286085021175b0dbd3f5 /board-js2x | |
parent | 2e2e4cae3728d7c4565cae90e687555a7df1af12 (diff) | |
download | SLOF-7a3606eeb9fc778bab000dd50bf7fbee6bc59ee4.zip SLOF-7a3606eeb9fc778bab000dd50bf7fbee6bc59ee4.tar.gz SLOF-7a3606eeb9fc778bab000dd50bf7fbee6bc59ee4.tar.bz2 |
Reworked libelf to support relocation
Split elf.c into elf32.c and elf64.c for better readability. Added relocation
code to libelf for 64-bit ELF images, modified the Paflof Makefile to link
the executable with relocation information and load Paflof now to the upper
end of the memory.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'board-js2x')
-rw-r--r-- | board-js2x/llfw/stage2.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/board-js2x/llfw/stage2.c b/board-js2x/llfw/stage2.c index 245d92e..9cc9801 100644 --- a/board-js2x/llfw/stage2.c +++ b/board-js2x/llfw/stage2.c @@ -264,7 +264,9 @@ early_c_entry(uint64_t start_addr) load_file(0x100, "xvect", 0, romfs_base); load_file(SLAVELOOP_LOADBASE, "stageS", 0, romfs_base); c_romfs_lookup("ofw_main", romfs_base, &fileInfo); - load_elf_file((void *) fileInfo.addr_data, &ofw_addr); + + elf_load_file((void *) fileInfo.addr_data, &ofw_addr, + NULL, flush_cache); ofw_start = (void (*)(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t)) &ofw_addr; @@ -279,6 +281,7 @@ early_c_entry(uint64_t start_addr) * non-ePAPR-compliant firmware * r7 = implementation dependent */ + asm volatile("isync; sync;" : : : "memory"); ofw_start(0, romfs_base, 0, 0, 0); // never return } |