diff options
author | Alistair Francis | 2020-10-14 02:17:28 +0200 |
---|---|---|
committer | Alistair Francis | 2020-10-22 21:00:22 +0200 |
commit | e66c531e13f8ba3d8b7f32719f7964ba1b185a23 (patch) | |
tree | baf40624644f08a45faee6f5b1c679caac2412e7 /include | |
parent | hw/riscv: sifive_u: Allow specifying the CPU (diff) | |
download | qemu-e66c531e13f8ba3d8b7f32719f7964ba1b185a23.tar.gz qemu-e66c531e13f8ba3d8b7f32719f7964ba1b185a23.tar.xz qemu-e66c531e13f8ba3d8b7f32719f7964ba1b185a23.zip |
hw/riscv: Return the end address of the loaded firmware
Instead of returning the unused entry address from riscv_load_firmware()
instead return the end address. Also return the end address from
riscv_find_and_load_firmware().
This tells the caller if a firmware was loaded and how big it is. This
can be used to determine the load address of the next image (usually the
kernel).
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Tested-by: Bin Meng <bin.meng@windriver.com>
Message-id: 558cf67162342d65a23262248b040563716628b2.1602634524.git.alistair.francis@wdc.com
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/riscv/boot.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/hw/riscv/boot.h b/include/hw/riscv/boot.h index 451338780a..0acbd8aa6e 100644 --- a/include/hw/riscv/boot.h +++ b/include/hw/riscv/boot.h @@ -23,10 +23,10 @@ #include "exec/cpu-defs.h" #include "hw/loader.h" -void riscv_find_and_load_firmware(MachineState *machine, - const char *default_machine_firmware, - hwaddr firmware_load_addr, - symbol_fn_t sym_cb); +target_ulong riscv_find_and_load_firmware(MachineState *machine, + const char *default_machine_firmware, + hwaddr firmware_load_addr, + symbol_fn_t sym_cb); char *riscv_find_firmware(const char *firmware_filename); target_ulong riscv_load_firmware(const char *firmware_filename, hwaddr firmware_load_addr, |