On Thu, Jul 2, 2020 at 2:39 AM Atish Patra <atish.pa...@wdc.com> wrote: > > OpenSBI is the default firmware in Qemu and has various firmware loading > options. Currently, qemu loader uses fw_jump which has a compile time > pre-defined address where fdt & kernel image must reside. This puts a > constraint on image size of the Linux kernel depending on the fdt location > and available memory. However, fw_dynamic allows the loader to specify > the next stage location (i.e. Linux kernel/U-Boot) in memory and other > configurable boot options available in OpenSBI. > > Add support for OpenSBI dynamic firmware loading support. This doesn't > break existing setup and fw_jump will continue to work as it is. Any > other firmware will continue to work without any issues as long as it > doesn't expect anything specific from loader in "a2" register. > > Signed-off-by: Atish Patra <atish.pa...@wdc.com> > Reviewed-by: Alistair Francis <alistair.fran...@wdc.com> > --- > hw/riscv/boot.c | 42 +++++++++++++++++++++--- > hw/riscv/sifive_u.c | 20 +++++++++--- > hw/riscv/spike.c | 13 ++++++-- > hw/riscv/virt.c | 12 +++++-- > include/hw/riscv/boot.h | 5 ++- > include/hw/riscv/boot_opensbi.h | 58 +++++++++++++++++++++++++++++++++ > 6 files changed, 134 insertions(+), 16 deletions(-) > create mode 100644 include/hw/riscv/boot_opensbi.h >
Reviewed-by: Bin Meng <bin.m...@windriver.com> Tested-by: Bin Meng <bin.m...@windriver.com>