
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?
Greets Alex