]> git.proxmox.com Git - mirror_qemu.git/commit
hw/riscv: Add optional symbol callback ptr to riscv_load_kernel()
authorZhuang, Siwei (Data61, Kensington NSW) <Siwei.Zhuang@data61.csiro.au>
Tue, 19 Nov 2019 06:21:09 +0000 (06:21 +0000)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Mon, 25 Nov 2019 20:34:52 +0000 (12:34 -0800)
commit6478dd745dca49d63250500cd1aeca1c41cd6f89
treefbb21aee0c3a9399cab692e2921f8e8001d14a44
parent9c0fb20c4bd50a99c3c6f6d515e05eaf8dd87fa4
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>
hw/riscv/boot.c
hw/riscv/sifive_e.c
hw/riscv/sifive_u.c
hw/riscv/spike.c
hw/riscv/virt.c
include/hw/riscv/boot.h