public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ronen Shitrit <rshitrit@il.marvell.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Little Endian on 750GX
Date: Thu, 12 Feb 2004 09:25:57 +0200	[thread overview]
Message-ID: <402B2A85.10903@il.marvell.com> (raw)
In-Reply-To: 20040211125516.1E173C1215@atlas.denx.de

Hi

I know it is better to work with LE, but the we want to be able to check 
our MV64460 LE capabilities,
In 750GX PPC the LE/BE configuration is set in the MSR and isn't sampled 
at reset, so we have to
set it to LE in the first asm commands of the U-Boot.
I got a recommendation on how to do it:

>Little endian is selected by settin the LE bit in the MSR. It's done first
> thing in the code using the following:
>
>
> start:
> #if defined(LENDIAN)
> /*
>  * If target is little endian, switch CPU to LE mode.
>  * Pair each instruction with a nop so bus swapping
>  * does not kill us wrt instruction order.
>  */
>         isync
>         nop
>         li      r1, LO(PSL_ILE|PSL_LE)
>         nop
>         mtspr   srr1, r1
>         nop
>         lis     r1, HI(0xfff00000)
>         nop
>         ori     r1, r1, LO(_in_le)
>         nop
>         mtspr   srr0, r1
>         nop
>         sync
>         nop
>         rfi
>         nop
> _in_le:
> #else
>
> /* Clear MSR to disable interrupts and checks */
>
>         isync
>         li      r1, 0x0
>         sync
>         mtmsr   r1              /* Clear MSR, turns off any translation etc */
>         isync
> #endif
>
> Using a rfi to set the MSR may be a little overkill but it does not give you
> any pipeline suprises! Little endian mode in PowerPC is not a "clean" little
> endian. Instructions are still stored in big endian mode. The NOPS in the
> code assures that the instruction order is correct since the CPU reads 64
> bits at a time and the address bits are "munged".

I tried it but it didn't work, any way I'll work on this issue later on, 
and I'll update you in case it will work for me.

Thanks Ronen


Wolfgang Denk wrote:

>In message <402A133A.8030701@il.marvell.com> you wrote:
>  
>
>>I'm working on Marvell boards DB64460 with 750GX, Big Endian.
>>We are trying to check whether we can work with the 750FX in Little 
>>Endian mode.
>>    
>>
>
>Don't.
>
>  
>
>>How can I change it?? if I'll will try to change it in the code , the 
>>code should be in BE, but I want to run in LE??
>>    
>>
>
>What do you mean - code in BE, running in LE???
>
>Which specific problem are you trying to  solve?  In  general  it  is
>considered  to  be  easier to stichk with the "native" byteorder (BE)
>and fix any existing software (drivers) where needed.
>
>
>Best regards,
>
>Wolfgang Denk
>
>  
>

-- 
Ronen Shitrit

M.S.I.L
D.N. Misgav  20184
Tel:   +972-4-9951000
Fax:   +972-4-9951001
Email: mailto: ronen.shitrit at il.marvell.com
_____________________________________________________________
This message may contain confidential, proprietary or legally privileged 
information. The information is intended only for the use of the individual 
or entity named above. If the reader of this message is not the intended 
recipient, you are hereby notified that any dissemination, distribution 
or copying of this communication is strictly prohibited. If you have 
received this communication in error, please notify us immediately by 
telephone, or by e-mail and delete the message from your computer.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20040212/0ac1b3a5/attachment.htm 

      reply	other threads:[~2004-02-12  7:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-11 11:34 [U-Boot-Users] Little Endian on 750GX Ronen Shitrit
2004-02-11 12:55 ` Wolfgang Denk
2004-02-12  7:25   ` Ronen Shitrit [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=402B2A85.10903@il.marvell.com \
    --to=rshitrit@il.marvell.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