[U-Boot-Users] Some puzzles on dram_size()

Wolfgang Denk wd at denx.de
Sun Jan 4 10:33:40 CET 2004

In message <20040104064134.64840.qmail at web15209.mail.bjs.yahoo.com> you wrote:
> When porting u-boot on LITE_DW,I found that the
> following code in RPXlite.c couldn't get through.I

Can you please be a  bit  more  specific?  What  does  "couldn't  get
through" mean? Bad results? Crash? Which error / crash dump messages?

> traced the code by BDI2000 and DDD and knew that the
> problem perhaps was save[32].In the "for" cycle,the
> dimension of save[] must beyond 32 limit by

THis is impossible on a 32 bit system. You definitely don't have that
much RAM on your box.

> [maxsize/sizeof(long)]/2.I changed save[] dimension to
> big enough but still in vain.I don't know
> why.Finally,I masked the following code and booted

How big is your SDRAM_MAX_SIZE #defined? And how big is your actual RAM?

> successfully.How does the following code work
> normally?If I masked the code,is there any potential
> danger? 

The code works fine on all systems I know. If you remove it, you lose
the feature that U-0Boot automatically adjusts  itself  to  different
RAM sizes.

Best regards,

Wolfgang Denk

Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"It is better for civilization to be going down the drain than to  be
coming up it."                                          - Henry Allen

More information about the U-Boot mailing list