From: David Hawkins <dwh@ovro.caltech.edu>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Configuring U-Boot for MPC8349E in little endian mode
Date: Fri, 02 May 2008 09:35:19 -0700 [thread overview]
Message-ID: <481B42C7.5000100@ovro.caltech.edu> (raw)
In-Reply-To: <47230CE166B64744B0120173E4C2161E04D53404@BLR-EC-MBX01.wipro.com>
Hi Vivek,
> 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".
Data sheets need to be read in the wider context of knowing
how the devices are 'typically used'. Just because a core
can operate in little-endian, doesn't mean you should :)
> So, according to data sheet I have done following changes
> in U-Boot to configure it in true little endian mode
The convention for this processor, and pretty much all
other PowerPCs is to operate in big-endian mode.
> 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.
The PowerPC should be operated in big-endian mode, so that you
have the wider support of the community. There is absolutely
no reason to operate the processor in little-endian mode
just because you want to talk to little-endian processors
over the little-endian PCI bus.
The overhead of any required byte-swapping functions is
negligible.
Regardless of what mode your PowerPC host operates versus
your DSPs, you will have to use a communications protocol
that enforces data alignment and format, eg. a C-structure
on the DSP will more than likely not have the same layout
as the same C-structure compiled on the PowerPC. There
is the issue of endianness, but also the issue of alignment
and packing. As such you would write an encode/serialization
function to send data, and a decode/deserialization function
to decode data.
There are standardized machine independent binary formats
already defined, eg. XDR as used by NFS, and CDR as used
by CORBA. Application code written using this technique is
transparent to the endianness of the underlying processor.
I use little-endian x86 hosts to communicate with about 20
little-endian DSPs, or big-endian PowerPCs (MPC8349EAs).
The devices communicate using CDR. I use the ACE C++ library
and its CDR encode/decode functions on the x86 and PowerPCs,
while on the DSPs, I use C-structures and pack/unpack them
to match the equivalent CDR encoded functions. The overhead
of data conversion is insignificant.
I hope that given this insight you will understand why
you are recommended to operate the processor in its
'standard' big-endian mode.
Cheers,
Dave
next prev parent reply other threads:[~2008-05-02 16:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 15:34 [U-Boot-Users] Configuring U-Boot for MPC8349E in little endian mode vivek.trivedi at wipro.com
2008-04-30 15:45 ` Wolfgang Denk
2008-04-30 22:13 ` David Hawkins
2008-05-02 6:14 ` vivek.trivedi at wipro.com
2008-05-02 7:22 ` Kumar Gala
2008-05-02 12:38 ` Jerry Van Baren
2008-05-02 16:35 ` David Hawkins [this message]
2008-05-02 9:19 ` vivek.trivedi at wipro.com
2008-05-02 14:34 ` Timur Tabi
2008-05-02 16:52 ` David Hawkins
2008-05-02 19:47 ` Timur Tabi
2008-05-02 20:23 ` David Hawkins
2008-05-02 20:30 ` Timur Tabi
2008-05-02 21:48 ` David Hawkins
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=481B42C7.5000100@ovro.caltech.edu \
--to=dwh@ovro.caltech.edu \
--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