All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] relocate_code problem
@ 2004-07-06  7:52 Oliver Fuchs
  2004-07-06  8:06 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Fuchs @ 2004-07-06  7:52 UTC (permalink / raw)
  To: u-boot

Hi all,

I try to get up U-Boot 1.1.1 on a "home brewed" board with MPC8280 and
have problems with the relocation of code.
It crashes after the call of in_ram. It seems that it calculates the address
of in_ram correctly, but the copied code is somehow shifted.
Is there anyone who can point me to the function that copies the code into RAM?
Sorry, but the assembler code is not my favorite thing.

Thanks in advance,
Oliver


----
some extra info:

symbol in_ram is linked to 0xfff03404
relocate_code is called: relocate_code( 03fbdf48, 03fbdf6c, 03fdf000)
relocate_ram jumps to 0x03fe2404 // there is code, but not in_ram

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

* [U-Boot-Users] relocate_code problem
  2004-07-06  7:52 [U-Boot-Users] relocate_code problem Oliver Fuchs
@ 2004-07-06  8:06 ` Wolfgang Denk
  2004-07-06 15:19   ` Oliver Fuchs
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2004-07-06  8:06 UTC (permalink / raw)
  To: u-boot

In message <40EA7675.1087.8A1955@localhost> you wrote:
> 
> I try to get up U-Boot 1.1.1 on a "home brewed" board with MPC8280 and
> have problems with the relocation of code.
> It crashes after the call of in_ram. It seems that it calculates the address
> of in_ram correctly, but the copied code is somehow shifted.

Maybe it just looks shifted or repeated?

RTFM - http://www.denx.de/twiki/bin/view/DULG/UBootCrashAfterRelocation

> Is there anyone who can point me to the function that copies the code into RAM?
> Sorry, but the assembler code is not my favorite thing.

You don't need much knowledge about assembler code. "grep" will  just
do  fine  (hint: search for "relocate_code", and probably you want to
searchin the  relevant  directory  with  CPU  specific  code,  i.  e.
"cpu/mpc8260/").

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
If the hours are long enough and the pay  is  short  enough,  someone
will say it's women's work.

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

* [U-Boot-Users] relocate_code problem
  2004-07-06  8:06 ` Wolfgang Denk
@ 2004-07-06 15:19   ` Oliver Fuchs
  2004-07-06 21:10     ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Fuchs @ 2004-07-06 15:19 UTC (permalink / raw)
  To: u-boot

From:           	Wolfgang Denk <wd@denx.de>
Date sent:      	Tue, 06 Jul 2004 10:06:21 +0200

> > of in_ram correctly, but the copied code is somehow shifted.
> 
> Maybe it just looks shifted or repeated?
You are right. It was hard to accept the idea that the seen code was not within the RAM.

> 
> You don't need much knowledge about assembler code. "grep" will  just
> do  fine  (hint: search for "relocate_code", and probably you want to
> searchin the  relevant  directory  with  CPU  specific  code,  i.  e.
> "cpu/mpc8260/").
It was not the problem to find relocate_code. I was not smart enough to recognize
the nice little loop. Because the destination content did not change during relocate_code,
I thought it was done elsewhere.


> Best regards,
> 
> Wolfgang Denk

Thanks,
Oliver Fuchs

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

* [U-Boot-Users] relocate_code problem
  2004-07-06 15:19   ` Oliver Fuchs
@ 2004-07-06 21:10     ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2004-07-06 21:10 UTC (permalink / raw)
  To: u-boot

In message <40EADF20.20424.AE0466@localhost> you wrote:
> 
> > > of in_ram correctly, but the copied code is somehow shifted.
> > 
> > Maybe it just looks shifted or repeated?
> You are right. It was hard to accept the idea that the seen code was not within the RAM.

Probably your SDRAM init sequence is broken.

> It was not the problem to find relocate_code. I was not smart enough to recognize
> the nice little loop. Because the destination content did not change during relocate_code,
> I thought it was done elsewhere.

Well, check your RAM init code.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Wenn das dann in die Hose geht, nehme ich es auf meine Kappe.
                                         -- Rudi V?ller, 15. Nov 2003

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

end of thread, other threads:[~2004-07-06 21:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-06  7:52 [U-Boot-Users] relocate_code problem Oliver Fuchs
2004-07-06  8:06 ` Wolfgang Denk
2004-07-06 15:19   ` Oliver Fuchs
2004-07-06 21:10     ` Wolfgang Denk

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.