* [U-Boot-Users] Running test code from RAM while having GOT pointing to flash
@ 2005-10-25 3:35 atul.sabharwal at exgate.tek.com
2005-10-25 6:50 ` Wolfgang Denk
2005-10-25 11:45 ` Jerry Van Baren
0 siblings, 2 replies; 3+ messages in thread
From: atul.sabharwal at exgate.tek.com @ 2005-10-25 3:35 UTC (permalink / raw)
To: u-boot
I am a newbie at PowerPC assembly. In my last patch, I submitted a series
of test as part of my work in bringing up the memory controller.
My code seems to be crashing in the relocate_code routine while switching
from flash to RAM. There was an address_probe fixup which was not enabled
And I enabled it. So, the relocation table (GOT) gets copied successfully
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] Running test code from RAM while having GOT pointing to flash
2005-10-25 3:35 [U-Boot-Users] Running test code from RAM while having GOT pointing to flash atul.sabharwal at exgate.tek.com
@ 2005-10-25 6:50 ` Wolfgang Denk
2005-10-25 11:45 ` Jerry Van Baren
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2005-10-25 6:50 UTC (permalink / raw)
To: u-boot
In message <4A062D477D842B4C8FC48EA5AF2D41F20152806A@us-bv-m23.global.tektronix.net> you wrote:
> My code seems to be crashing in the relocate_code routine while switching
> from flash to RAM. There was an address_probe fixup which was not enabled
> And I enabled it. So, the relocation table (GOT) gets copied successfully
> From flash to RAM but the code dies seomewhere between coping the fixups
I think you misunderstand the function of the GOT.
> And the in_ram label. Somehow, on my BDI, it sees an exception and goes
> to the reset vector i.e 0x100.
See the FAQ at http://www.denx.de/wiki/view/DULG/UBootCrashAfterRelocation
> My approach is to avoid the GOT stuff and write a test routine which is
The "GOT stuff" is known to work just fine. I suggest you focus on
the remaining stuff, i. e. your SDRAM init sequence. Again, see the
FAQ.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I often quote myself; it adds spice to my conversation. - G. B. Shaw
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] Running test code from RAM while having GOT pointing to flash
2005-10-25 3:35 [U-Boot-Users] Running test code from RAM while having GOT pointing to flash atul.sabharwal at exgate.tek.com
2005-10-25 6:50 ` Wolfgang Denk
@ 2005-10-25 11:45 ` Jerry Van Baren
1 sibling, 0 replies; 3+ messages in thread
From: Jerry Van Baren @ 2005-10-25 11:45 UTC (permalink / raw)
To: u-boot
atul.sabharwal at exgate.tek.com wrote:
> I am a newbie at PowerPC assembly. In my last patch, I submitted a series
> of test as part of my work in bringing up the memory controller.
[snip]
> My first cut at it is here but it is complaining about GOT. Not enough
> experience with ld... Help/tips ??
>
>
> __asm__ __volatile__( \
> " lis r10, 0x0 at h\n" \
> " eieio\n" \
> " lis r3, address at l\n" \
> " ori r3, r3, address at h\n" \
> " lis r4, fillpattern at l\n" \
> " ori r4, r4, fillpattern at h\n" \
> " lis r5, bytecount at l\n" \
> " ori r5, r5, bytecount at h\n" \
> " b 0x0\n" \
> );
>
> Thanks,
>
> Atul
This has nothing to do with your current problems, but if you try to run
the above code, it won't work. You are doing a "load shifted" of the
_lower_ half of the word and then oring in the _upper_ half of the word.
You need to switch your "@l" (low half) and "@h" (high half). What
you have will give you a halfword-swapped value:
Want: 01234567
Oops: 45670123
gvb
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-10-25 11:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-25 3:35 [U-Boot-Users] Running test code from RAM while having GOT pointing to flash atul.sabharwal at exgate.tek.com
2005-10-25 6:50 ` Wolfgang Denk
2005-10-25 11:45 ` 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