hw/riscv: Load the kernel after the firmware
authorAlistair Francis <alistair.francis@wdc.com>
Wed, 14 Oct 2020 00:17:33 +0000 (17:17 -0700)
committerAlistair Francis <alistair.francis@wdc.com>
Thu, 22 Oct 2020 19:00:22 +0000 (12:00 -0700)
commit38bc4e34f29b913d28a8d2abcf2bf74a4a4a816e
treeb32fdca754d2b62043f812157b1a199075fca2fc
parentc40778429157afbd9ba2236f1e06ca24d980cdfe
hw/riscv: Load the kernel after the firmware

Instead of loading the kernel at a hardcoded start address, let's load
the kernel at the next aligned address after the end of the firmware.

This should have no impact for current users of OpenSBI, but will
allow loading a noMMU kernel at the start of memory.

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: 46c00c4f15b42feb792090e3d74359e180a6d954.1602634524.git.alistair.francis@wdc.com
hw/riscv/boot.c
hw/riscv/opentitan.c
hw/riscv/sifive_e.c
hw/riscv/sifive_u.c
hw/riscv/spike.c
hw/riscv/virt.c
include/hw/riscv/boot.h