
Hi Dongy,
I have a question about post memory test. According to the following code, even if memory size is greater than 256M, only 256M memory will be tested. Is it true or I missed something. Thanks a lot.
No, this is true. As I did not write that code, my interpretation uses some speculation, but what is very likely the case here is that U-Boot potentially does not map all physical available memory and thus we cannot even access it. As we do not have explicit variables representing those facts, I guess the 256MB are kind of a least common denominator.
As an example look at initdram() in board/Marvell/db64460/sdram_init.c where the platform uses Block Address Translations (BATs) to map RAM but exhausts these pretty scarce ressources and limits itself to mapping only the first 256MB (a usual limit for a BAT).
In U-BOOT-1.2.0 u-boot\post\drivers\memory.c,
A word to version 1.2.0, if you have a platform with 256MB+ memory, please be sure to check the fix from Aug 25 by Yuri Tikhonov "POST: limit memory test area to not touch global data anymore" (9c02defc) in the current code as the code in 1.2.0 caused problems on such systems.
Cheers Detlev