diff options
author | Anup Patel | 2020-04-27 10:06:42 +0200 |
---|---|---|
committer | Alistair Francis | 2020-04-29 22:16:38 +0200 |
commit | 02777ac3036187077c98a05843d888b4be8c51b3 (patch) | |
tree | 2c7a7435574a8f924357d3b6a190f12a1861d80e /include/hw/riscv | |
parent | roms: opensbi: Upgrade from v0.6 to v0.7 (diff) | |
download | qemu-02777ac3036187077c98a05843d888b4be8c51b3.tar.gz qemu-02777ac3036187077c98a05843d888b4be8c51b3.tar.xz qemu-02777ac3036187077c98a05843d888b4be8c51b3.zip |
hw/riscv: Add optional symbol callback ptr to riscv_load_firmware()
This patch adds an optional function pointer, "sym_cb", to
riscv_load_firmware() which provides the possibility to access
the symbol table during kernel loading.
The pointer is ignored, if supplied with flat (non-elf) firmware image.
The Spike board requires it locate the HTIF symbols from firmware ELF
passed via "-bios" option.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200427080644.168461-2-anup.patel@wdc.com
Message-Id: <20200427080644.168461-2-anup.patel@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'include/hw/riscv')
-rw-r--r-- | include/hw/riscv/boot.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/hw/riscv/boot.h b/include/hw/riscv/boot.h index df80051fbc..474a940ad5 100644 --- a/include/hw/riscv/boot.h +++ b/include/hw/riscv/boot.h @@ -24,10 +24,12 @@ void riscv_find_and_load_firmware(MachineState *machine, const char *default_machine_firmware, - hwaddr firmware_load_addr); + hwaddr firmware_load_addr, + symbol_fn_t sym_cb); char *riscv_find_firmware(const char *firmware_filename); target_ulong riscv_load_firmware(const char *firmware_filename, - hwaddr firmware_load_addr); + hwaddr firmware_load_addr, + symbol_fn_t sym_cb); target_ulong riscv_load_kernel(const char *kernel_filename, symbol_fn_t sym_cb); hwaddr riscv_load_initrd(const char *filename, uint64_t mem_size, |