imx93-var-som: ahab: U-boot is hanging

Mathieu Othacehe othacehe at gnu.org
Tue Feb 6 15:34:25 CET 2024


Hello,

I am using the imx93-var-som_defconfig configuration on commit
v2024.04-rc1. When producing signed or unsigned images on an unclosed
board everything works fine.

However, once the board is closed (ahab_close command is issued), u-boot
hangs this way:

--8<---------------cut here---------------start------------->8---
U-Boot SPL 2024.04-rc1-00004-g8494a62b246-dirty (Feb 06 2024 - 15:24:49 +0100)
SOC: 0xa0009300
LC: 0x40040
M33 prepare ok
Normal Boot
Trying to boot from BOOTROM
Boot Stage: USB boot
NOTICE:  BL31: v2.6(release):d8bc791fb
NOTICE:  BL31: Built : 18:11:44, Mar 15 2023


U-Boot 2024.04-rc1-00004-g8494a62b246-dirty (Feb 06 2024 - 15:24:49 +0100)

U-Boot code: 80200000 -> 802B4328  BSS: -> 802BA420
CPU:   i.MX93 rev1.0
Model: Variscite VAR-SOM-MX93 on Symphony evaluation board
DRAM:  Monitor len: 000BA420
Ram size: 80000000
Ram top: 100000000
Reserving 745k for U-Boot at: fff25000
Reserving 32784k for malloc() at: fdf21000
Reserving 152 Bytes for Board Info at: fdf20f60
Reserving 480 Bytes for Global Data at: fdf20d80
Reserving 24832 Bytes for FDT at: fdf1ac80

RAM Configuration:
Bank #0: 80000000 2 GiB
Bank #1: 0 0 Bytes

DRAM:  2 GiB
New Stack Pointer is: fdf1ac70
Relocation Offset is: 7fd25000
Relocating to fff25000, new gd at fdf20d80, sp at fdf1ac70
Added memory mapping (5): 80000000 80000000
Pre-reloc malloc() used 0x17478 bytes (93 KB)
before mem_malloc_init
--8<---------------cut here---------------end--------------->8---

It seems that signature checking is OK because both the SPL and regular
u-boot are started. However, something seems to cause u-boot to hang.

Here I am hanging in initr_malloc function, right in the
mem_malloc_init call:

--8<---------------cut here---------------start------------->8---
static int initr_malloc(void)
{
	ulong start;

#if CONFIG_IS_ENABLED(SYS_MALLOC_F)
	debug("Pre-reloc malloc() used %#lx bytes (%ld KB)\n", gd->malloc_ptr,
	      gd->malloc_ptr / 1024);
#endif
	/* The malloc area is immediately below the monitor copy in DRAM */
	/*
	 * This value MUST match the value of gd->start_addr_sp in board_f.c:
	 * reserve_noncached().
	 */
	start = gd->relocaddr - TOTAL_MALLOC_LEN;
	gd_set_malloc_start(start);
	debug("before mem_malloc_init\n");
	mem_malloc_init((ulong)map_sysmem(start, TOTAL_MALLOC_LEN),
			TOTAL_MALLOC_LEN);

	debug("after mem_malloc_init\n");
	return 0;
}
--8<---------------cut here---------------end--------------->8---

If I add initcall traces, then I'm not going that far:

--8<---------------cut here---------------start------------->8---
U-Boot SPL 2024.04-rc1-00004-g8494a62b246-dirty (Feb 06 2024 - 15:06:54 +0100)
SOC: 0xa0009300
LC: 0x40040
M33 prepare ok
Normal Boot
Trying to boot from BOOTROM
Boot Stage: USB boot
NOTICE:  BL31: v2.6(release):d8bc791fb
NOTICE:  BL31: Built : 18:11:44, Mar 15 2023
initcall: 000000008027189c

U-Boot 2024.04-rc1-00004-g8494a62b246-dirty (Feb 06 2024 - 15:06:54 +0100)

initcall: 000000008022481c
U-Boot code: 80200000 -> 802B43C0  BSS: -> 802BA4A0
initcall: 0000000080224654
initcall: 0000000080203844
CPU:   i.MX93 rev1.0
initcall: 0000000080224fdc
Model: Variscite VAR-SOM-MX93 on Symphony evaluation board
initcall: event 8/(unknown)
initcall: 0000000080224850
DRAM:  initcall: 00000000802035a8
initcall: 0000000080224bb8
Monitor len: 000BA4A0
Ram size: 80000000
Ram top: 100000000
initcall: 0000000080224640
initcall: 00000000802248b8
initcall: 0000000080202e24
initcall: 00000000802248c0
initcall: 00000000802248c8
initcall: 00000000802247b4
Reserving 745k for U-Boot at: fff25000
initcall: 0000000080224968
Reserving 32784k for malloc() at: fdf21000
initcall: 0000000080224908
Reserving 152 Bytes for Board Info at: fdf20f60
initcall: 00000000802249a8
Reserving 480 Bytes for Global Data at: fdf20d80
initcall: 0000000080224744
Reserving 24832 Bytes for FDT at: fdf1ac80
initcall: 00000000802248d0
initcall: 00000000802248d8
initcall: 00000000802248f8
initcall: 0000000080224c30
initcall: 00000000802035e0
initcall: 00000000802249ec

RAM Configuration:
Bank #0: 80000000 2 GiB
Bank #1: 0 0 Bytes

DRAM:  2 GiB
initcall: 0000000080224c44
initcall: 0000000080224720
New Stack Pointer is: fdf1ac70
initcall: 000000008022465c
initcall: 00000000802248e0
initcall: 00000000802248e8
initcall: 00000000802246a0
Relocation Offset is: 7fd25000
Relocating to fff25000, new gd at fdf20d80, sp at fdf1ac70
initcall: 0000000080224900
initcall: 0000000080227704
initcall: 00000000fff49c8c
initcall: 00000000fff49c94
initcall: 00000000fff4c8c0
initcall: 00000000fff49f54
Added memory mapping (5): 80000000 80000000
initcall: 00000000fff49f04
initcall: 00000000fff49f74
initcall: 00000000fff49ea4
Pre-r
--8<---------------cut here---------------end--------------->8---

and I am stopping in the process of writing the "Pre-reloc ..." trace.

All-in-all, fusing the board seems to change something causing the
previously working images (on a non-closed board) to stop working.

Does it ring a bell to anyone?

Thanks,

Mathieu


More information about the U-Boot mailing list