[U-Boot-Users] Configuring U-Boot for MPC8349E in little endian mode

vivek.trivedi at wipro.com
2008-05-02T09:19:40Z

Hi,
Thanks all for quick response.

Actually we are having a huge application for video capture which is
presently running on x86 based board having some DSPs. As per the data
sheet of MPC8349E(e300 core), MPC8349E can be configured in true little
endian mode.

So, if we are able to configure MPC8349E(e300 core) in true little
endian mode, we can utilize our huge x86 based application on MPC8349E.
That is why we want to know whether MPC8349E(e300 core) is tested on
true little endian mode till now..?

If it has been tested in true little endian mode what are the necessary
settings in U-Boot except RCWH change, LE bit field in MSR register and
LET bit field in HID2 register.

If MPC8349E(e300 core) is not tested in true little endian mode till
now, what could be the reason ..?
What are the drawbacks/problems we could face during the little endian
configuration of MPC8349E(e300-core)..?

Please give your suggestions/comments on this.
Any help/comment will be appreciated.

Thanks,
Vivek Trivedi

>
>
> We want to configure MPC8349E in little endian as some other PCI
> devices(DSPs) are operating in little endian.

Why should the fact that the DSPs over PCI being little endian impact
how you run the 8349? All the u-boot and linux drivers deal with this
for every PCI device I'm aware of and run the 8349 (and all PowerPC
chips) in big-endian mode.

All access to the PCI device registers are wrapped in functions that do
the proper byte swapping for you.

- k

-----Original Message-----
From: Vivek Trivedi (WT01 - Embedded & Product Engineering)
Sent: Friday, May 02, 2008 11:45 AM
To: Vivek Trivedi (WT01 - Embedded & Product Engineering);
'u-boot-users at lists.sourceforge.net'
Cc: 'kim.phillips at freescale.com'
Subject: RE: Configuring U-Boot for MPC8349E in little endian mode

Hi,
Thanks all for quick response.

Sorry, I forgot to tell that we are using MPC8349E processor with a
"e300 core".
And it is clearly mentioned in the e300 core datasheet that, it supports
"True little-endian mode for compatibility with other true little-endian
devices".

So, according to data sheet I have done following changes in U-Boot to
configure it in true little endian mode:
RCWH for little endian mode and enable the Little-endian mode in e300
core registers MSR bit LE and HID2 registers bit LET.

After doing these settings core is able to fetch RCW from flash and
execute some assembly code in Start.S.
But I am not able to understand why e300 core(i.e. MPC8349E in True) is
not executing branch instruction(b , bl) only and jumping to alignment
exception vector handler(0x600).

Do, I need to enable some -m alignment flag in U-Boot build so that
e300-core can execute branch instructions.
Is the e300-core is not able to interpret branch instruction(b , bl) in
true little endian mode...?

Has any one tried to configure and run U-Boot for MPC8349E
processor(e300 core) in true little endian mode...?
Are missing any other setting in U-Boot for little endian operation...?

We want to configure MPC8349E in little endian as some other PCI
devices(DSPs) are operating in little endian.

Any help/suggestion will be appreciated.

Thanks,
Vivek Trivedi

In message
<47230CE166B64744B0120173E4C2161E04D531CF@BLR-EC-MBX01.wipro.com> you
wrote:
>
> We are using MPC8349E based board in big endian mode. It is working
> fine with U-Boot 1.1.3 .

Yes. Big endian is the natural byte order for PowerPC.

> Now due to some reason we have to configure 8349E in little endian
mode.

Don't. You're on the road to trouble. Stop now.

Figure out what "some reason" is, and how to solve it differently, i.
e. in a sane way.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You see things; and you say ``Why?'' But I dream things that never
were; and I say ``Why not?''
- George Bernard Shaw _Back to Methuselah_ (1921) pt. 1, act 1

-----Original Message-----
From: Vivek Trivedi (WT01 - Embedded & Product Engineering)
Sent: Wednesday, April 30, 2008 9:05 PM
To: u-boot-users at lists.sourceforge.net
Cc: kim.phillips at freescale.com; Vivek Trivedi (WT01 - Embedded & Product
Engineering)
Subject: Configuring U-Boot for MPC8349E in little endian mode

Hi,
We are using MPC8349E based board in big endian mode. It is working fine
with U-Boot 1.1.3 .
Now due to some reason we have to configure 8349E in little endian mode.
I have modified RCW, HID2 and MSR registers for this and built the
U-Boot with -mlittle-endian(gcc 3.4.3) and -EL (ld option ).

Now code is starting properly in Start.S but it is jumping to alignment
vector(0x600) whenever it hits a branch instruction(b , bl).
Then it stops at 0x63F in alignment exception vector handler.

Has any one tried configuring U-Boot for MPC8349E in little endian mode
...?
We have also tried to build U-Boot with -mstrict-align option, but it
has not helped us.
Are we missing any alignment option in gcc for compiling U-Boot.

Any help will be appreciated.

Thanks,
Vivek Trivedi