mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
hw/riscv: Add a new struct RISCVBootInfo
Add a new struct RISCVBootInfo to sync boot information between multiple boot functions. Signed-off-by: Jim Shu <jim.shu@sifive.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Message-ID: <20241120153935.24706-3-jim.shu@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
b4132a9e62
commit
d3592955af
8 changed files with 91 additions and 57 deletions
|
@ -81,6 +81,7 @@ static void opentitan_machine_init(MachineState *machine)
|
|||
OpenTitanState *s = OPENTITAN_MACHINE(machine);
|
||||
const MemMapEntry *memmap = ibex_memmap;
|
||||
MemoryRegion *sys_mem = get_system_memory();
|
||||
RISCVBootInfo boot_info;
|
||||
|
||||
if (machine->ram_size != mc->default_ram_size) {
|
||||
char *sz = size_to_str(mc->default_ram_size);
|
||||
|
@ -102,8 +103,9 @@ static void opentitan_machine_init(MachineState *machine)
|
|||
riscv_load_firmware(machine->firmware, &firmware_load_addr, NULL);
|
||||
}
|
||||
|
||||
riscv_boot_info_init(&boot_info, &s->soc.cpus);
|
||||
if (machine->kernel_filename) {
|
||||
riscv_load_kernel(machine, &s->soc.cpus,
|
||||
riscv_load_kernel(machine, &boot_info,
|
||||
memmap[IBEX_DEV_RAM].base,
|
||||
false, NULL);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue