[U-Boot-Users] set up stack before board_init_f() on ppc440 core?

Wolfgang Denk wd at denx.de
Fri Feb 25 22:45:58 CET 2005


Dear Shawn,

in message <c3d0340b05022510425a57a1a1 at mail.gmail.com> you wrote:
> 
> Before board_init_f() is called, which is C code, a stack must be set
> up. The stack is usually set up in internal SRAM. Where shall I put
> stack in if I don't have an internal SRAM?

Which part of section "Initial Stack,  Global  Data"  in  the  README
don't you understand?

> I read through cpu/ppc4xx/start.S and found some set up the temporary
> stack in DCACHE (Walnut 405 is an example). But the CFG_INIT_RAM_ADDR
> is 0x40000000, which is inside SDRAM. Why was it commented that the

No, this is not inside SDRAM. There is no board (yet) with  1  GB  of
RAM.

> stack was set in DCACHE? I don't quite understand how a cache acts

Because the stack is in the data cache.

> like RAM, i.e., a cache can be accessed by address xxxx_xxxx. Is a
> cache only accessible by special cache instructions? The following

I'm afraid that explaining the basic operations of  cache  is  beyond
the topics for this mailing list.

In short: cache is like normal memory, just very fast (which does not
play a role here). We just have to make sure that no cache  fills  or
cache  flushes  will  be done (at least not for that part of the data
cache which is being used for the initial stack).

Best regards,

Wolfgang Denk

-- 
See us @ Embedded World, Nuremberg, Feb 22 - 24,  Hall 10.0 Booth 310
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Our missions are peaceful -- not for conquest.  When we do battle, it
is only because we have no choice.
	-- Kirk, "The Squire of Gothos", stardate 2124.5




More information about the U-Boot mailing list