U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] silent hangup when debugging lib/fdtdec.c
@ 2025-11-25 16:14 Alexander Feilke
  2025-11-25 16:35 ` Tom Rini
  0 siblings, 1 reply; 10+ messages in thread
From: Alexander Feilke @ 2025-11-25 16:14 UTC (permalink / raw)
  To: Simon Glass, Tom Rini; +Cc: u-boot, u-boot, Alexander Feilke

From: Alexander Feilke <alexander.feilke@ew.tq-group.com>

Description: U-Boot hangs silently during boot when enabling DEBUG in
lib/fdtdec.c

Not sure if its really a bug or rather a configuration issue on my side.

Minimal steps to reproduce: <see patch>

The hang is caused by `panic("FDT overlap");` later inside the if block.
(see `lib/fdtdec.c:1279` in `fdt_find_separate(void)`)

Additionally, no boot log can be seen because serial is initialized after
loading the devicetree in this boot stage (see `common/board_r.c:665` in
`initcall_run_r(void)`)

Tested on i.MX6 with configs for tqma6d_mba6 and other tq boards that aren't,
mainlined yet (tqma6ulx_mba6ul and tqma7d_mba7).

Any idea what to look for to fix this on our side?

Thanks in advance,
Alexander
---
 lib/fdtdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index c38738b48c7..0f2f7c948cd 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1257,7 +1257,7 @@ static void *fdt_find_separate(void)
 	/* FDT is at end of image */
 	fdt_blob = (ulong *)_end;
 
-	if (_DEBUG && !fdtdec_prepare_fdt(fdt_blob)) {
+	if (1 && !fdtdec_prepare_fdt(fdt_blob)) {
 		int stack_ptr;
 		const void *top = fdt_blob + fdt_totalsize(fdt_blob);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [BUG] silent hangup when debugging lib/fdtdec.c
  2025-11-25 16:14 Alexander Feilke
@ 2025-11-25 16:35 ` Tom Rini
  2025-11-26 10:41   ` alexander.feilke
  0 siblings, 1 reply; 10+ messages in thread
From: Tom Rini @ 2025-11-25 16:35 UTC (permalink / raw)
  To: Alexander Feilke; +Cc: Simon Glass, u-boot, u-boot

[-- Attachment #1: Type: text/plain, Size: 1586 bytes --]

On Tue, Nov 25, 2025 at 05:14:12PM +0100, Alexander Feilke wrote:

> From: Alexander Feilke <alexander.feilke@ew.tq-group.com>
> 
> Description: U-Boot hangs silently during boot when enabling DEBUG in
> lib/fdtdec.c
> 
> Not sure if its really a bug or rather a configuration issue on my side.
> 
> Minimal steps to reproduce: <see patch>
> 
> The hang is caused by `panic("FDT overlap");` later inside the if block.
> (see `lib/fdtdec.c:1279` in `fdt_find_separate(void)`)
> 
> Additionally, no boot log can be seen because serial is initialized after
> loading the devicetree in this boot stage (see `common/board_r.c:665` in
> `initcall_run_r(void)`)
> 
> Tested on i.MX6 with configs for tqma6d_mba6 and other tq boards that aren't,
> mainlined yet (tqma6ulx_mba6ul and tqma7d_mba7).
> 
> Any idea what to look for to fix this on our side?
> 
> Thanks in advance,
> Alexander
> ---
>  lib/fdtdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/fdtdec.c b/lib/fdtdec.c
> index c38738b48c7..0f2f7c948cd 100644
> --- a/lib/fdtdec.c
> +++ b/lib/fdtdec.c
> @@ -1257,7 +1257,7 @@ static void *fdt_find_separate(void)
>  	/* FDT is at end of image */
>  	fdt_blob = (ulong *)_end;
>  
> -	if (_DEBUG && !fdtdec_prepare_fdt(fdt_blob)) {
> +	if (1 && !fdtdec_prepare_fdt(fdt_blob)) {
>  		int stack_ptr;
>  		const void *top = fdt_blob + fdt_totalsize(fdt_blob);
>  

For very early failures you might need to look at enabling DEBUG_UART
which wires in a more direct "just write this to serial port".

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] silent hangup when debugging  lib/fdtdec.c
  2025-11-25 16:35 ` Tom Rini
@ 2025-11-26 10:41   ` alexander.feilke
  2025-11-26 14:56     ` Tom Rini
  0 siblings, 1 reply; 10+ messages in thread
From: alexander.feilke @ 2025-11-26 10:41 UTC (permalink / raw)
  To: Tom Rini; +Cc: Simon Glass, u-boot, u-boot

On Tuesday, November 25, 2025 17:35 CET, Tom Rini <trini@konsulko.com> wrote:

> On Tue, Nov 25, 2025 at 05:14:12PM +0100, Alexander Feilke wrote:
> 
> > From: Alexander Feilke <alexander.feilke@ew.tq-group.com>
> > 
> > Description: U-Boot hangs silently during boot when enabling DEBUG in
> > lib/fdtdec.c
> > 
> > Not sure if its really a bug or rather a configuration issue on my side.
> > 
> > Minimal steps to reproduce: <see patch>
> > 
> > The hang is caused by `panic("FDT overlap");` later inside the if block.
> > (see `lib/fdtdec.c:1279` in `fdt_find_separate(void)`)
> > 
> > Additionally, no boot log can be seen because serial is initialized after
> > loading the devicetree in this boot stage (see `common/board_r.c:665` in
> > `initcall_run_r(void)`)
> > 
> > Tested on i.MX6 with configs for tqma6d_mba6 and other tq boards that aren't,
> > mainlined yet (tqma6ulx_mba6ul and tqma7d_mba7).
> > 
> > Any idea what to look for to fix this on our side?
> > 
> > Thanks in advance,
> > Alexander
> 
> For very early failures you might need to look at enabling DEBUG_UART
> which wires in a more direct "just write this to serial port".
> 
> -- 
> Tom

Thanks for pointing that out. The debug log shows that the global data is
still located in the SRAM after relocation.
Printing all variables involved in the panic condition shows, that the stack
pointer also overflowed, so there appear to be two separate issues.

if (top > (void *)gd || top > (void *)&stack_ptr) {

including top, sp and sys_init_sp_addr for completeness:

<debug_uart>
FDT 8789d3a0 gd 0091de40
top 878a7aa8 sp 878543e7
sys_init_sp_addr 0091ff20
FDT overlap
resetting ...
System reset not supported on this platform
### ERROR ### Please RESET the board ###


Note: I don't use CUSTOM_SYS_INIT_SP_ADDR so the default is used. GENERATED_GBL_DATA_SIZE is 0xe0

#define SYS_INIT_SP_ADDR	(CFG_SYS_INIT_RAM_ADDR + CFG_SYS_INIT_RAM_SIZE
 - GENERATED_GBL_DATA_SIZE)
#define CFG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
#define CFG_SYS_INIT_RAM_SIZE	IRAM_SIZE

Do you have any idea how to address these two problems?

Alexander


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] silent hangup when debugging lib/fdtdec.c
  2025-11-26 10:41   ` alexander.feilke
@ 2025-11-26 14:56     ` Tom Rini
  2025-11-27 12:32       ` alexander.feilke
  0 siblings, 1 reply; 10+ messages in thread
From: Tom Rini @ 2025-11-26 14:56 UTC (permalink / raw)
  To: alexander.feilke@ew.tq-group.com
  Cc: Simon Glass, u-boot, u-boot, Fabio Estevam

[-- Attachment #1: Type: text/plain, Size: 2593 bytes --]

On Wed, Nov 26, 2025 at 11:41:14AM +0100, alexander.feilke@ew.tq-group.com wrote:
> On Tuesday, November 25, 2025 17:35 CET, Tom Rini <trini@konsulko.com> wrote:
> 
> > On Tue, Nov 25, 2025 at 05:14:12PM +0100, Alexander Feilke wrote:
> > 
> > > From: Alexander Feilke <alexander.feilke@ew.tq-group.com>
> > > 
> > > Description: U-Boot hangs silently during boot when enabling DEBUG in
> > > lib/fdtdec.c
> > > 
> > > Not sure if its really a bug or rather a configuration issue on my side.
> > > 
> > > Minimal steps to reproduce: <see patch>
> > > 
> > > The hang is caused by `panic("FDT overlap");` later inside the if block.
> > > (see `lib/fdtdec.c:1279` in `fdt_find_separate(void)`)
> > > 
> > > Additionally, no boot log can be seen because serial is initialized after
> > > loading the devicetree in this boot stage (see `common/board_r.c:665` in
> > > `initcall_run_r(void)`)
> > > 
> > > Tested on i.MX6 with configs for tqma6d_mba6 and other tq boards that aren't,
> > > mainlined yet (tqma6ulx_mba6ul and tqma7d_mba7).
> > > 
> > > Any idea what to look for to fix this on our side?
> > > 
> > > Thanks in advance,
> > > Alexander
> > 
> > For very early failures you might need to look at enabling DEBUG_UART
> > which wires in a more direct "just write this to serial port".
> > 
> > -- 
> > Tom
> 
> Thanks for pointing that out. The debug log shows that the global data is
> still located in the SRAM after relocation.
> Printing all variables involved in the panic condition shows, that the stack
> pointer also overflowed, so there appear to be two separate issues.
> 
> if (top > (void *)gd || top > (void *)&stack_ptr) {
> 
> including top, sp and sys_init_sp_addr for completeness:
> 
> <debug_uart>
> FDT 8789d3a0 gd 0091de40
> top 878a7aa8 sp 878543e7
> sys_init_sp_addr 0091ff20
> FDT overlap
> resetting ...
> System reset not supported on this platform
> ### ERROR ### Please RESET the board ###
> 
> 
> Note: I don't use CUSTOM_SYS_INIT_SP_ADDR so the default is used. GENERATED_GBL_DATA_SIZE is 0xe0
> 
> #define SYS_INIT_SP_ADDR	(CFG_SYS_INIT_RAM_ADDR + CFG_SYS_INIT_RAM_SIZE
>  - GENERATED_GBL_DATA_SIZE)
> #define CFG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
> #define CFG_SYS_INIT_RAM_SIZE	IRAM_SIZE
> 
> Do you have any idea how to address these two problems?

Are there similar configs upstream? I know that imx6 is not generally
broken, I boot my mx6cuboxi on current next (and master recently) and
it's not failing like that, for example. Also, adding in one of the imx
custodians..

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] silent hangup when debugging  lib/fdtdec.c
  2025-11-26 14:56     ` Tom Rini
@ 2025-11-27 12:32       ` alexander.feilke
  2025-11-27 14:02         ` Fabio Estevam
  0 siblings, 1 reply; 10+ messages in thread
From: alexander.feilke @ 2025-11-27 12:32 UTC (permalink / raw)
  To: Tom Rini; +Cc: Simon Glass, u-boot, u-boot, Fabio Estevam

On Wednesday, November 26, 2025 15:56 CET, Tom Rini <trini@konsulko.com> wrote:
> On Wed, Nov 26, 2025 at 11:41:14AM +0100, alexander.feilke@ew.tq-group.com wrote:
> > On Tuesday, November 25, 2025 17:35 CET, Tom Rini <trini@konsulko.com> wrote:
> > 
> > > On Tue, Nov 25, 2025 at 05:14:12PM +0100, Alexander Feilke wrote:
> > > 
> > > > From: Alexander Feilke <alexander.feilke@ew.tq-group.com>
> > > > 
> > > > Description: U-Boot hangs silently during boot when enabling DEBUG in
> > > > lib/fdtdec.c
> > > > 
> > > > Not sure if its really a bug or rather a configuration issue on my side.
> > > > 
> > > > Minimal steps to reproduce: <see patch>
> > > > 
> > > > The hang is caused by `panic("FDT overlap");` later inside the if block.
> > > > (see `lib/fdtdec.c:1279` in `fdt_find_separate(void)`)
> > > > 
> > > > Additionally, no boot log can be seen because serial is initialized after
> > > > loading the devicetree in this boot stage (see `common/board_r.c:665` in
> > > > `initcall_run_r(void)`)
> > > > 
> > > > Tested on i.MX6 with configs for tqma6d_mba6 and other tq boards that aren't,
> > > > mainlined yet (tqma6ulx_mba6ul and tqma7d_mba7).
> > > > 
> > > > Any idea what to look for to fix this on our side?
> > > > 
> > > > Thanks in advance,
> > > > Alexander
> > > 
> > > For very early failures you might need to look at enabling DEBUG_UART
> > > which wires in a more direct "just write this to serial port".
> > > 
> > > -- 
> > > Tom
> > 
> > Thanks for pointing that out. The debug log shows that the global data is
> > still located in the SRAM after relocation.
> > Printing all variables involved in the panic condition shows, that the stack
> > pointer also overflowed, so there appear to be two separate issues.
> > 
> > if (top > (void *)gd || top > (void *)&stack_ptr) {
> > 
> > including top, sp and sys_init_sp_addr for completeness:
> > 
> > <debug_uart>
> > FDT 8789d3a0 gd 0091de40
> > top 878a7aa8 sp 878543e7
> > sys_init_sp_addr 0091ff20
> > FDT overlap
> > resetting ...
> > System reset not supported on this platform
> > ### ERROR ### Please RESET the board ###
> > 
> > 
> > Note: I don't use CUSTOM_SYS_INIT_SP_ADDR so the default is used. GENERATED_GBL_DATA_SIZE is 0xe0
> > 
> > #define SYS_INIT_SP_ADDR	(CFG_SYS_INIT_RAM_ADDR + CFG_SYS_INIT_RAM_SIZE
> >  - GENERATED_GBL_DATA_SIZE)
> > #define CFG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
> > #define CFG_SYS_INIT_RAM_SIZE	IRAM_SIZE
> > 
> > Do you have any idea how to address these two problems?
> 
> Are there similar configs upstream? I know that imx6 is not generally
> broken, I boot my mx6cuboxi on current next (and master recently) and
> it's not failing like that, for example. Also, adding in one of the imx
> custodians..
> 
> -- 
> Tom

I can reproduce this with a build from master with our upstream tqma6q_mba6_mmc_defconfig, after integrating debug uart:

<debug_uart>
FDT 4fc78990 gd 0093de20
top 4fc836c0 sp 4fc00000
sys_init_sp_addr 0093ff10
gbl_data_size 000000f0
FDT overlap
resetting ...

I also have a mx7dsabresd but I cannot bring it to boot with a master build unfortunately.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] silent hangup when debugging lib/fdtdec.c
  2025-11-27 12:32       ` alexander.feilke
@ 2025-11-27 14:02         ` Fabio Estevam
  0 siblings, 0 replies; 10+ messages in thread
From: Fabio Estevam @ 2025-11-27 14:02 UTC (permalink / raw)
  To: alexander.feilke@ew.tq-group.com; +Cc: Tom Rini, Simon Glass, u-boot, u-boot

On Thu, Nov 27, 2025 at 9:33 AM alexander.feilke@ew.tq-group.com
<alexander.feilke@ew.tq-group.com> wrote:

> I also have a mx7dsabresd but I cannot bring it to boot with a master build unfortunately.

Just tested booting the top-of-tree U-Boot on a mx7dsabresd and it boots:

U-Boot 2026.01-rc3-00004-g0ae3dc6809ff (Nov 27 2025 - 11:00:04 -0300)

CPU:   Freescale i.MX7D rev1.0 1000 MHz (running at 792 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 36C
Reset cause: POR
Model: Freescale i.MX7 SabreSD Board
Board: i.MX7D SABRESD in non-secure mode
DRAM:  1 GiB
Core:  107 devices, 21 uclasses, devicetree: separate
WDT:   Started watchdog@30280000 with servicing every 1000ms (128s timeout)
PMIC: PFUZE3000 DEV_ID=0x30 REV_ID=0x10
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... Reading from MMC(0)... OK
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated
Net:   eth0: ethernet@30be0000
Hit any key to stop autoboot: 0
=>

>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] silent hangup when debugging  lib/fdtdec.c
@ 2025-11-27 15:50 alexander.feilke
  2025-12-10  8:33 ` alexander.feilke
  2026-01-13  8:52 ` alexander.feilke
  0 siblings, 2 replies; 10+ messages in thread
From: alexander.feilke @ 2025-11-27 15:50 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Tom Rini, Simon Glass, u-boot, u-boot

On Thursday, November 27, 2025 15:02 CET, Fabio Estevam <festevam@gmail.com> wrote:
> On Thu, Nov 27, 2025 at 9:33 AM alexander.feilke@ew.tq-group.com
> <alexander.feilke@ew.tq-group.com> wrote:
> 
> > I also have a mx7dsabresd but I cannot bring it to boot with a master build unfortunately.
> 
> Just tested booting the top-of-tree U-Boot on a mx7dsabresd and it boots:
> 

Thanks! When using 0ae3dc6809ff like you I can boot and reproduce the hangup issue on mx7dsabresd:

<debug_uart>
FDT 8787da38 gd 0091de20
top 87887538 sp 87800000
sys_init_sp_addr 0091ff10
gbl_data_size 000000f0
FDT overlap
resetting ...
System reset not supported on this platform
### ERROR ### Please RESET the board ###

This is the patch that enables debug uart and demonstrates the issue:

From 9ee6e3244f15c8a1d9cb86130186cc9f221721c6 Mon Sep 17 00:00:00 2001
From: Alexander Feilke <alexander.feilke@ew.tq-group.com>
Date: Thu, 27 Nov 2025 16:47:23 +0100

Signed-off-by: Alexander Feilke <alexander.feilke@ew.tq-group.com>
---
 board/freescale/mx7dsabresd/mx7dsabresd.c | 6 ++++++
 configs/mx7dsabresd_defconfig             | 5 +++++
 lib/fdtdec.c                              | 5 +++++
 3 files changed, 16 insertions(+)

diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index bef4f901ff7..1fdd39d437c 100644
--- a/board/freescale/mx7dsabresd/mx7dsabresd.c
+++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
@@ -25,6 +25,7 @@
 #include <i2c.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/arch/crm_regs.h>
+#include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -233,6 +234,11 @@ int board_early_init_f(void)
 	return 0;
 }
 
+void board_debug_uart_init(void)
+{
+	setup_iomux_uart();
+}
+
 int board_init(void)
 {
 	/* address of boot parameters */
diff --git a/configs/mx7dsabresd_defconfig b/configs/mx7dsabresd_defconfig
index a5a562af0c0..9f0631fe868 100644
--- a/configs/mx7dsabresd_defconfig
+++ b/configs/mx7dsabresd_defconfig
@@ -10,6 +10,11 @@ CONFIG_TARGET_MX7DSABRESD=y
 # CONFIG_ARMV7_VIRT is not set
 CONFIG_IMX_RDC=y
 CONFIG_IMX_BOOTAUX=y
+CONFIG_DEBUG_UART_BASE=0x30860000
+CONFIG_DEBUG_UART_CLOCK=24000000
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_IMX_HAB=y
 CONFIG_SYS_MEMTEST_START=0x80000000
 CONFIG_SYS_MEMTEST_END=0xa0000000
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index c38738b48c7..dff471228d6 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -9,6 +9,7 @@
 #ifndef USE_HOSTCC
 
 #define LOG_CATEGORY	LOGC_DT
+#define DEBUG
 
 #include <bloblist.h>
 #include <boot_fit.h>
@@ -35,6 +36,7 @@
 #include <linux/ctype.h>
 #include <linux/lzo.h>
 #include <linux/ioport.h>
+#include <system-constants.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -1276,6 +1278,9 @@ static void *fdt_find_separate(void)
 		 */
 		if (top > (void *)gd || top > (void *)&stack_ptr) {
 			printf("FDT %p gd %p\n", fdt_blob, gd);
+			printf("top %p sp %p\n", top, stack_ptr);
+			printf("sys_init_sp_addr %p\n", SYS_INIT_SP_ADDR);
+			printf("gbl_data_size %p\n", GENERATED_GBL_DATA_SIZE);
 			panic("FDT overlap");
 		}
 	}
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [BUG] silent hangup when debugging lib/fdtdec.c
  2025-11-27 15:50 [BUG] silent hangup when debugging lib/fdtdec.c alexander.feilke
@ 2025-12-10  8:33 ` alexander.feilke
  2026-01-13  8:52 ` alexander.feilke
  1 sibling, 0 replies; 10+ messages in thread
From: alexander.feilke @ 2025-12-10  8:33 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Tom Rini, Simon Glass, u-boot, u-boot

On Thursday, November 27, 2025 16:50 CET, alexander.feilke@ew.tq-group.com <alexander.feilke@ew.tq-group.com> wrote:
> On Thursday, November 27, 2025 15:02 CET, Fabio Estevam <festevam@gmail.com> wrote:
> > On Thu, Nov 27, 2025 at 9:33 AM alexander.feilke@ew.tq-group.com
> > <alexander.feilke@ew.tq-group.com> wrote:
> > 
> > > I also have a mx7dsabresd but I cannot bring it to boot with a master build unfortunately.
> > 
> > Just tested booting the top-of-tree U-Boot on a mx7dsabresd and it boots
> 
> Thanks! When using 0ae3dc6809ff like you I can boot and reproduce the hangup issue on mx7dsabresd

Any findings about this yet? Can you reproduce it on mx7dsabresd too? I'm having issues tracking down the problem there


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] silent hangup when debugging  lib/fdtdec.c
  2025-11-27 15:50 [BUG] silent hangup when debugging lib/fdtdec.c alexander.feilke
  2025-12-10  8:33 ` alexander.feilke
@ 2026-01-13  8:52 ` alexander.feilke
  2026-01-15 18:50   ` Tom Rini
  1 sibling, 1 reply; 10+ messages in thread
From: alexander.feilke @ 2026-01-13  8:52 UTC (permalink / raw)
  To: Tom Rini; +Cc: Fabio Estevam, Simon Glass, u-boot, u-boot

> > Description: U-Boot hangs silently during boot when enabling DEBUG 
> > in lib/fdtdec.c
> > 
> > Not sure if its really a bug or rather a configuration issue on my side.
> > 
> > Minimal steps to reproduce: <see patch>
> > 
> > The hang is caused by `panic("FDT overlap");` later inside the if block.
> > (see `lib/fdtdec.c:1279` in `fdt_find_separate(void)`)
> > 
> > Additionally, no boot log can be seen because serial is initialized after
> > loading the devicetree in this boot stage (see `common/board_r.c:665` in
> > `initcall_run_r(void)`)
> > 
> > Tested on i.MX6 with configs for tqma6d_mba6 and other tq boards that
> > aren't, mainlined yet (tqma6ulx_mba6ul and tqma7d_mba7).
> > 
> > Any idea what to look for to fix this on our side?
> >
> 
> I can boot and reproduce the hangup issue on mx7dsabresd:
> 
> <debug_uart>
> FDT 8787da38 gd 0091de20
> top 87887538 sp 87800000
> sys_init_sp_addr 0091ff10
> gbl_data_size 000000f0
> FDT overlap
> resetting ...
> System reset not supported on this platform
> ### ERROR ### Please RESET the board ###

Just want to revive this topic as the issue is still unresolved.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [BUG] silent hangup when debugging lib/fdtdec.c
  2026-01-13  8:52 ` alexander.feilke
@ 2026-01-15 18:50   ` Tom Rini
  0 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2026-01-15 18:50 UTC (permalink / raw)
  To: alexander.feilke@ew.tq-group.com
  Cc: Fabio Estevam, Simon Glass, u-boot, u-boot

[-- Attachment #1: Type: text/plain, Size: 1550 bytes --]

On Tue, Jan 13, 2026 at 09:52:35AM +0100, alexander.feilke@ew.tq-group.com wrote:
> > > Description: U-Boot hangs silently during boot when enabling DEBUG 
> > > in lib/fdtdec.c
> > > 
> > > Not sure if its really a bug or rather a configuration issue on my side.
> > > 
> > > Minimal steps to reproduce: <see patch>
> > > 
> > > The hang is caused by `panic("FDT overlap");` later inside the if block.
> > > (see `lib/fdtdec.c:1279` in `fdt_find_separate(void)`)
> > > 
> > > Additionally, no boot log can be seen because serial is initialized after
> > > loading the devicetree in this boot stage (see `common/board_r.c:665` in
> > > `initcall_run_r(void)`)
> > > 
> > > Tested on i.MX6 with configs for tqma6d_mba6 and other tq boards that
> > > aren't, mainlined yet (tqma6ulx_mba6ul and tqma7d_mba7).
> > > 
> > > Any idea what to look for to fix this on our side?
> > >
> > 
> > I can boot and reproduce the hangup issue on mx7dsabresd:
> > 
> > <debug_uart>
> > FDT 8787da38 gd 0091de20
> > top 87887538 sp 87800000
> > sys_init_sp_addr 0091ff10
> > gbl_data_size 000000f0
> > FDT overlap
> > resetting ...
> > System reset not supported on this platform
> > ### ERROR ### Please RESET the board ###
> 
> Just want to revive this topic as the issue is still unresolved.

OK, so looking at this, it's a "feature" as the check doesn't take in to
account that we might not have relocated gd out of initial memory (in
this case, 0x009.....) and in to sdram (0x8.......) and so is a faulty
check.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-01-15 18:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-27 15:50 [BUG] silent hangup when debugging lib/fdtdec.c alexander.feilke
2025-12-10  8:33 ` alexander.feilke
2026-01-13  8:52 ` alexander.feilke
2026-01-15 18:50   ` Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2025-11-25 16:14 Alexander Feilke
2025-11-25 16:35 ` Tom Rini
2025-11-26 10:41   ` alexander.feilke
2025-11-26 14:56     ` Tom Rini
2025-11-27 12:32       ` alexander.feilke
2025-11-27 14:02         ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox