boot hangs on new board with SAMA5D27C-D5M
Alexander Dahl
ada at thorsis.com
Fri Aug 27 14:16:33 CEST 2021
Hello,
for the record … see below.
Am Donnerstag, 22. Juli 2021, 19:01:36 CEST schrieb Alexander Dahl:
> Hello,
>
> I'm currently porting a brand new custom board with Microchip's 64 MiB
> SAMA5D2 SiP SoC. Second stage bootloader is at91bootstrap, for development
> I load U- Boot directly to RAM with SAM-BA to the same address (0x23f00000)
> and execute from there. RAM base address is 0x20000000 and size 0x04000000
> (64 MiB). Code is based on the U-Boot v2021.07 upstream code of the
> SAMA5D2-SOM1-EK1 board (which has 128 MiB).
>
> I get to a U-Boot shell and can access SD card and LEDs if I do not activate
> NAND flash support in menuconfig. The log with debug messages is attached.
> From IRC marex and I suspect some overwritten memory if the u-boot-dtb.bin
> file gets too big, but I can not spot any error in those addresses in debug
> output.
>
> The last function called is initr_malloc() from common/board_r.c but I can
> not spot what's wrong with that, especially because mem_malloc_init()
> prints a probably valid memory area and malloc_bin_reloc() should be a
> noop.
>
> If I disable CONFIG_SYS_MALLOC_CLEAR_ON_INIT, I get to a shell, if I enable
> it again, boot hangs.
>
> So the memset() of the malloc area, which is supposed to be valid to my
> knowledge, causes the hang.
>
> I can try one of the other boards (there are 4 prototype boards) to rule out
> an hardware issue, but I'm curious if anyone has an idea what's wrong here?
Not sure what was the root cause of the issue, but I changed the initial load
address to 0x21f00000 which is 1 MiB below half of the RAM (at offset 31 MiB
of 64 MiB, instead of at offset 63 MiB). Now U-Boot works without hangs or
hiccups.
So the change in at91bootstrap3 was:
-CONFIG_JUMP_ADDR="0x23f00000"
+CONFIG_JUMP_ADDR="0x21f00000"
and in U-Boot:
-CONFIG_SYS_TEXT_BASE=0x23f00000
+CONFIG_SYS_TEXT_BASE=0x21f00000
Greets
Alex
More information about the U-Boot
mailing list