Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Endianess on MIPS?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
_lior_
n00b
n00b


Joined: 29 Dec 2004
Posts: 13

PostPosted: Sat Dec 24, 2005 11:37 am    Post subject: Endianess on MIPS? Reply with quote

is it possible to switch the endian format via software on MIPS? I would like to have a little-endian running Octane or Indy to develop and port some little piece of apps for a Xilleon target which has a 4kc little-endian embedded core.

cross compiling sometimes sucks!
Back to top
View user's profile Send private message
drwook
Veteran
Veteran


Joined: 30 Mar 2005
Posts: 1324
Location: London

PostPosted: Sat Dec 24, 2005 1:35 pm    Post subject: Reply with quote

AFAIK no I'm afraid.

What about running under an emulator for a little endian arch though?
Back to top
View user's profile Send private message
_lior_
n00b
n00b


Joined: 29 Dec 2004
Posts: 13

PostPosted: Sat Dec 24, 2005 11:06 pm    Post subject: Reply with quote

emulators are worst than cross compiling.
Back to top
View user's profile Send private message
Redhatter
Retired Dev
Retired Dev


Joined: 20 Sep 2003
Posts: 548
Location: Brisbane, QLD, Australia

PostPosted: Sun Dec 25, 2005 12:12 pm    Post subject: Reply with quote

Afraid not... otherwise I would have a nice mipsel userland sitting on iluxa's IP27 to do stage builds on. :-)

Endianness is decided by the wriing of the CPU to the memory banks and other devices, not by registers alone.
_________________
Stuart Longland (a.k.a Redhatter, VK4MSL)
I haven't lost my mind - it's backed up on a tape somewhere...

Gentoo/MIPS Cobalt developer, Mozilla herd member.
Back to top
View user's profile Send private message
drwook
Veteran
Veteran


Joined: 30 Mar 2005
Posts: 1324
Location: London

PostPosted: Mon Dec 26, 2005 9:45 am    Post subject: Reply with quote

Indeedy.

Just wondering what the problems you're having cross-compiling though?

& what the problem with emulation is, other than loss of performance?
Back to top
View user's profile Send private message
Redhatter
Retired Dev
Retired Dev


Joined: 20 Sep 2003
Posts: 548
Location: Brisbane, QLD, Australia

PostPosted: Mon Dec 26, 2005 1:11 pm    Post subject: Reply with quote

Cross compiling a userland requires all sorts of voodoo. Believe me, I've tried. :-)

Emulation isn't bad when it works well... and after all, the boxes we're using aren't particularly fast. (My Qube2 runs at a whopping 250MHz, and has no secondary cache) But most emulators I've seen bearly break the 100MHz mark emulating a MIPS on a modern x86 system.
_________________
Stuart Longland (a.k.a Redhatter, VK4MSL)
I haven't lost my mind - it's backed up on a tape somewhere...

Gentoo/MIPS Cobalt developer, Mozilla herd member.
Back to top
View user's profile Send private message
Kumba
Developer
Developer


Joined: 16 Jul 2002
Posts: 393
Location: Sigma 957

PostPosted: Fri Jan 06, 2006 6:05 am    Post subject: Reply with quote

SGI Systems are explicitly hardwired to Big Endian. Some of the newer MIPS Technologies development boards, and those out of AMD and Broadcom can switch endianess by uploading a new firmware into the flash memory and flipping a jumper, I believe. But such boards are extremely rare, and thus, none of us have any of them in our possession to tinker with.


--Kumba
_________________
"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Back to top
View user's profile Send private message
GNUtoo
Veteran
Veteran


Joined: 05 May 2005
Posts: 1919

PostPosted: Sat Jan 14, 2006 3:46 am    Post subject: Reply with quote

and how do you do this on a G4 (powerpc) ?
they are bi-endian
by defaault they are big-endian on apple machines
that would be interesting...
Back to top
View user's profile Send private message
Redhatter
Retired Dev
Retired Dev


Joined: 20 Sep 2003
Posts: 548
Location: Brisbane, QLD, Australia

PostPosted: Sat Jan 14, 2006 4:06 am    Post subject: Reply with quote

G4s probably have a hardware switch like MIPS. In any case, you'd need new firmware and OS to cope with the little endian CPU, it can't be done purely in software.
_________________
Stuart Longland (a.k.a Redhatter, VK4MSL)
I haven't lost my mind - it's backed up on a tape somewhere...

Gentoo/MIPS Cobalt developer, Mozilla herd member.
Back to top
View user's profile Send private message
GNUtoo
Veteran
Veteran


Joined: 05 May 2005
Posts: 1919

PostPosted: Sun Jan 15, 2006 12:08 am    Post subject: Reply with quote

too bad
now i understand why this is a problem for darwine...
Back to top
View user's profile Send private message
Blood Fluke
Apprentice
Apprentice


Joined: 15 Sep 2005
Posts: 224

PostPosted: Thu Feb 02, 2006 6:05 am    Post subject: Reply with quote

Redhatter wrote:
But most emulators I've seen bearly break the 100MHz mark emulating a MIPS on a modern x86 system.

Most MIPS chips barely break the 100 MHz mark :P Also, MIPSel emulation is really pretty decent these days. e.g. Gxemul or Simics

Gxemul primarily does DEC-MIPS emulation. Not all that useful for emulating your embedded target boards. It handles some other stuff, too, but the DEC-MIPS emulation is the most highly developed piece.

Virtutech Simics simulates the MIPS Malta eval board and a variety of processors. It's free for non-commercial use. (With the exception of research projects. Non-research academic use is fine under the free license, though.) I would expect that porting linux as a hobby qualifies for the free license :)

(Simics does a lot of other architectures and other stuff, but MIPS emulation is what's relevant to this thread...)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum