public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Running test code from RAM while having GOT pointing to flash
Date: Tue, 25 Oct 2005 07:45:39 -0400	[thread overview]
Message-ID: <435E1AE3.3040408@smiths-aerospace.com> (raw)
In-Reply-To: <4A062D477D842B4C8FC48EA5AF2D41F20152806A@us-bv-m23.global.tektronix.net>

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

      parent reply	other threads:[~2005-10-25 11:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=435E1AE3.3040408@smiths-aerospace.com \
    --to=gerald.vanbaren@smiths-aerospace.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox