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>
This commit is contained in:
parent
c01d0920bb
commit
763eeecb30
|
@ -38,20 +38,10 @@ static void do_arch_prog_run(struct arch_prog_run_args *args)
|
||||||
{
|
{
|
||||||
int hart_id;
|
int hart_id;
|
||||||
struct prog *prog = args->prog;
|
struct prog *prog = args->prog;
|
||||||
void *fdt = prog_entry_arg(prog);
|
void *fdt = HLS()->fdt;
|
||||||
|
|
||||||
/*
|
if (prog_cbfs_type(prog) == CBFS_TYPE_FIT)
|
||||||
* Workaround selfboot putting the coreboot table into prog_entry_arg
|
fdt = prog_entry_arg(prog);
|
||||||
*/
|
|
||||||
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;
|
|
||||||
|
|
||||||
if (ENV_RAMSTAGE && prog_type(prog) == PROG_PAYLOAD) {
|
if (ENV_RAMSTAGE && prog_type(prog) == PROG_PAYLOAD) {
|
||||||
if (CONFIG(RISCV_OPENSBI))
|
if (CONFIG(RISCV_OPENSBI))
|
||||||
|
|
Loading…
Reference in New Issue