diff options
author | Zhuang, Siwei (Data61, Kensington NSW) | 2019-11-19 07:21:09 +0100 |
---|---|---|
committer | Palmer Dabbelt | 2019-11-25 21:34:52 +0100 |
commit | 6478dd745dca49d63250500cd1aeca1c41cd6f89 (patch) | |
tree | fbb21aee0c3a9399cab692e2921f8e8001d14a44 /include/hw/riscv/boot.h | |
parent | RISC-V: virt: This is a "sifive,test1" test finisher (diff) | |
download | qemu-6478dd745dca49d63250500cd1aeca1c41cd6f89.tar.gz qemu-6478dd745dca49d63250500cd1aeca1c41cd6f89.tar.xz qemu-6478dd745dca49d63250500cd1aeca1c41cd6f89.zip |
hw/riscv: Add optional symbol callback ptr to riscv_load_kernel()
This patch adds an optional function pointer, "sym_cb", to
riscv_load_kernel() which provides the possibility to access the symbol
table during kernel loading.
The pointer is ignored, if supplied with Image or uImage file.
The Spike board requires the access to locate the HTIF symbols.
Fixes: 0ac24d56c5e7 ("hw/riscv: Split out the boot functions")
Buglink: https://bugs.launchpad.net/qemu/+bug/1835827
Signed-off-by: Siwei Zhuang <siwei.zhuang@data61.csiro.au>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'include/hw/riscv/boot.h')
-rw-r--r-- | include/hw/riscv/boot.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hw/riscv/boot.h b/include/hw/riscv/boot.h index 66075d0e57..df80051fbc 100644 --- a/include/hw/riscv/boot.h +++ b/include/hw/riscv/boot.h @@ -28,7 +28,8 @@ void riscv_find_and_load_firmware(MachineState *machine, char *riscv_find_firmware(const char *firmware_filename); target_ulong riscv_load_firmware(const char *firmware_filename, hwaddr firmware_load_addr); -target_ulong riscv_load_kernel(const char *kernel_filename); +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, uint64_t kernel_entry, hwaddr *start); |