public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] new uboot with relocation change cannot boot when download the bin file to different address than TEXT_BASE
@ 2010-10-09  5:50 Lei Wen
  2010-10-09  6:27 ` Graeme Russ
  2010-10-09  7:43 ` Albert ARIBAUD
  0 siblings, 2 replies; 16+ messages in thread
From: Lei Wen @ 2010-10-09  5:50 UTC (permalink / raw)
  To: u-boot

Hi,

I recently try to port our board code to new uboot, which has been
changed to use new relocation scheme.
But I found a very strange thing, that is if the uboot is loaded to
the TEXT_BASE address, it could run without
problem. But if it is loaded to a different place, it fail to boot up...

I check the code, and found that in the board_init_f, it calls the
init_sequence which is stored as a data sector
in the u-boot.bin file. While the new scheme use the fPIC, the code
could locate the GOT table correctly,
and it seem to forgot what the GOT table stores is context that is
meaningful in TEXT_BASE, not the loaded base.
That is to say, if the TEXT_BASE is 0xf00000, and loaded base is
0x500000, I found the GOT table also filled
with 0xf0****, not the 0x50****. This leads the cpu loading wrong
function address in the init_sequence table, and
cause pc become invalid...

Am I missing something to switch to the new relocation scheme?

Thanks,
Lei

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

end of thread, other threads:[~2010-10-10  9:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-09  5:50 [U-Boot] new uboot with relocation change cannot boot when download the bin file to different address than TEXT_BASE Lei Wen
2010-10-09  6:27 ` Graeme Russ
2010-10-09  6:48   ` Lei Wen
2010-10-09 17:50     ` Wolfgang Denk
2010-10-10  4:33       ` Lei Wen
2010-10-10  6:48         ` Albert ARIBAUD
2010-10-10  6:50         ` Wolfgang Denk
2010-10-10  9:00           ` Lei Wen
2010-10-09  7:43 ` Albert ARIBAUD
2010-10-09  7:53   ` Lei Wen
2010-10-09  8:10     ` Albert ARIBAUD
2010-10-09  8:18       ` Albert ARIBAUD
2010-10-09  8:24       ` Lei Wen
2010-10-09  8:57         ` Albert ARIBAUD
2010-10-09  9:08           ` Lei Wen
2010-10-09  9:23             ` Albert ARIBAUD

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