
-----Original Message----- From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Wolfgang Denk Sent: Friday, July 24, 2009 11:41 AM To: IaMaPlAyEr Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] hi, I could not understand the memsize.c,somebody help me?
Dear IaMaPlAyEr,
In message 2ae8403e0906242014k7e37b8f0tebaffaeeaea3f6bc@mail.gmail.com you wrote:
I could not understand common/memsize.c, how it works?
It writes markers at specific memory locations and then reads these back. The algorithm is chosen to be fast but still to be able to detect mirrored address ranges and other memory errors.
Suppose I configure MAX_MEM)SIZE as 1Gig and the actual memory on the board is 512M, is this function supposed to return 512M?
maxsize / sizeof (long), what's meaning of it? why sizeof (long) is dividend?
Please read some boot about C programming, section pointer arithmetics.
just like stack, push every step mem addr to save:
save[i++] = *addr; and then?
The test is intended to be a non-desctructive one.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de "There are three principal ways to lose money: wine, women, and en- gineers. While the first two are more pleasant, the third is by far the more certain." -- Baron Rothschild, ca. 1800 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot