summaryrefslogtreecommitdiff
path: root/src/arch/riscv/boot.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-11-03 12:24:48 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-11-06 13:57:25 +0000
commit763eeecb30ed09cdfedbb811aacd19f24478afee (patch)
tree9004843d15858d7e8b639a769b1ccc640b96b096 /src/arch/riscv/boot.c
parentc01d0920bb75e0b2849c26421be0a3fac6bc6198 (diff)
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 <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36599 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch/riscv/boot.c')
-rw-r--r--src/arch/riscv/boot.c18
1 files 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))