U-Boot Fails w/ Memory Test
Brownlie, Lewis
Lewis.Brownlie at Honeywell.com
Fri Aug 7 17:17:46 CEST 2020
Thank you for your response Heinrich. I tried running the memory test after relocation instead of before and it seems to have worked. I'm going to debug more to make sure it really did, but in the meantime a couple questions:
You wrote:
> 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.
1. Why does the test run after relocation? Everything I've seen has said to do it before, unless I'm completely misunderstanding. For example, in README.post it states (emphasis added by me):
Also, all tests will be discriminated by the moment they run at.
Specifically, the following groups will be singled out:
1) Tests running before relocating to RAM
These tests will run immediately after initializing RAM
as to enable modifying it without taking care of its
contents. Basically, this group will contain memory tests
only.
2) Tests running after relocating to RAM
These tests will run immediately before entering the main
loop as to guarantee full hardware initialization.
1. Are you suggesting that I need to make any changes to arch_memory_test_prepare()? Or are you just pointing out that function to show that I need to run the test after relocation? The test seems to be working fine now without changing arch_memory_test_prepare(), but I want to make sure.
Thank you again for your time,
-Lewis
More information about the U-Boot
mailing list