mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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
This commit is contained in:
parent
c407784291
commit
38bc4e34f2
7 changed files with 45 additions and 15 deletions
|
@ -114,7 +114,8 @@ static void sifive_e_machine_init(MachineState *machine)
|
|||
memmap[SIFIVE_E_DEV_MROM].base, &address_space_memory);
|
||||
|
||||
if (machine->kernel_filename) {
|
||||
riscv_load_kernel(machine->kernel_filename, NULL);
|
||||
riscv_load_kernel(machine->kernel_filename,
|
||||
memmap[SIFIVE_E_DEV_DTIM].base, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue