[U-Boot-Users] post memory test

Dongying_Xu at us.alphanetworks.com Dongying_Xu at us.alphanetworks.com
Tue Nov 13 00:50:39 CET 2007


Hi,

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. 

In U-BOOT-1.2.0 
u-boot\post\drivers\memory.c,

int memory_post_test (int flags)
{
        int ret = 0;
        DECLARE_GLOBAL_DATA_PTR;
        bd_t *bd = gd->bd;
        unsigned long memsize = (bd->bi_memsize >= 256 << 20 ?
                                 256 << 20 : bd->bi_memsize) - (1 << 20);

        if (flags & POST_SLOWTEST) {
                ret = memory_post_tests (CFG_SDRAM_BASE, memsize);
        } else {                        /* POST_NORMAL */

                unsigned long i;

                for (i = 0; i < (memsize >> 20) && ret == 0; i++) {
                        if (ret == 0)
                                ret = memory_post_tests (i << 20, 0x800);
                        if (ret == 0)
                                ret = memory_post_tests ((i << 20) + 
0xff800, 0x800);
                }
        }

        return ret;
}

Best Regards
dongy



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20071112/8adf4bab/attachment.htm 


More information about the U-Boot mailing list