* [PATCH 0/2] Fixes for boot failures
@ 2026-01-20 15:33 Jamie Gibbons
2026-01-20 15:33 ` [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment Jamie Gibbons
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Jamie Gibbons @ 2026-01-20 15:33 UTC (permalink / raw)
To: u-boot
Cc: Conor Dooley, Valentina Fernandez Alanis, Tom Rini, Marek Vasut,
Simon Glass, Leo, Heinrich Schuchardt, Cyril Jean, jamie.gibbons
Hi all,
The following series includes two fixes for master causing boot failures on
Microchip's PolarFire SoC Icicle kit. The first fix is for "failed on
fdt_open_into for DTO" on dtbo application. This is an issue with overlay
alignment that is fixed with a oneline change in the fit-image.c. The second
fix is for a boot failure introduced at commit 217cf656e24
("dm: core: Default to using DEVRES outside of xPL"). The value of
CONFIG_SYS_MALLOC_F_LEN needed to be increased. Please see the individual
commits for a more comprehensive breakdown of the issues.
Thanks,
Jamie.
Jamie Gibbons (2):
boot: Fix dtbo application by ensuring overlay alignment
configs: microchip_mpfs_generic: fix boot failure
boot/image-fit.c | 2 +-
configs/microchip_mpfs_generic_defconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment 2026-01-20 15:33 [PATCH 0/2] Fixes for boot failures Jamie Gibbons @ 2026-01-20 15:33 ` Jamie Gibbons 2026-01-23 20:15 ` Tom Rini 2026-01-20 15:33 ` [PATCH 2/2] configs: microchip_mpfs_generic: fix boot failure Jamie Gibbons 2026-02-06 18:15 ` (subset) [PATCH 0/2] Fixes for boot failures Tom Rini 2 siblings, 1 reply; 8+ messages in thread From: Jamie Gibbons @ 2026-01-20 15:33 UTC (permalink / raw) To: u-boot Cc: Conor Dooley, Valentina Fernandez Alanis, Tom Rini, Marek Vasut, Simon Glass, Leo, Heinrich Schuchardt, Cyril Jean, jamie.gibbons After U-Boot's DTC/libfdt update, device tree overlay application could fail with FDT_ERR_ALIGNMENT due to the overlay DTBO being loaded at a misaligned address. Change the FIT image loader option in image-fit.c from FIT_LOAD_IGNORED to FIT_LOAD_OPTIONAL_NON_ZERO, to ensure overlays are loaded at properly aligned addresses and any alignment errors are resolved. Tested on: PolarFire SoC Icicle Kit Fixes: 0535e46d55d ("scripts/dtc: Update to upstream version v1.7.2-35-g52f07dcca47c") Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com> --- boot/image-fit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/image-fit.c b/boot/image-fit.c index 2d040e38d97..3a327d07784 100644 --- a/boot/image-fit.c +++ b/boot/image-fit.c @@ -2481,7 +2481,7 @@ int boot_get_fdt_fit(struct bootm_headers *images, ulong addr, addr, &uname, &uconfig, arch, IH_TYPE_FLATDT, BOOTSTAGE_ID_FIT_FDT_START, - FIT_LOAD_IGNORED, &ovload, &ovlen); + FIT_LOAD_OPTIONAL_NON_ZERO, &ovload, &ovlen); if (ov_noffset < 0) { printf("load of %s failed\n", uname); continue; -- 2.43.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment 2026-01-20 15:33 ` [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment Jamie Gibbons @ 2026-01-23 20:15 ` Tom Rini 2026-01-27 10:26 ` Jamie.Gibbons 0 siblings, 1 reply; 8+ messages in thread From: Tom Rini @ 2026-01-23 20:15 UTC (permalink / raw) To: Jamie Gibbons Cc: u-boot, Conor Dooley, Valentina Fernandez Alanis, Marek Vasut, Simon Glass, Leo, Heinrich Schuchardt, Cyril Jean [-- Attachment #1: Type: text/plain, Size: 1516 bytes --] On Tue, Jan 20, 2026 at 03:33:12PM +0000, Jamie Gibbons wrote: > After U-Boot's DTC/libfdt update, device tree overlay application could > fail with FDT_ERR_ALIGNMENT due to the overlay DTBO being loaded at a > misaligned address. Change the FIT image loader option in image-fit.c > from FIT_LOAD_IGNORED to FIT_LOAD_OPTIONAL_NON_ZERO, to ensure overlays > are loaded at properly aligned addresses and any alignment errors are > resolved. > > Tested on: PolarFire SoC Icicle Kit > > Fixes: 0535e46d55d ("scripts/dtc: Update to upstream version v1.7.2-35-g52f07dcca47c") > Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com> > --- > boot/image-fit.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/boot/image-fit.c b/boot/image-fit.c > index 2d040e38d97..3a327d07784 100644 > --- a/boot/image-fit.c > +++ b/boot/image-fit.c > @@ -2481,7 +2481,7 @@ int boot_get_fdt_fit(struct bootm_headers *images, ulong addr, > addr, &uname, &uconfig, > arch, IH_TYPE_FLATDT, > BOOTSTAGE_ID_FIT_FDT_START, > - FIT_LOAD_IGNORED, &ovload, &ovlen); > + FIT_LOAD_OPTIONAL_NON_ZERO, &ovload, &ovlen); > if (ov_noffset < 0) { > printf("load of %s failed\n", uname); > continue; After talking with Marek about this more, we think this is the wrong approach. Can you please try dropping the load_op test from 8fbcc0e0e839 and seeing if that also fixes your problem? If so, please post a patch with that and a Fixes tag, thanks! -- Tom [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment 2026-01-23 20:15 ` Tom Rini @ 2026-01-27 10:26 ` Jamie.Gibbons 2026-01-27 14:55 ` Tom Rini 0 siblings, 1 reply; 8+ messages in thread From: Jamie.Gibbons @ 2026-01-27 10:26 UTC (permalink / raw) To: trini Cc: Valentina.FernandezAlanis, xypron.glpk, Conor.Dooley, Cyril.Jean, sjg, u-boot, marek.vasut+renesas, ycliang Hi Tom, On Fri, 2026-01-23 at 14:15 -0600, Tom Rini wrote: > On Tue, Jan 20, 2026 at 03:33:12PM +0000, Jamie Gibbons wrote: > > > After U-Boot's DTC/libfdt update, device tree overlay application > > could > > fail with FDT_ERR_ALIGNMENT due to the overlay DTBO being loaded at > > a > > misaligned address. Change the FIT image loader option in image- > > fit.c > > from FIT_LOAD_IGNORED to FIT_LOAD_OPTIONAL_NON_ZERO, to ensure > > overlays > > are loaded at properly aligned addresses and any alignment errors > > are > > resolved. > > > > Tested on: PolarFire SoC Icicle Kit > > > > Fixes: 0535e46d55d ("scripts/dtc: Update to upstream version > > v1.7.2-35-g52f07dcca47c") > > Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com> > > --- > > boot/image-fit.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/boot/image-fit.c b/boot/image-fit.c > > index 2d040e38d97..3a327d07784 100644 > > --- a/boot/image-fit.c > > +++ b/boot/image-fit.c > > @@ -2481,7 +2481,7 @@ int boot_get_fdt_fit(struct bootm_headers > > *images, ulong addr, > > addr, &uname, &uconfig, > > arch, IH_TYPE_FLATDT, > > BOOTSTAGE_ID_FIT_FDT_START, > > - FIT_LOAD_IGNORED, &ovload, &ovlen); > > + FIT_LOAD_OPTIONAL_NON_ZERO, &ovload, > > &ovlen); > > if (ov_noffset < 0) { > > printf("load of %s failed\n", uname); > > continue; > > After talking with Marek about this more, we think this is the wrong > approach. Can you please try dropping the load_op test from > 8fbcc0e0e839 > and seeing if that also fixes your problem? If so, please post a > patch > with that and a Fixes tag, thanks! > Dropping the load_op test added in commit 8fbcc0e0e839 does not solve the issue - failed on fdt_open_into for DTO due to misalignment of ov. Regards, Jamie. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment 2026-01-27 10:26 ` Jamie.Gibbons @ 2026-01-27 14:55 ` Tom Rini 2026-02-06 15:04 ` Jamie.Gibbons 0 siblings, 1 reply; 8+ messages in thread From: Tom Rini @ 2026-01-27 14:55 UTC (permalink / raw) To: Jamie.Gibbons Cc: Valentina.FernandezAlanis, xypron.glpk, Conor.Dooley, Cyril.Jean, sjg, u-boot, marek.vasut+renesas, ycliang [-- Attachment #1: Type: text/plain, Size: 2255 bytes --] On Tue, Jan 27, 2026 at 10:26:33AM +0000, Jamie.Gibbons@microchip.com wrote: > Hi Tom, > > On Fri, 2026-01-23 at 14:15 -0600, Tom Rini wrote: > > On Tue, Jan 20, 2026 at 03:33:12PM +0000, Jamie Gibbons wrote: > > > > > After U-Boot's DTC/libfdt update, device tree overlay application > > > could > > > fail with FDT_ERR_ALIGNMENT due to the overlay DTBO being loaded at > > > a > > > misaligned address. Change the FIT image loader option in image- > > > fit.c > > > from FIT_LOAD_IGNORED to FIT_LOAD_OPTIONAL_NON_ZERO, to ensure > > > overlays > > > are loaded at properly aligned addresses and any alignment errors > > > are > > > resolved. > > > > > > Tested on: PolarFire SoC Icicle Kit > > > > > > Fixes: 0535e46d55d ("scripts/dtc: Update to upstream version > > > v1.7.2-35-g52f07dcca47c") > > > Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com> > > > --- > > > boot/image-fit.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/boot/image-fit.c b/boot/image-fit.c > > > index 2d040e38d97..3a327d07784 100644 > > > --- a/boot/image-fit.c > > > +++ b/boot/image-fit.c > > > @@ -2481,7 +2481,7 @@ int boot_get_fdt_fit(struct bootm_headers > > > *images, ulong addr, > > > addr, &uname, &uconfig, > > > arch, IH_TYPE_FLATDT, > > > BOOTSTAGE_ID_FIT_FDT_START, > > > - FIT_LOAD_IGNORED, &ovload, &ovlen); > > > + FIT_LOAD_OPTIONAL_NON_ZERO, &ovload, > > > &ovlen); > > > if (ov_noffset < 0) { > > > printf("load of %s failed\n", uname); > > > continue; > > > > After talking with Marek about this more, we think this is the wrong > > approach. Can you please try dropping the load_op test from > > 8fbcc0e0e839 > > and seeing if that also fixes your problem? If so, please post a > > patch > > with that and a Fixes tag, thanks! > > > Dropping the load_op test added in commit 8fbcc0e0e839 does not solve > the issue - failed on fdt_open_into for DTO due to misalignment of ov. Ugh, darn. Is there another load_op check that can be removed to fix that case? If not, then we need to pass in a new flag that means that we always relocate the data. That was Marek's other suggestion as we talked this over. -- Tom [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment 2026-01-27 14:55 ` Tom Rini @ 2026-02-06 15:04 ` Jamie.Gibbons 0 siblings, 0 replies; 8+ messages in thread From: Jamie.Gibbons @ 2026-02-06 15:04 UTC (permalink / raw) To: trini Cc: Valentina.FernandezAlanis, xypron.glpk, Conor.Dooley, Cyril.Jean, sjg, u-boot, ycliang, marek.vasut+renesas Hi Tom, On Tue, 2026-01-27 at 08:55 -0600, Tom Rini wrote: > On Tue, Jan 27, 2026 at 10:26:33AM +0000, > Jamie.Gibbons@microchip.com wrote: > > Hi Tom, > > > > On Fri, 2026-01-23 at 14:15 -0600, Tom Rini wrote: > > > On Tue, Jan 20, 2026 at 03:33:12PM +0000, Jamie Gibbons wrote: > > > > > > > After U-Boot's DTC/libfdt update, device tree overlay > > > > application > > > > could > > > > fail with FDT_ERR_ALIGNMENT due to the overlay DTBO being > > > > loaded at > > > > a > > > > misaligned address. Change the FIT image loader option in > > > > image- > > > > fit.c > > > > from FIT_LOAD_IGNORED to FIT_LOAD_OPTIONAL_NON_ZERO, to ensure > > > > overlays > > > > are loaded at properly aligned addresses and any alignment > > > > errors > > > > are > > > > resolved. > > > > > > > > Tested on: PolarFire SoC Icicle Kit > > > > > > > > Fixes: 0535e46d55d ("scripts/dtc: Update to upstream version > > > > v1.7.2-35-g52f07dcca47c") > > > > Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com> > > > > --- > > > > boot/image-fit.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/boot/image-fit.c b/boot/image-fit.c > > > > index 2d040e38d97..3a327d07784 100644 > > > > --- a/boot/image-fit.c > > > > +++ b/boot/image-fit.c > > > > @@ -2481,7 +2481,7 @@ int boot_get_fdt_fit(struct bootm_headers > > > > *images, ulong addr, > > > > addr, &uname, &uconfig, > > > > arch, IH_TYPE_FLATDT, > > > > BOOTSTAGE_ID_FIT_FDT_START, > > > > - FIT_LOAD_IGNORED, &ovload, &ovlen); > > > > + FIT_LOAD_OPTIONAL_NON_ZERO, &ovload, > > > > &ovlen); > > > > if (ov_noffset < 0) { > > > > printf("load of %s failed\n", uname); > > > > continue; > > > > > > After talking with Marek about this more, we think this is the > > > wrong > > > approach. Can you please try dropping the load_op test from > > > 8fbcc0e0e839 > > > and seeing if that also fixes your problem? If so, please post a > > > patch > > > with that and a Fixes tag, thanks! > > > > > Dropping the load_op test added in commit 8fbcc0e0e839 does not > > solve > > the issue - failed on fdt_open_into for DTO due to misalignment of > > ov. > > Ugh, darn. Is there another load_op check that can be removed to fix > that case? If not, then we need to pass in a new flag that means that > we > always relocate the data. That was Marek's other suggestion as we > talked > this over. > Sorry for the delay in getting back to this. There is no other load_op check that fixes this as far as I can tell. I have tested an implementation of a new flag for this and it is working. I will send the patch and you can let me know if you have any feedback or further comments. Thanks, Jamie. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] configs: microchip_mpfs_generic: fix boot failure 2026-01-20 15:33 [PATCH 0/2] Fixes for boot failures Jamie Gibbons 2026-01-20 15:33 ` [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment Jamie Gibbons @ 2026-01-20 15:33 ` Jamie Gibbons 2026-02-06 18:15 ` (subset) [PATCH 0/2] Fixes for boot failures Tom Rini 2 siblings, 0 replies; 8+ messages in thread From: Jamie Gibbons @ 2026-01-20 15:33 UTC (permalink / raw) To: u-boot Cc: Conor Dooley, Valentina Fernandez Alanis, Tom Rini, Marek Vasut, Simon Glass, Leo, Heinrich Schuchardt, Cyril Jean, jamie.gibbons Recent changes to device resource management (DEVRES) increased early memory requirements during boot. The previous value was insufficient, resulting in boot failures. Increase CONFIG_SYS_MALLOC_F_LEN to provide enough early malloc pool for successful boot and device initialisation. Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com> --- configs/microchip_mpfs_generic_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/microchip_mpfs_generic_defconfig b/configs/microchip_mpfs_generic_defconfig index 22f67414a7c..973ed09fa87 100644 --- a/configs/microchip_mpfs_generic_defconfig +++ b/configs/microchip_mpfs_generic_defconfig @@ -1,6 +1,6 @@ CONFIG_RISCV=y CONFIG_SYS_MALLOC_LEN=0x800000 -CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SYS_MALLOC_F_LEN=0x2800 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_ENV_SIZE=0x2000 -- 2.43.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: (subset) [PATCH 0/2] Fixes for boot failures 2026-01-20 15:33 [PATCH 0/2] Fixes for boot failures Jamie Gibbons 2026-01-20 15:33 ` [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment Jamie Gibbons 2026-01-20 15:33 ` [PATCH 2/2] configs: microchip_mpfs_generic: fix boot failure Jamie Gibbons @ 2026-02-06 18:15 ` Tom Rini 2 siblings, 0 replies; 8+ messages in thread From: Tom Rini @ 2026-02-06 18:15 UTC (permalink / raw) To: u-boot, Jamie Gibbons Cc: Conor Dooley, Valentina Fernandez Alanis, Marek Vasut, Simon Glass, Leo, Heinrich Schuchardt, Cyril Jean On Tue, 20 Jan 2026 15:33:11 +0000, Jamie Gibbons wrote: > The following series includes two fixes for master causing boot failures on > Microchip's PolarFire SoC Icicle kit. The first fix is for "failed on > fdt_open_into for DTO" on dtbo application. This is an issue with overlay > alignment that is fixed with a oneline change in the fit-image.c. The second > fix is for a boot failure introduced at commit 217cf656e24 > ("dm: core: Default to using DEVRES outside of xPL"). The value of > CONFIG_SYS_MALLOC_F_LEN needed to be increased. Please see the individual > commits for a more comprehensive breakdown of the issues. > > [...] Applied to u-boot/master, thanks! [2/2] configs: microchip_mpfs_generic: fix boot failure commit: 2e6b5185bd509d5c39bbdf900bf6ac9c12f2ed59 -- Tom ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-02-06 18:15 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-01-20 15:33 [PATCH 0/2] Fixes for boot failures Jamie Gibbons 2026-01-20 15:33 ` [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment Jamie Gibbons 2026-01-23 20:15 ` Tom Rini 2026-01-27 10:26 ` Jamie.Gibbons 2026-01-27 14:55 ` Tom Rini 2026-02-06 15:04 ` Jamie.Gibbons 2026-01-20 15:33 ` [PATCH 2/2] configs: microchip_mpfs_generic: fix boot failure Jamie Gibbons 2026-02-06 18:15 ` (subset) [PATCH 0/2] Fixes for boot failures Tom Rini
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox