OSDN Git Service

hw/riscv: write bootargs 'chosen' FDT after riscv_load_kernel()
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>
Mon, 2 Jan 2023 11:52:37 +0000 (08:52 -0300)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 20 Jan 2023 00:14:13 +0000 (10:14 +1000)
commitb1f19f238cae53b5c90085db45e0335af19f5387
treedfd7252eb97cff291d0f04fa5e69258068ae25c2
parentb9a65476cbfc7a47a5c06ffdd58922fd295c5027
hw/riscv: write bootargs 'chosen' FDT after riscv_load_kernel()

The sifive_u, spike and virt machines are writing the 'bootargs' FDT
node during their respective create_fdt().

Given that bootargs is written only when '-append' is used, and this
option is only allowed with the '-kernel' option, which in turn is
already being check before executing riscv_load_kernel(), write
'bootargs' in the same code path as riscv_load_kernel().

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-8-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/riscv/sifive_u.c
hw/riscv/spike.c
hw/riscv/virt.c