public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] MPC8315 uboot hangs on relocation
@ 2010-01-07  1:46 Sureshkumar Nagarathinam
  2010-01-07 18:54 ` Wolfgang Denk
  2010-01-07 19:57 ` Jerry Van Baren
  0 siblings, 2 replies; 3+ messages in thread
From: Sureshkumar Nagarathinam @ 2010-01-07  1:46 UTC (permalink / raw)
  To: u-boot

Hi All, 

I am porting the u-boot for a  customized board based on MPC8315 processor. It has DDR2 SDRAM of 128 MB & 8 MB of flash.  I found that the code hangs during the relocation of the code, exactly in the following line  (@ relocation function in cpu/mpc83xx/start.S) 
             lwz  r5, GOT(__bss_start) 

Since the board has only 8MB of flash, I have modified the the TEXT_BASE to 0xFFF80000(as against 0xFE000000).  I am able to access the DDR2 SDRAM(whole 128MB) , I tested it by writing & reading the patterns 0xaaaaaaaa & 0x555555555, So  I assumed the DDR2 SDRAM timing are proper. 

I would like to know the following 
1. What does the 'GOT(__bss_start) do?
2. Do I have to change the linker script since I have changed the TEXT_BASE? 
3. Is there any other cause for hanging?

Thank you in advance for helping
Regards,
Suresh


      

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

* [U-Boot] MPC8315 uboot hangs on relocation
  2010-01-07  1:46 [U-Boot] MPC8315 uboot hangs on relocation Sureshkumar Nagarathinam
@ 2010-01-07 18:54 ` Wolfgang Denk
  2010-01-07 19:57 ` Jerry Van Baren
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2010-01-07 18:54 UTC (permalink / raw)
  To: u-boot

Dear Sureshkumar Nagarathinam,

In message <839118.2412.qm@web112320.mail.gq1.yahoo.com> you wrote:
>
> Since the board has only 8MB of flash, I have modified the the TEXT_BASE to 0xFFF80000(as against 0xFE000000).  I am able to access the DDR2 SDRAM(whole 128MB) , I tested it by writing & reading the patterns 0xaaaaaaaa & 0x555555555, So  I assumed the D
> DR2 SDRAM timing are proper. 

This is absolutely NO guarantee that the RAM is working correctly at
all. You did not try any burst mode accesses. See the FAQ:
http://www.denx.de/wiki/view/DULG/UBootCrashAfterRelocation

> I would like to know the following 
> 1. What does the 'GOT(__bss_start) do?

It's the entry of __bss_start in the GOT (Global Offset Table). But
you don't need to know this. It is unrelated to your problem.

> 2. Do I have to change the linker script since I have changed the TEXT_BASE? 

Are you sure you understood exactly what you changed, and why?

> 3. Is there any other cause for hanging?

RAM not correctly initialized.

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
grep me no patterns and I'll tell you no lines.

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

* [U-Boot] MPC8315 uboot hangs on relocation
  2010-01-07  1:46 [U-Boot] MPC8315 uboot hangs on relocation Sureshkumar Nagarathinam
  2010-01-07 18:54 ` Wolfgang Denk
@ 2010-01-07 19:57 ` Jerry Van Baren
  1 sibling, 0 replies; 3+ messages in thread
From: Jerry Van Baren @ 2010-01-07 19:57 UTC (permalink / raw)
  To: u-boot

Sureshkumar Nagarathinam wrote:
> Hi All, 
> 
> I am porting the u-boot for a  customized board based on MPC8315
> processor. It has DDR2 SDRAM of 128 MB & 8 MB of flash.  I found that
> the code hangs during the relocation of the code, exactly in the
> following line  (@ relocation function in cpu/mpc83xx/start.S)
>              lwz  r5, GOT(__bss_start) 

Besides what Wolfgang wrote, are you sure you have your memory map set 
up properly so GOT(__bss_start) is mapped to a valid piece of memory? 
If your memory map is not configured properly, you might be getting a 
double bus fault (first fault due to unmapped memory, second fault due 
to the bus fault vector causing a bus fault), causing the processor to 
curl up and die.

Depending on processor, processor configuration, and phase of the moon, 
sometimes it is actually the next instruction that is causing the bus 
fault because the processor can prefetch and speculatively execute 
instructions.  Probably not in this case, but be warned.

[snip]

> Thank you in advance for helping
> Regards,
> Suresh

Good luck,
gvb

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

end of thread, other threads:[~2010-01-07 19:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-07  1:46 [U-Boot] MPC8315 uboot hangs on relocation Sureshkumar Nagarathinam
2010-01-07 18:54 ` Wolfgang Denk
2010-01-07 19:57 ` Jerry Van Baren

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