Re: [Ppcboot-users] Jumping to RAM code & SDRAM cfg table
Wolfgang Denk <wd <at> denx.de>
2001-02-02 11:00:24 GMT
in message <A1C99F4731CAD111BA5400A024FC3B0C892D16 <at> ESBILMA01EDCGE> you wrote:
> In the message you wrote on 30th of January you said that I might
> have initialized badly the SDRAM in my MBX860_C board. But I think that
> there are one thing that doesn´t match with that idea:
> Why have I got the code properly relocated in SDRAM before jumping
> there? I think that if relocating was well it means that the accesses to
> this memory were good, and in consequence the SDRAM should have been
> initialized well.
Not necessarily. Ordinary read and write accesses usually don't cause
problems, and this is all that's used to relocate the code (in fact,
it's only write accesses)>
But as soon as the code starts running from RAM, you will fetch
instructions from RAM, and this is the first time where burst mode
accesses come into play. And nearly all the memory problems I've seen
so far happened during burst mode.
So you may very well be able to read and write to RAM, and still
crash badly when trying to run code from it.
> I have also noticed that the SDRAM configuration table that comes
> with the board monitor program is the same as the one that comes with the
> PPCBoot. Do I have to put an initialization sequence in addition to the
> "upmconfig()" instruction in the PPCBoot?
Well, yes. "upmconfig()" is just the easy part. Have a look at what
"initdram()" is doing for allt he existent boards - you have to setup
the prescaler for refresh, and perform a proper SDRAM initializsation
sequence; and you have to enable refresh.
That would be another potential source of trouble: if you don't
enable refresh, or it doesn't work properly, you can write the code
to RAM, but you might load just garbage when you try to run the code.
> Where can I find information about configuration tables and
> initialization sequences for any SDRAM?
In the processor User's manuals, and in the dtatsheets for the SDRAM
chips you're using. If you find that unsufficient, have a look at
Micron's web pages; usually they provide excellent documentation,
which is not limited to their own chips, but also explains general
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd <at> denx.de
Visit us at Embedded Systems: Feb 14-16 2001, Nuremberg, Halle 12/K01
(with TQ Components); our presentation "Starke Zwerge: Embedded Linux
auf PowerPC-Systemen" on Thursday, Feb 15 2001, 13:30 Forum Halle 11.