Re: [U-Boot-Users] PPC: How to access RAM location 0x0 (unmapped) ?

The reason of the crash was because I put get_ram_size() before the sdram controller was initialized. I don't know how it works in sbc8240 but this is what I get in tqm8260:
/* We must be able to test a location outsize the maximum legal size * to find out THAT we are outside; but this address still has to be * mapped by the controller. That means, that the initial mapping has * to be (at least) twice as large as the maximum expected size. */
Now it works.
Thanks.
Wolfgang Denk wd@denx.de@denx.de on 04/28/2005 01:55:16 PM
Sent by: wd@denx.de
To: "KokHow Teh" KokHow.Teh@marconi.com cc: u-boot-users@lists.sourceforge.net
Subject: Re: [U-Boot-Users] PPC: How to access RAM location 0x0 (unmapped) ?
In message OF5DF9F216.6A5D85BA-ON48256FF1.0012D4AD@uk.marconicomms.com you wrote:
board/sbc8240.c initdram() calls get_ram_size() with CFG_SDRAM_BASE
= 0. Put it into board/mpc8260ads/mpc8260ads.c. and it crashes....
Then either don't do that, or fix it. There are many, many PPC boards using get_ram_size() with CFG_SDRAM_BASE==0 which just work fine.
There is no reason why this should be any problem.
Best regards,
Wolfgang Denk
-- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de That was the thing about deserts. They had their own gravity. They sucked you into the centre. - Terry Pratchett, _Small Gods_

"KokHow Teh" KokHow.Teh@marconi.com wrote on 2005-04-28 03:12:14:
The reason of the crash was because I put get_ram_size() before the sdram controller was initialized. I don't know how it works in sbc8240 but this is what I get in tqm8260:
/* We must be able to test a location outsize the maximum legal size
- to find out THAT we are outside; but this address still has to be
- mapped by the controller. That means, that the initial mapping has
- to be (at least) twice as large as the maximum expected size.
*/
The initial mapping does not have to be (at least) twice as large as the maximum expected size. This comment may be a result of an old bug in get_ram_size() which performed a test at base + max_size. The function now stops testing when it has found max_size bytes.
Of coarse the controller still has to be initialized and map max_size bytes before calling the function.
Chris
participants (2)
-
Christopher E Cordahi
-
KokHow Teh