All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Hevern <matt.hevern@nec.com.au>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] MPC8347/9 stack in cache (CFG_INIT_RAM_ADDR)
Date: Tue, 24 Apr 2007 14:49:34 +1000	[thread overview]
Message-ID: <462D8C5E.3070001@nec.com.au> (raw)

Hi all,

I am trying to get U-Boot running on a custom MPC8347 board, and am 
having difficulty with the start-up code. I'm running essentially with 
U-boot 1.1.6, which has had the ppc83xx code updated to U-Boot 1.2.
I'm running out of SDRAM, with CFG_RAMBOOT

I have set CFG_INIT_RAM_ADDR to 0xFB000000, a location un-mapped by any 
of the windows or chip select settings, but mapped into a BAT by the 
board config:

#define CFG_IBAT6L  (0xFB000000 | BATL_PP_10  | BATL_MEMCOHERENCE)
#define CFG_IBAT6U  (0xFB000000 | BATU_BL_64M | BATU_VS | BATU_VP)

#define CFG_HID2 HID2_HBE  // to enable high bats
#define CFG_INIT_RAM_LOCK   1



in cpu/mpc83xx/start.S when it gets to the point of using the stack-in-cache


----start.S
    /* set up the stack pointer in our newly created
     * cache-ram (r1) */
    lis r1, (CFG_INIT_RAM_ADDR + CFG_GBL_DATA_OFFSET)@h
    ori r1, r1, (CFG_INIT_RAM_ADDR + CFG_GBL_DATA_OFFSET)@l

    li  r0, 0       /* Make room for stack frame header and */
    stwu    r0, -4(r1)  /* clear final stack frame so that  */
    stwu    r0, -4(r1)  /* stack backtraces terminate cleanly   */

----END start.S

It crashes badly at the first stwu instruction. I get strange behaviour, 
all register settings in debugger (green hills probe) showing 0x43 - and 
a grinding halt.

My understanding is that to get some ram for the initial stack on these 
processors, it's necessary to use the RAM-in Cache, you should map an 
unused area of address space into a BAT, but am not certain of other 
requirments such as BAT properties, or settings?

Is anyone more familar with this or suggestions?


thanks,

Matt

             reply	other threads:[~2007-04-24  4:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24  4:49 Matt Hevern [this message]
2007-04-24 14:56 ` [U-Boot-Users] MPC8347/9 stack in cache (CFG_INIT_RAM_ADDR) Timur Tabi

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=462D8C5E.3070001@nec.com.au \
    --to=matt.hevern@nec.com.au \
    --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.