From: Shawn Jin <shawnxjin@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] set up stack before board_init_f() on ppc440 core?
Date: Fri, 25 Feb 2005 10:42:28 -0800 [thread overview]
Message-ID: <c3d0340b05022510425a57a1a1@mail.gmail.com> (raw)
Hi,
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?
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
stack was set in DCACHE? I don't quite understand how a cache acts
like RAM, i.e., a cache can be accessed by address xxxx_xxxx. Is a
cache only accessible by special cache instructions? The following
code is extracted from ppc4xx/start.S
#ifdef CFG_INIT_DCACHE_CS
/*----------------------------------------------------------------------- */
/* Memory Bank x (nothingness) initialization 1GB+64MEG */
/* used as temporary stack pointer for stage0 */
/*----------------------------------------------------------------------- */
li r4,PBxAP
mtdcr ebccfga,r4
lis r4,0x0380
ori r4,r4,0x0480
mtdcr ebccfgd,r4
addi r4,0,PBxCR
mtdcr ebccfga,r4
lis r4,0x400D
ori r4,r4,0xa000
mtdcr ebccfgd,r4
/* turn on data chache for this region */
lis r4,0x0080
mtdccr r4
Thanks,
-Shawn.
next reply other threads:[~2005-02-25 18:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-25 18:42 Shawn Jin [this message]
2005-02-25 21:45 ` [U-Boot-Users] set up stack before board_init_f() on ppc440 core? Wolfgang Denk
2005-02-25 22:56 ` Shawn Jin
2005-02-26 16:23 ` Grant Likely
2005-03-04 3:29 ` Shawn Jin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c3d0340b05022510425a57a1a1@mail.gmail.com \
--to=shawnxjin@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox