qemu/include/hw/riscv
Samuel Holland 55c136599f hw/riscv: Respect firmware ELF entry point
When riscv_load_firmware() loads an ELF, the ELF segment addresses are
used, not the passed-in firmware_load_addr. The machine models assume
the firmware entry point is what they provided for firmware_load_addr,
and use that address to generate the boot ROM, so if the ELF is linked
at any other address, the boot ROM will jump to empty memory.

Pass back the ELF entry point to use when generating the boot ROM, so
the boot ROM can jump to firmware loaded anywhere in RAM. For example,
on the virt machine, this allows using an OpenSBI fw_dynamic.elf built
with FW_TEXT_START values other than 0x80000000.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240817002651.3209701-1-samuel.holland@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2024-10-02 15:11:51 +10:00
..
boot_opensbi.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
boot.h hw/riscv: Respect firmware ELF entry point 2024-10-02 15:11:51 +10:00
microchip_pfsoc.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
numa.h hw/riscv: use ms->fdt in riscv_socket_fdt_write_distance_matrix() 2023-01-20 10:14:14 +10:00
opentitan.h hw/riscv/opentitan: Correct OpenTitanState parent type/size 2023-06-13 17:19:42 +10:00
riscv_hart.h riscv: spelling fixes 2023-09-08 13:08:52 +03:00
shakti_c.h hw/intc: sifive_plic: Change "priority-base" to start from interrupt source 0 2023-01-06 10:42:55 +10:00
sifive_cpu.h riscv: Add a sifive_cpu.h to include both E and U cpu type defines 2019-09-17 08:42:46 -07:00
sifive_e.h hw/riscv: sifive_e: Support the watchdog timer of HiFive 1 rev b. 2023-07-10 22:29:15 +10:00
sifive_u.h hw/riscv: Move the dtb load bits outside of create_fdt() 2023-03-01 17:19:14 -08:00
spike.h hw/riscv/spike: use 'fdt' from MachineState 2023-01-20 10:14:13 +10:00
virt.h hw/riscv/virt.c: add address-cells in create_fdt_one_aplic() 2024-06-26 22:32:29 +10:00