Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36599 )
Change subject: arch/riscv: Make the setting of fdt calling argument more explicit ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/c/coreboot/+/36599/1/src/arch/riscv/boot.c File src/arch/riscv/boot.c:
https://review.coreboot.org/c/coreboot/+/36599/1/src/arch/riscv/boot.c@46 PS1, Line 46: if ((ENV_BOOTBLOCK || ENV_ROMSTAGE) && prog_cbfs_type(prog) == CBFS_TYPE_STAGE) `else if`
https://review.coreboot.org/c/coreboot/+/36599/1/src/arch/riscv/boot.c@52 PS1, Line 52: if (ENV_RAMSTAGE) { `else if`
otherwise, we'd overwrite `fdt` from the SELF case. Also what about RAMPAYLOAD? Couldn't that in theory be a FIT payload that is not loaded from ENV_RAMSTAGE?
https://review.coreboot.org/c/coreboot/+/36599/1/src/arch/riscv/boot.c@56 PS1, Line 56: } Alternative flow (I'm not sure of PROG_PAYLOAD is enough; other cases?):
void *fdt = NULL;
if (prog_type(prog) == PROG_PAYLOAD && prog_cbfs_type(prog) != CBFS_TYPE_SELF) { /* prog_entry_arg() may provide the FDT pointer. */ fdt = prog_entry_arg(prog); } if (fdt == NULL) fdt = HLS()->fdt;