loader: Allow a custom AddressSpace when loading ROMs

When loading ROMs allow the caller to specify an AddressSpace to use for
the load.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 85f86b94ea94879e7ce8b12e85ac8de26658f7eb.1474331683.git.alistair.francis@xilinx.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Alistair Francis 2016-09-22 18:13:08 +01:00 committed by Peter Maydell
parent d6ac342a48
commit 3e76099aac
3 changed files with 41 additions and 14 deletions

View file

@ -405,7 +405,7 @@ static int glue(load_elf, SZ)(const char *name, int fd,
snprintf(label, sizeof(label), "phdr #%d: %s", i, name);
/* rom_add_elf_program() seize the ownership of 'data' */
rom_add_elf_program(label, data, file_size, mem_size, addr);
rom_add_elf_program(label, data, file_size, mem_size, addr, NULL);
total_size += mem_size;
if (addr < low)