qemu-riscv
[Top][All Lists]
Advanced

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

Re: [PATCH v4 06/11] hw/riscv: write initrd 'chosen' FDT inside riscv_lo


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v4 06/11] hw/riscv: write initrd 'chosen' FDT inside riscv_load_initrd()
Date: Fri, 30 Dec 2022 13:52:14 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

On 29/12/22 19:11, Daniel Henrique Barboza wrote:
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>
---
  hw/riscv/boot.c            | 18 ++++++++++++------
  hw/riscv/microchip_pfsoc.c | 10 ++--------
  hw/riscv/sifive_u.c        | 10 ++--------
  hw/riscv/spike.c           | 10 ++--------
  hw/riscv/virt.c            | 10 ++--------
  include/hw/riscv/boot.h    |  4 ++--
  6 files changed, 22 insertions(+), 40 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

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