public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Custom MPC8347 Board can't access cache
@ 2007-10-16  1:04 Sparks, Sam
  2007-10-16 11:32 ` Jerry Van Baren
  0 siblings, 1 reply; 6+ messages in thread
From: Sparks, Sam @ 2007-10-16  1:04 UTC (permalink / raw)
  To: u-boot


Hello All,

I am trying to bring up a custom MPC8347 board with source based off of
1.3-rc1, unfortunately, I am not making it to board_init_f.

Using an abatron bdi, I've discovered the offending instruction is on
cpu/mpc83xx/start.S:752 - 

752    mtmsr r5   /* r5 is 0x3072 */

Has anyone else seen this issue?

For reference, here are some configuration settings that may be of
value:

#define CFG_INIT_RAM_ADDR  0x20000000  /* Initial RAM address */
#define CFG_INIT_RAM_END   0x1000      /* End of used area in RAM*/
#define CFG_IBAT2L   (CFG_INIT_RAM_ADDR | BATL_PP_10 |
BATL_MEMCOHERENCE)
#define CFG_IBAT2U   (CFG_INIT_RAM_ADDR | BATU_BL_128K | BATU_VS |
BATU_VP)

Does anyone have any insight? Thanks for the help,
Sam Sparks

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Custom MPC8347 Board can't access cache
  2007-10-16  1:04 [U-Boot-Users] Custom MPC8347 Board can't access cache Sparks, Sam
@ 2007-10-16 11:32 ` Jerry Van Baren
  2007-10-16 16:02   ` Sparks, Sam
  0 siblings, 1 reply; 6+ messages in thread
From: Jerry Van Baren @ 2007-10-16 11:32 UTC (permalink / raw)
  To: u-boot

Sparks, Sam wrote:
> Hello All,
> 
> I am trying to bring up a custom MPC8347 board with source based off of
> 1.3-rc1, unfortunately, I am not making it to board_init_f.
> 
> Using an abatron bdi, I've discovered the offending instruction is on
> cpu/mpc83xx/start.S:752 - 
> 
> 752    mtmsr r5   /* r5 is 0x3072 */
> 
> Has anyone else seen this issue?
> 
> For reference, here are some configuration settings that may be of
> value:
> 
> #define CFG_INIT_RAM_ADDR  0x20000000  /* Initial RAM address */
> #define CFG_INIT_RAM_END   0x1000      /* End of used area in RAM*/
> #define CFG_IBAT2L   (CFG_INIT_RAM_ADDR | BATL_PP_10 |
> BATL_MEMCOHERENCE)
> #define CFG_IBAT2U   (CFG_INIT_RAM_ADDR | BATU_BL_128K | BATU_VS |
> BATU_VP)
> 
> Does anyone have any insight? Thanks for the help,
> Sam Sparks

If you decode the value of r5 (assuming your comment is correct - DON'T 
ASSUME THAT, verify it!!!), the mtmsr is enabling caching.  My deduction 
is that caching is messing you up.

If you disable caching, does your board boot (albeit slowly)?

If so, you have two possibilities:
1) Misconfigured hardware
   1a) Memory map, BATs, etc. - look for things that should not be cached
       like I/O but are cached inadvertently.
   1b) Your SDRAM is initialized improperly.

READ THIS PAGE!!!
<http://www.denx.de/wiki/DULG/UBootCrashAfterRelocation>

2) You have a hardware (board layout) problem.

The good news is, odds are pretty good that your problem is 1b).  If it 
isn't 1b, the odds are pretty good that it is 1a).

Good luck,
gvb

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Custom MPC8347 Board can't access cache
  2007-10-16 11:32 ` Jerry Van Baren
@ 2007-10-16 16:02   ` Sparks, Sam
  2007-10-16 18:18     ` Sparks, Sam
  0 siblings, 1 reply; 6+ messages in thread
From: Sparks, Sam @ 2007-10-16 16:02 UTC (permalink / raw)
  To: u-boot

>From: Jerry Van Baren [mailto:gerald.vanbaren at ge.com] 
>Sparks, Sam wrote:
>> Does anyone have any insight? Thanks for the help,
>> Sam Sparks
>
>Good luck,
>gvb
>

The problem turned out to be how I was configuring the DBATs and IBATS.
I had missed a critical mapping and was accessing invalid memory.

Thanks,
Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Custom MPC8347 Board can't access cache
  2007-10-16 16:02   ` Sparks, Sam
@ 2007-10-16 18:18     ` Sparks, Sam
  2007-10-16 18:27       ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Sparks, Sam @ 2007-10-16 18:18 UTC (permalink / raw)
  To: u-boot

Ok, new problem.

I've trying to configure internal cache at 0x20000000 (based off of
TQM834x), and U-Boot is failing to access the memory space as indicated
by my debug session:

(gdb) b board.c:479
Breakpoint 9 at 0xfff06b54: file board.c, line 479.
(gdb) c
Continuing.

Breakpoint 8, board_init_f (bootflag=Cannot access memory at address
0x20000ed0
) at board.c:479
479             addr_sp -= sizeof (gd_t);
(gdb)

I've verified I cannot access the memory space via the BDI either. Does
anyone see a problem with my configuration?
#define CFG_SDRAM_BASE     0x00000000
#define CFG_INIT_RAM_ADDR  0x20000000
#define CFG_IMMR     0xE0000000
#define CFG_FLASH_BASE     0xF8000000

/* DDR 0 - 512M */
#define CFG_IBAT0L   (CFG_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
#define CFG_IBAT0U   (CFG_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
#define CFG_IBAT1L   (CFG_SDRAM_BASE + 0x10000000 | BATL_PP_10 |
BATL_MEMCOHERENCE)
#define CFG_IBAT1U   (CFG_SDRAM_BASE + 0x10000000 | BATU_BL_256M |
BATU_VS | BATU_VP)

/* stack in DCACHE @ 512M (no backing mem) */
#define CFG_IBAT2L   (CFG_INIT_RAM_ADDR | BATL_PP_10 |
BATL_MEMCOHERENCE)
#define CFG_IBAT2U   (CFG_INIT_RAM_ADDR | BATU_BL_128K | BATU_VS |
BATU_VP)

/* IMMRBAR */
#define CFG_IBAT3L   (CFG_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT |
BATL_GUARDEDSTORAGE)
#define CFG_IBAT3U   (CFG_IMMR | BATU_BL_2M | BATU_VS | BATU_VP)

/* FLASH */
#define CFG_IBAT4L   (CFG_FLASH_BASE | BATL_PP_10 | BATL_CACHEINHIBIT |
BATL_GUARDEDSTORAGE)
#define CFG_IBAT4U   (CFG_FLASH_BASE | BATU_BL_128M | BATU_VS | BATU_VP)

Thanks for the help,
Sam 

>-----Original Message-----
>From: Sparks, Sam 
>Sent: Tuesday, October 16, 2007 11:03 AM
>To: Jerry Van Baren
>Cc: u-boot-users at lists.sourceforge.net
>Subject: RE: [U-Boot-Users] Custom MPC8347 Board can't access cache
>
>>From: Jerry Van Baren [mailto:gerald.vanbaren at ge.com] 
>>Sparks, Sam wrote:
>>> Does anyone have any insight? Thanks for the help,
>>> Sam Sparks
>>
>>Good luck,
>>gvb
>>
>
>The problem turned out to be how I was configuring the DBATs 
>and IBATS. I had missed a critical mapping and was accessing 
>invalid memory.
>
>Thanks,
>Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Custom MPC8347 Board can't access cache
  2007-10-16 18:18     ` Sparks, Sam
@ 2007-10-16 18:27       ` Wolfgang Denk
  2007-10-16 18:34         ` Sparks, Sam
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2007-10-16 18:27 UTC (permalink / raw)
  To: u-boot

In message <BAF8B1E0BB28024A90895E746A3B610D1B5311@twx-exch01.twacs.local> you wrote:
> Ok, new problem.
> 
> I've trying to configure internal cache at 0x20000000 (based off of
> TQM834x), and U-Boot is failing to access the memory space as indicated
> by my debug session:

Hmm... do you know the hardware details of your board, *and* those of
the TQM834x module and the STK85xx  evaluation  board?  Without  such
knowledge  it  will  be  difficult for you to judje if the TQM834x is
really a good choice to compare against, and you will not  know  what
to take and what to change...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Brontosaurus Principle: Organizations  can  grow  faster  than  their
brains  can manage them in relation to their environment and to their
own physiology: when this occurs, they are an endangered species.
                                                - Thomas K. Connellan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Custom MPC8347 Board can't access cache
  2007-10-16 18:27       ` Wolfgang Denk
@ 2007-10-16 18:34         ` Sparks, Sam
  0 siblings, 0 replies; 6+ messages in thread
From: Sparks, Sam @ 2007-10-16 18:34 UTC (permalink / raw)
  To: u-boot

>Wolfgang Denk wrote:
>Hmm... do you know the hardware details of your board, *and* those of
>the TQM834x module and the STK85xx  evaluation  board?  Without  such
>knowledge  it  will  be  difficult for you to judje if the TQM834x is
>really a good choice to compare against, and you will not  know  what

I'm using the TQM834X (and the MPC8349ITX/EMDS) boards as a baseline
configuration for my board. Specifically with regards to the processor's
internal cache, I think these are a good choice, as all four boards have
processors in the same family.

Feel free to correct me if I'm wrong. I may be missing something.

Thanks,
Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-10-16 18:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-16  1:04 [U-Boot-Users] Custom MPC8347 Board can't access cache Sparks, Sam
2007-10-16 11:32 ` Jerry Van Baren
2007-10-16 16:02   ` Sparks, Sam
2007-10-16 18:18     ` Sparks, Sam
2007-10-16 18:27       ` Wolfgang Denk
2007-10-16 18:34         ` Sparks, Sam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox