]> git.proxmox.com Git - mirror_qemu.git/commit
hw/riscv: spike: Decouple create_fdt() dependency to ELF loading
authorBin Meng <bmeng@tinylab.org>
Thu, 29 Dec 2022 10:31:23 +0000 (18:31 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 20 Jan 2023 00:14:13 +0000 (10:14 +1000)
commit71d68c48be96366fb89f7a2dd9d82dd86bcbe542
tree2448a7e94e4e6dfe5b8cc5fc0182da850e23b65b
parent8f6196266e607a4a014ef1a5ab05b93343f678df
hw/riscv: spike: Decouple create_fdt() dependency to ELF loading

At present create_fdt() calls htif_uses_elf_symbols() to determine
whether to insert a <reg> property for the HTIF. This unfortunately
creates a hidden dependency to riscv_load_{firmware,kernel} that
create_fdt() must be called after the ELF {firmware,kernel} image
has been loaded.

Decouple such dependency be adding a new parameter to create_fdt(),
whether custom HTIF base address is used. The flag will be set if
non ELF {firmware,kernel} image is given by user.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-Id: <20221229091828.1945072-13-bmeng@tinylab.org>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/char/riscv_htif.c
hw/riscv/spike.c
include/hw/char/riscv_htif.h