[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>
- Re: [PATCH 07/15] hw/riscv: write initrd 'chosen' FDT inside riscv_load_initrd(), (continued)
- [PATCH 08/15] hw/riscv: write bootargs 'chosen' FDT after riscv_load_kernel(), Daniel Henrique Barboza, 2022/12/21
- [PATCH 09/15] hw/riscv/boot.c: use MachineState in riscv_load_initrd(), Daniel Henrique Barboza, 2022/12/21
- [PATCH 10/15] hw/riscv/boot.c: use MachineState in riscv_load_kernel(), Daniel Henrique Barboza, 2022/12/21
- [PATCH 11/15] hw/riscv/boot.c: consolidate all kernel init in riscv_load_kernel(), Daniel Henrique Barboza, 2022/12/21
- Re: [PATCH 11/15] hw/riscv/boot.c: consolidate all kernel init in riscv_load_kernel(),
Bin Meng <=
- [PATCH 12/15] hw/riscv/boot.c: make riscv_load_initrd() static, Daniel Henrique Barboza, 2022/12/21
- [PATCH 13/15] hw/riscv/spike.c: simplify create_fdt(), Daniel Henrique Barboza, 2022/12/21
- [PATCH 14/15] hw/riscv/virt.c: simplify create_fdt(), Daniel Henrique Barboza, 2022/12/21
- [PATCH 15/15] hw/riscv/sifive_u: simplify create_fdt(), Daniel Henrique Barboza, 2022/12/21