qemu-e2k/include/hw/riscv
Daniel Henrique Barboza b9a65476cb hw/riscv: write initrd 'chosen' FDT inside riscv_load_initrd()
riscv_load_initrd() returns the initrd end addr while also writing a
'start' var to mark the addr start. These informations are being used
just to write the initrd FDT node. Every existing caller of
riscv_load_initrd() is writing the FDT in the same manner.

We can simplify things by writing the FDT inside riscv_load_initrd(),
sparing callers from having to manage start/end addrs to write the FDT
themselves.

An 'if (fdt)' check is already inserted at the end of the function
because we'll end up using it later on with other boards that doesn´t
have a FDT.

Cc: Palmer Dabbelt <palmer@dabbelt.com>
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230102115241.25733-7-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2023-01-20 10:14:13 +10:00
..
boot_opensbi.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
boot.h hw/riscv: write initrd 'chosen' FDT inside riscv_load_initrd() 2023-01-20 10:14:13 +10:00
microchip_pfsoc.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
numa.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
opentitan.h hw/riscv/opentitan: add aon_timer base unimpl 2023-01-06 10:42:55 +10:00
riscv_hart.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
shakti_c.h hw/intc: sifive_plic: Change "priority-base" to start from interrupt source 0 2023-01-06 10:42:55 +10:00
sifive_cpu.h riscv: Add a sifive_cpu.h to include both E and U cpu type defines 2019-09-17 08:42:46 -07:00
sifive_e.h hw/intc: sifive_plic: Change "priority-base" to start from interrupt source 0 2023-01-06 10:42:55 +10:00
sifive_u.h hw/riscv/sifive_u: use 'fdt' from MachineState 2023-01-20 10:14:13 +10:00
spike.h hw/riscv/spike: use 'fdt' from MachineState 2023-01-20 10:14:13 +10:00
virt.h include: Include headers where needed 2023-01-08 01:54:22 -05:00