Hi Caleb, On Fri, 28 Mar 2025 at 08:27, Caleb Connolly <[email protected]> wrote: > > > > On 3/28/25 11:44, Caleb Connolly wrote: > > Hi Raymond, > > > > On 3/28/25 00:13, Raymond Mao wrote: > >> When a bloblist is valid and contains fdt, it explicitly means > >> a previous boot stage is passing transfer list compliant with > >> Firmware Handoff specification, thus the fdt from bloblist should > >> not be overridden with the ones from board or env variables. > > Actually, I'm a little confused here. Can you point to the documentation > that says an FDT from a bloblist should always take priority? > > I can see why this makes sense to lock down, but clarification would be > good regardless. >
All the adaptations on bloblist are in order to make it compliant with the Firmware Handoff spec [1]. In the spec, all data being handed over between boot stages should be within a transfer list (aka. bloblist in U-Boot). So the logic is clear to me, when the bloblist contains a valid fdt, that explicitly means the previous boot stages are passing arguments following the Firmware Handoff spec, and U-Boot should follow the same way to pass them to the next stage - kernel. [1]: https://github.com/FirmwareHandoff/firmware_handoff Regards, Raymond > Kind regards, > >> > >> Fixes: 70fe23859437 ("fdt: Allow the devicetree to come from a bloblist") > >> Signed-off-by: Raymond Mao <[email protected]> > > > > Reviewed-by: Caleb Connolly <[email protected]> > >> --- > >> lib/fdtdec.c | 3 ++- > >> 1 file changed, 2 insertions(+), 1 deletion(-) > >> > >> diff --git a/lib/fdtdec.c b/lib/fdtdec.c > >> index f09c9926a7a..c38738b48c7 100644 > >> --- a/lib/fdtdec.c > >> +++ b/lib/fdtdec.c > >> @@ -1708,7 +1708,7 @@ int fdtdec_setup(void) > >> gd->fdt_src = FDTSRC_BLOBLIST; > >> log_debug("Devicetree is in bloblist at %p\n", > >> gd->fdt_blob); > >> - ret = 0; > >> + goto setup_fdt; > >> } else { > >> log_debug("No FDT found in bloblist\n"); > >> ret = -ENOENT; > >> @@ -1752,6 +1752,7 @@ int fdtdec_setup(void) > >> } > >> } > >> +setup_fdt: > >> if (CONFIG_IS_ENABLED(MULTI_DTB_FIT)) > >> setup_multi_dtb_fit(); > > > > -- > Caleb (they/them) >

