qemu/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.c hw/riscv: Respect firmware ELF entry point 2024-10-02 15:11:51 +10:00
Kconfig kconfig: express dependency of individual boards on libfdt 2024-05-10 15:45:15 +02:00
meson.build meson: pick libfdt from common_ss when building target-specific files 2024-05-10 15:45:15 +02:00
microchip_pfsoc.c hw/riscv: Respect firmware ELF entry point 2024-10-02 15:11:51 +10:00
numa.c hw/riscv/numa.c: use g_autofree in socket_fdt_write_distance_matrix() 2024-02-09 20:43:14 +10:00
opentitan.c hw/riscv: Respect firmware ELF entry point 2024-10-02 15:11:51 +10:00
riscv_hart.c hw/riscv: hart: Add a new 'resetvec' property 2020-09-09 15:54:18 -07:00
shakti_c.c hw/riscv: Respect firmware ELF entry point 2024-10-02 15:11:51 +10:00
sifive_e.c riscv: Fix SiFive E CLINT clock frequency 2023-11-22 13:57:19 +10:00
sifive_u.c hw/riscv: Respect firmware ELF entry point 2024-10-02 15:11:51 +10:00
spike.c hw/riscv: Respect firmware ELF entry point 2024-10-02 15:11:51 +10:00
virt-acpi-build.c hw/riscv/virt-acpi-build.c: Update the HID of RISC-V UART 2024-07-22 20:15:42 -04:00
virt.c hw/riscv: Respect firmware ELF entry point 2024-10-02 15:11:51 +10:00