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

vivek.trivedi at wipro.com vivek.trivedi at wipro.com
Fri May 2 08:14:43 CEST 2008


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 at 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
 




More information about the U-Boot mailing list