Author |
Message |
|
|
Post subject: little Endian PPC ?
Posted: Dec 23, 2006 - 11:25
|
|
Newbie

Joined: Nov 04, 2006
Posts: 20
|
|
Hi,
maybe it's just a rumour, but I somewhere read that the PPC is able to do little Endian aswell.
Is it possible to have an application under linux use little endian in a big endian OS ?
.. the reason: I'm porting a programm which isn't endian-aware and it's very hard to find all the littel sins ... |
|
|
|
|
 |
|
Post subject: Re: little Endian PPC ?
Posted: Dec 23, 2006 - 19:59
|
|
Just looking around
Joined: Dec 10, 2006
Posts: 1
Location: Gothenburg
|
|
All Freescale's PowerPCs and IBM's PowerPC 400 family have robust little/big endian support. IBM's high end processors, like the RS64 series and POWER processors have limited support. The only PowerPCs that can't do little endian that are currently in production are the PowerPC 970 and the Cell. All others can be either big or little endian set at boot time, or have special byte swap instructions so one could use both with little overhead at execution time. I think you'll have to consult the documentation on the target CPU to learn what the deal is for that specific PowerPC processor. |
|
|
|
|
 |
|
Post subject: Re: little Endian PPC ?
Posted: Dec 23, 2006 - 23:26
|
|
Order of the Butterfly


Joined: Sep 08, 2003
Posts: 1370
Location: EU
|
|
If I don't recall it wrongly, there is a option in the SmartFirmware to set the default endian. |
_________________ Join the Pegasos.Org Team at Seti@Home.
Last edited by Trizt on Dec 24, 2006 - 09:24; edited 1 time in total
|
|
|
|
 |
|
Post subject: Re: little Endian PPC ?
Posted: Dec 24, 2006 - 06:46
|
|
Order of the Pegasos

Joined: Jan 22, 2004
Posts: 2517
Location: Göteborg
|
|
|
|
 |
|
Post subject: Re: little Endian PPC ?
Posted: Dec 24, 2006 - 08:52
|
|
Order of the Butterfly


Joined: Aug 26, 2003
Posts: 1784
Location: Malmö
|
|
|
|
 |
|
Post subject:
Posted: Dec 24, 2006 - 09:50
|
|
Newbie

Joined: Nov 04, 2006
Posts: 20
|
|
I hoped to switch the endianess per proccess under linux ... which seems impossible.
The problem of the code is, that I don't understand everything of it ... and as it is disk-encryption, writing can become a real dangerous testing job
 |
|
|
|
|
 |
|
Post subject:
Posted: Dec 27, 2006 - 12:08
|
|
Just looking around
Joined: Feb 28, 2005
Posts: 2
|
|
You certainly have to use a test partition. |
|
|
|
|
 |
|
Post subject: Re: little Endian PPC ?
Posted: Dec 31, 2006 - 12:40
|
|
Member


Joined: Jul 10, 2005
Posts: 96
|
|
Henriok wrote: | All Freescale's PowerPCs and IBM's PowerPC 400 family have robust little/big endian support. IBM's high end processors, like the RS64 series and POWER processors have limited support. The only PowerPCs that can't do little endian that are currently in production are the PowerPC 970 and the Cell. All others can be either big or little endian set at boot time, or have special byte swap instructions so one could use both with little overhead at execution time. I think you'll have to consult the documentation on the target CPU to learn what the deal is for that specific PowerPC processor. |
As far as I know the PowerPC doesn't really have any robust little endian support at all. It has a little endian compatibility mode which is infact not true little endian but a mapping trick that's called munging- Which will make it appear to the processor that the environment is little endian as long as you're accessing aligned data, unaligned data however screwes up this trick pretty badly.
Other downsides with this mode- several instructions stop working when the MSR[LE] flag is set- and the only system ever to use the "little endian mode" as far as I know is the Windows NT/PPC release.
And the only Application I know that took adventage of the LE support was VirtualPC.
Apple and IBM later discussed the usefulness of this mode and with the PowerPC 970 support for little endian was dropped, the G5 don't support MSR[LE] at all. |
|
|
|
|
 |
|
Post subject: Re: little Endian PPC ?
Posted: Dec 31, 2006 - 13:55
|
|
Order of the Butterfly


Joined: Aug 26, 2003
Posts: 1784
Location: Malmö
|
|
All the (recent) PPC manuals from Freescale state that the little endian mode is deprecated and that you shouldn't build software depending on it. Besides, the ppc has some great instructions for doing endian conversion anyway. |
_________________ I need this baby in a month send me nine women!
|
|
|
|
 |
|
Post subject: Re: little Endian PPC ?
Posted: Dec 31, 2006 - 17:56
|
|
Order of the Pegasos

Joined: Jan 22, 2004
Posts: 2517
Location: Göteborg
|
|
dholm:
What are the main differences between big and little endian?
Why chose one over the other? |
_________________ www.SecureHosting.se | Egen server med 512 MB RAM och 10 Mbit trafik 250 kr/mån | www.SecureNetworks.se
|
|
|
|
 |
|
Post subject: Re: little Endian PPC ?
Posted: Jan 01, 2007 - 00:35
|
|
Order of the Butterfly


Joined: Sep 08, 2003
Posts: 1370
Location: EU
|
|
I's about how to store bytes, big endians advantage is that you can easilly see if it's possitive or negative, as it begins to store the highest byte in the first address. Little endian stores the smallest byte in the first address.
For a better description you can read this. |
_________________ Join the Pegasos.Org Team at Seti@Home.
|
|
|
|
 |
|