summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/riscv/boot.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/arch/riscv/boot.c b/src/arch/riscv/boot.c
index edf5295d79..8e4bb36af5 100644
--- a/src/arch/riscv/boot.c
+++ b/src/arch/riscv/boot.c
@@ -19,6 +19,7 @@
#include <arch/encoding.h>
#include <arch/smp/smp.h>
#include <mcall.h>
+#include <commonlib/cbfs_serialized.h>
/*
* A pointer to the Flattened Device Tree passed to coreboot by the boot ROM.
@@ -34,6 +35,12 @@ static void do_arch_prog_run(struct prog *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.
*/