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: Thu, 3 Mar 2005 19:29:05 -0800 [thread overview]
Message-ID: <c3d0340b05030319296c0767b8@mail.gmail.com> (raw)
In-Reply-To: <528646bc05022608238666f74@mail.gmail.com>
Hi,
I'm experimenting to set up the initial stack in DCACHE instead of the
internal SRAM on Ebony. In our SoC, no internal SRAM is available.
After reading README's <initial stack, global data> section and the
sample code of ppc405 which sets the stack in DCACHE, I understand the
ideas behind using DCACHE to be the initial stack. Well, I guess.
1. The CFG_INIT_RAM_ADDR is set to an address which nobody uses it.
2. Enable that area cacheable and all others are cache inhibited.
So I did several changes on cpu/ppc4xx/start.S,
include/configs/EBONY.h, and board/ebony/init.S, trying to set up the
stack correctly.
1. changed CFG_ISRAM_BASE to 0x40000000, whose original value is 0xc0000000.
2. commented out ISRAM setting in start.S
3. changed the TLB entries for ISRAM to the following.
#ifndef CFG_440_NO_ISRAM
tlbentry( CFG_ISRAM_BASE, SZ_4K, 0x80000000, 0, AC_R|AC_W|AC_X )
tlbentry( CFG_ISRAM_BASE + 0x1000, SZ_4K, 0x80001000, 0, AC_R|AC_W|AC_X )
#else
tlbentry( CFG_ISRAM_BASE, SZ_256M, 0x40000000, 0, AC_R|AC_W|AC_X )
#endif
However these changes are not successful. A machine check exception
occurs when setting up the stack (2nd stwu). What am I missing here?
/*----------------------------------------------------------------*/
/* Setup the stack in internal SRAM or DCACHE */
/*----------------------------------------------------------------*/
lis r1,CFG_INIT_RAM_ADDR at h
ori r1,r1,CFG_INIT_SP_OFFSET at l
li r0,0
stwu r0,-4(r1)
stwu r0,-4(r1) /* Terminate call chain */
Thanks a lot,
-Shawn.
prev parent reply other threads:[~2005-03-04 3:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-25 18:42 [U-Boot-Users] set up stack before board_init_f() on ppc440 core? Shawn Jin
2005-02-25 21:45 ` Wolfgang Denk
2005-02-25 22:56 ` Shawn Jin
2005-02-26 16:23 ` Grant Likely
2005-03-04 3:29 ` Shawn Jin [this message]
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=c3d0340b05030319296c0767b8@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.