U-Boot Fails w/ Memory Test

Heinrich Schuchardt xypron.glpk at gmx.de
Fri Aug 7 12:05:33 CEST 2020


On 07.08.20 00:50, Brownlie, Lewis wrote:
> Hello all,
>
> I am trying to enable memory POST test for my ARM-based processor.  I have reached the point where the U-Boot runs the test and it passes.  However, U-Boot later hangs after the following lines:
>
> DDR    31.9 GiB (DDR4, 64-bit, CL=22, ECC on)
>                               DDR Controller Interleaving Mode: 256B
>                               DDR Chip-Select Interleaving Mode: CS0+CS1
>
> My guess is that the memory test is somehow messing something up, even though it passes, but I don't know how.  My attempts to debug and figure out the issue have led me to discover that the issue occurs in the relocate_code function.  Other than that, I have not been able to figure anything out.  If I build and run U-Boot without the memory test, it works fine, so I know the issue has something to do with the test.  (The test is called from the board_init_f function.)
>
> Does anyone have any ideas what may be wrong and/or what I could do to find the issue?
>
> Thank you
> -Lewis
>

Have a look at arch_memory_test_prepare(). The function blindly asks to
test and thereby overwrite up to 256 MiB from CONFIG_SYS_SDRAM_BASE to
gd->bd.

The test must run *after* relocation. Otherwise we will overwrite U-Boot.

The end of the memory range tested should be
((uintptr_t)map_sysmem(gd->start_addr_sp, 0) - CONFIG_STACK_SIZE.

All memory areas marked as reserved in the device tree have to be excluded.

Best regards

Heinrich


More information about the U-Boot mailing list