www.pegasos.org :: View topic - little Endian PPC ?
http://www.ggsdata.se
Home   News   Forum   Gallery   
Search 
Login




 


 Log in Problems?
 New User? Sign Up!

Navigation

Online
Currently no members online:)

You are an anonymous user. You can register for free by clicking here
There are 1 unlogged users online !

Latest Web Links

Latest Downloads

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
judas
5 Post subject: little Endian PPC ?  PostPosted: 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 ...
 
 View user's profile Send private message  
Reply with quote Back to top
Henriok
Post subject: Re: little Endian PPC ?  PostPosted: 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.
 
 View user's profile Send private message AIM Address ICQ Number 
Reply with quote Back to top
Trizt
Post subject: Re: little Endian PPC ?  PostPosted: Dec 23, 2006 - 23:26
Order of the Butterfly
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
 
 View user's profile Send private message MSN Messenger ICQ Number 
Reply with quote Back to top
ironfist
Post subject: Re: little Endian PPC ?  PostPosted: Dec 24, 2006 - 06:46
Order of the Pegasos
Order of the Pegasos


Joined: Jan 22, 2004
Posts: 2517
Location: Göteborg
Engrish, Engrish, Engrish..

_________________
www.SecureHosting.se | Egen server med 512 MB RAM och 10 Mbit trafik 250 kr/mån | www.SecureNetworks.se
 
 View user's profile Send private message ICQ Number 
Reply with quote Back to top
dholm
Post subject: Re: little Endian PPC ?  PostPosted: Dec 24, 2006 - 08:52
Order of the Butterfly
Order of the Butterfly


Joined: Aug 26, 2003
Posts: 1784
Location: Malmö
It's easier to just fix the software rather than to run the CPU in little endian mode since then the entire OS has to be in this mode as well.

_________________
I need this baby in a month send me nine women!
 
 View user's profile Send private message Send e-mail Visit poster's website ICQ Number 
Reply with quote Back to top
judas
Post subject:   PostPosted: 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

Surprised
 
 View user's profile Send private message  
Reply with quote Back to top
MajorTom
Post subject:   PostPosted: Dec 27, 2006 - 12:08
Just looking around


Joined: Feb 28, 2005
Posts: 2

You certainly have to use a test partition.
 
 View user's profile Send private message  
Reply with quote Back to top
Frek
Post subject: Re: little Endian PPC ?  PostPosted: Dec 31, 2006 - 12:40
Member
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.
 
 View user's profile Send private message  
Reply with quote Back to top
dholm
Post subject: Re: little Endian PPC ?  PostPosted: Dec 31, 2006 - 13:55
Order of the Butterfly
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!
 
 View user's profile Send private message Send e-mail Visit poster's website ICQ Number 
Reply with quote Back to top
ironfist
Post subject: Re: little Endian PPC ?  PostPosted: Dec 31, 2006 - 17:56
Order of the Pegasos
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
 
 View user's profile Send private message ICQ Number 
Reply with quote Back to top
Trizt
Post subject: Re: little Endian PPC ?  PostPosted: Jan 01, 2007 - 00:35
Order of the Butterfly
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.
 
 View user's profile Send private message MSN Messenger ICQ Number 
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2004-2012 by pegasos.org

backend|avantgo