* [U-Boot-Users] Little Endian on 750GX
@ 2004-02-11 11:34 Ronen Shitrit
2004-02-11 12:55 ` Wolfgang Denk
0 siblings, 1 reply; 3+ messages in thread
From: Ronen Shitrit @ 2004-02-11 11:34 UTC (permalink / raw)
To: u-boot
Hi all
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.
as I saw in the 750GX UM the default settings in the MSR is that the CPU
is in BE,
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??
does any one have any idea??
besides for this issue what are the changes required for working with
the U-Boot in LE,
I already add a gcc flag -mlittle_endian and an ld flag -EL.
Thanks a lot
--
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] Little Endian on 750GX
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
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2004-02-11 12:55 UTC (permalink / raw)
To: u-boot
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
--
See us @ Embedded World, Nuremberg, Feb 17 - 19, Hall 12.0 Booth 440
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
Any sufficiently advanced technology is indistinguishable from magic.
- Arthur C. Clarke
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] Little Endian on 750GX
2004-02-11 12:55 ` Wolfgang Denk
@ 2004-02-12 7:25 ` Ronen Shitrit
0 siblings, 0 replies; 3+ messages in thread
From: Ronen Shitrit @ 2004-02-12 7:25 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-12 7:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox