On Thu, Dec 22, 2022 at 2:29 AM Daniel Henrique Barboza
<dbarb...@ventanamicro.com> wrote:
>
> The microchip_icicle_kit, sifive_u, spike and virt boards are now doing
> the same steps when '-kernel' is used:
>
> - execute load_kernel()
> - load init_rd()
> - write kernel_cmdline
>
> Let's fold everything inside riscv_load_kernel() to avoid code
> repetition. Every other board that uses riscv_load_kernel() will have
> this same behavior, including boards that doesn't have a valid FDT, so
> we need to take care to not do FDT operations without checking it first.
>
> Cc: Palmer Dabbelt <pal...@dabbelt.com>
> Signed-off-by: Daniel Henrique Barboza <dbarb...@ventanamicro.com>
> ---
>  hw/riscv/boot.c            | 21 ++++++++++++++++++---
>  hw/riscv/microchip_pfsoc.c |  9 ---------
>  hw/riscv/sifive_u.c        |  9 ---------
>  hw/riscv/spike.c           |  9 ---------
>  hw/riscv/virt.c            |  9 ---------
>  5 files changed, 18 insertions(+), 39 deletions(-)
>

Reviewed-by: Bin Meng <bm...@tinylab.org>

Reply via email to