From 763eeecb30ed09cdfedbb811aacd19f24478afee Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Sun, 3 Nov 2019 12:24:48 +0100 Subject: arch/riscv: Use FDT from calling argument when using FIT Only FIT payloads provide their own FDT. Change-Id: Id08a12ad7b72ad539e934a133acf2c4a5bcdf1f9 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/36599 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/arch/riscv/boot.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/arch/riscv/boot.c b/src/arch/riscv/boot.c index 6a23b8a696..d3ae693376 100644 --- a/src/arch/riscv/boot.c +++ b/src/arch/riscv/boot.c @@ -38,20 +38,10 @@ static void do_arch_prog_run(struct arch_prog_run_args *args) { int hart_id; struct prog *prog = args->prog; - void *fdt = prog_entry_arg(prog); - - /* - * Workaround selfboot putting the coreboot table into prog_entry_arg - */ - if (prog_cbfs_type(prog) == CBFS_TYPE_SELF) - fdt = HLS()->fdt; - - /* - * If prog_entry_arg is not set (e.g. by fit_payload), use fdt from HLS - * instead. - */ - if (fdt == NULL) - fdt = HLS()->fdt; + void *fdt = HLS()->fdt; + + if (prog_cbfs_type(prog) == CBFS_TYPE_FIT) + fdt = prog_entry_arg(prog); if (ENV_RAMSTAGE && prog_type(prog) == PROG_PAYLOAD) { if (CONFIG(RISCV_OPENSBI)) -- cgit v1.2.3