[U-Boot-Users] MPC8347/9 stack in cache (CFG_INIT_RAM_ADDR)

Matt Hevern matt.hevern at nec.com.au
Tue Apr 24 06:49:34 CEST 2007

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

    /* set up the stack pointer in our newly created
     * cache-ram (r1) */

    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?



More information about the U-Boot mailing list