[U-Boot] hi, I could not understand the memsize.c, somebody help me?

Aggrwal Poonam-B10812 Poonam.Aggrwal at freescale.com
Fri Jul 24 16:31:40 CEST 2009


 

> -----Original Message-----
> From: u-boot-bounces at lists.denx.de 
> [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Wolfgang Denk
> Sent: Friday, July 24, 2009 11:41 AM
> To: IaMaPlAyEr
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] hi, I could not understand the 
> memsize.c,somebody help me?
> 
> Dear IaMaPlAyEr,
> 
> In message 
> <2ae8403e0906242014k7e37b8f0tebaffaeeaea3f6bc at 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 at 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 at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 


More information about the U-Boot mailing list