mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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: 0ac24d56c5
("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>
This commit is contained in:
parent
9c0fb20c4b
commit
6478dd745d
6 changed files with 14 additions and 10 deletions
|
@ -344,7 +344,8 @@ static void riscv_sifive_u_init(MachineState *machine)
|
|||
memmap[SIFIVE_U_DRAM].base);
|
||||
|
||||
if (machine->kernel_filename) {
|
||||
uint64_t kernel_entry = riscv_load_kernel(machine->kernel_filename);
|
||||
uint64_t kernel_entry = riscv_load_kernel(machine->kernel_filename,
|
||||
NULL);
|
||||
|
||||
if (machine->initrd_filename) {
|
||||
hwaddr start;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue