qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 11/15] hw/riscv/boot.c: consolidate all kernel init in riscv_


From: Bin Meng
Subject: Re: [PATCH 11/15] hw/riscv/boot.c: consolidate all kernel init in riscv_load_kernel()
Date: Fri, 23 Dec 2022 20:55:10 +0800

On Thu, Dec 22, 2022 at 2:29 AM Daniel Henrique Barboza
<dbarboza@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 <palmer@dabbelt.com>
> Signed-off-by: Daniel Henrique Barboza <dbarboza@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 <bmeng@tinylab.org>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]