[U-Boot-Users] get_ram_size() returns wrong value
Wolfgang Denk
wd at denx.de
Wed Apr 6 15:20:23 CEST 2005
In message <9b7ca65705040605525c3317b5 at mail.gmail.com> you wrote:
>
> > How is maxsize defined in your configuration?
>
> maxsize is configured as,
> #define CFG_MAX_RAM_SIZE 0x08000000 /* 0 .. 128 MB of (S)DRAM */
Try doubling it ;-)
> > How is your memory controller configured (address masks) ?
>
> #define CFG_BANK0_START 0x00000000
> #define CFG_BANK0_END (CFG_MAX_RAM_SIZE/2 - 1)
> #define CFG_BANK0_ENABLE 1
> #define CFG_BANK1_START (CFG_MAX_RAM_SIZE/2)
> #define CFG_BANK1_END (CFG_MAX_RAM_SIZE - 1)
> #define CFG_BANK1_ENABLE 1
Umm.. this seems bogus to me. If the actual size is != MAX_RAM_SIZE
thenyou will have a hole in your mapping; this is not what you want
to do. See the README how to handle such a situation.
> BTW, is it right by simply halving the MAX value ? I sort of guessed
No, this is ... bogus.
> this part. Looked at schemetics and they used 2 chip selects. So, I
> figured halving it. Is it cool ?
Definitely not.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Buy land. They've stopped making it." - Mark Twain
More information about the U-Boot
mailing list