hw/riscv: Return the end address of the loaded firmware
commite66c531e13f8ba3d8b7f32719f7964ba1b185a23
authorAlistair Francis <alistair.francis@wdc.com>
Wed, 14 Oct 2020 00:17:28 +0000 (13 17:17 -0700)
committerAlistair Francis <alistair.francis@wdc.com>
Thu, 22 Oct 2020 19:00:22 +0000 (22 12:00 -0700)
treebaf40624644f08a45faee6f5b1c679caac2412e7
parent099be0358ee2cfb1cadf80d14297511215885219
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
hw/riscv/boot.c
include/hw/riscv/boot.h