Fixes for boot failures
cover Fixes for boot failures
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(-)
Signature · 1 line
2.43.0
PATCH 1/2 boot: Fix dtbo application by ensuring overlay alignment
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
--- boot/image-fit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
boot/image-fit.c +1 -1
@@ -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 ;
Signature · 1 line
2.43.0
Re: [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment
Quoted 20 lines · Jamie Gibbons
After U-Boot's DTC/libfdt update, device tree overlay application could fail with
FDT_ERR_ALIGNMENTdue to the overlay DTBO being loaded at a misaligned address. Change the FIT image loader option inimage-fit.cfromFIT_LOAD_IGNOREDtoFIT_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 <[email protected]>--- boot/image-fit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)boot/image-fit.c +0
-0
boot/image-fit.c int boot_get_fdt_fit(struct bootm_headers *images, ulong addr, · line 2487
Quoted 8 lines
boot/image-fit.c +1
-1@@ -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!
Signature · 1 line
Tom
Re: [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment
Hi Tom,
Quoted 37 lines · Tom Rini
Quoted 35 lines · Jamie Gibbons
After U-Boot's DTC/libfdt update, device tree overlay application could
fail withFDT_ERR_ALIGNMENTdue to the overlay DTBO being loaded at a
misaligned address. Change the FIT image loader option in image-fit.c
fromFIT_LOAD_IGNOREDtoFIT_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 versionv1.7.2-35-g52f07dcca47c")
Signed-off-by Jamie Gibbons <[email protected]>---
boot/image-fit.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)boot/image-fit.c +1
-1@@ -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);
Quoted 9 lines
Quoted 1 line
continue;
After talking with Marek about this more, we think this is the wrong approach. Can you please try dropping the
load_optest from8fbcc0e0e839
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.
Re: [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment
Quoted 49 lines · On Tue, Jan 27, 2026 at 10:26:33AM +0000, [email protected] wrote:
Hi Tom,
Quoted 37 lines · Tom Rini
Quoted 35 lines · Jamie Gibbons
After U-Boot's DTC/libfdt update, device tree overlay application could
fail withFDT_ERR_ALIGNMENTdue to the overlay DTBO being loaded at a
misaligned address. Change the FIT image loader option in image-fit.c
fromFIT_LOAD_IGNOREDtoFIT_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 versionv1.7.2-35-g52f07dcca47c")
Signed-off-by Jamie Gibbons <[email protected]>---
boot/image-fit.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)boot/image-fit.c +1
-1@@ -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);Quoted 9 lines
Quoted 1 line
continue;
After talking with Marek about this more, we think this is the wrong approach. Can you please try dropping the
load_optest from8fbcc0e0e839
and seeing if that also fixes your problem? If so, please post a patch
with that and a Fixes tag, thanks!
Quoted 2 lines
Dropping the
load_optest added in commit8fbcc0e0e839does not solve the issue - failed onfdt_open_intofor 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.
Signature · 1 line
Tom
Re: [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment
Hi Tom,
Quoted 61 lines · Tom Rini
Quoted 54 lines · On Tue, Jan 27, 2026 at 10:26:33AM +0000, [email protected] wrote:
Hi Tom,
Quoted 43 lines · Tom Rini
Quoted 38 lines · Jamie Gibbons
After U-Boot's DTC/libfdt update, device tree overlay application
could
fail withFDT_ERR_ALIGNMENTdue to the overlay DTBO being loaded at
a
misaligned address. Change the FIT image loader option in image-fit.c
fromFIT_LOAD_IGNOREDtoFIT_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 versionv1.7.2-35-g52f07dcca47c")
Signed-off-by Jamie Gibbons <[email protected]>---
boot/image-fit.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)boot/image-fit.c +1
-1@@ -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) {Quoted 2 lines
printf("load of %s failed\n", uname); continue;Quoted 8 lines
After talking with Marek about this more, we think this is the wrong
approach. Can you please try dropping theload_optest from8fbcc0e0e839
and seeing if that also fixes your problem? If so, please post a patch
with that and a Fixes tag, thanks!Quoted 4 lines
Dropping the
load_optest added in commit8fbcc0e0e839does not solve
the issue - failed onfdt_open_intofor DTO due to misalignment of ov.
Quoted 7 lines
Ugh, darn. Is there another
load_opcheck 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.
PATCH 2/2 configs: microchip_mpfs_generic: fix boot failure
In reply to Jamie GibbonsRecent 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.
--- configs/microchip_mpfs_generic_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configs/microchip_mpfs_generic_defconfig +1 -1
@@ -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
Signature · 1 line
2.43.0
Re: (subset) [PATCH 0/2] Fixes for boot failures
In reply to Jamie GibbonsQuoted 10 lines · Jamie Gibbons
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_intofor DTO" on dtbo application. This is an issue with overlay alignment that is fixed with a oneline change in thefit-image.c. The second fix is for a boot failure introduced at commit217cf656e24
("dm: core: Default to using DEVRES outside of xPL"). The value ofCONFIG_SYS_MALLOC_F_LENneeded 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
Signature · 1 line
Tom