From: Wolfgang Denk Date: Fri, 25 Feb 2005 22:45:58 +0100 Subject: [U-Boot-Users] set up stack before board_init_f() on ppc440 core? In-Reply-To: Your message of "Fri, 25 Feb 2005 10:42:28 PST." Message-ID: <20050225214603.27978C1430@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Shawn, in message 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