question about the little-endian in sparc

Thread Tools Search this Thread
Operating Systems Solaris question about the little-endian in sparc
# 1  
Old 11-20-2008
question about the little-endian in sparc

hi folks, in the sparc v9 manul , it says it is possible to access the memory data in little-endian mode, but there is only privilaged instruction that could set the PSTATE ( the cle bit ) regist. if I'm in the user mode , is it possible for me to access the data in little-endian mode?
# 2  
Old 11-21-2008
No, the OS determines the endian type for the system. This feature is so that you could more easily port a little endian OS to a sparc cpu. Ideally, you should ignore endianness. Solaris is both little endian on intel and big endian on sparc. A well written program will work in either version.
# 3  
Old 11-22-2008
You can't from user mode because, as you already noticed, this instruction is privileged. You can't even do it unless you implement your own system call as there is no support for doing it under Solaris.

That little endian mode was designed to allow porting Windows NT to the SPARC architecture, a port which obviously was never released.
# 4  
Old 11-22-2008
Great link! I had a suspicion that this feature was implemented with NT in mind, but I didn't think that I would ever see any proof of that.
# 5  
Old 11-23-2008
is there some solaris os using little-endian mode ? if the open-solaris support intel x86 cpu , then there must exist some solaris os supporting little-endian mode, but I'm not sure if I can install it on sparc system.
# 6  
Old 11-23-2008
The Solaris source code is portable to SPARC and x86/x64. It is always built on big endian when on SPARC and little endian when on x86/x64.

Compiling the SPARC kernel in little endian would probably be quite a complex (and useless?) task. I'm not sure how hardware support would be impacted.

What exactly are you trying to achieve ?
# 7  
Old 11-23-2008
MAybe the OP needs htonl() --

The function itself will not help Solaris is big endian and so is the "network", but there are lots of examples of code out there that switches endian-ness (endianity?)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Endian vs pfsense??

Hi Endian firewall free version if we do compare pfsense For a LAN network with active user 1000 Which do you recommend Share (0 Replies)
Discussion started by: mnnn
0 Replies

2. UNIX for Dummies Questions & Answers

can I emulate solaris/sparc on virtualbox? Or other emulator to run solaris for sparc in my win7 PC?

Hi Gurus can I emulate solaris/sparc on virtualbox? Or other emulator to run solaris for sparc in my win7 PC? regards, Israel. (9 Replies)
Discussion started by: iga3725
9 Replies

3. Solaris

sparc 5 HD question

i know this is hardware, not software related, but i figure this would be a good place to ask.. I have a sparcstation/5 and what to make a file server out of it. Does anyone know what the largest SCA disk that it will accept? (2 Replies)
Discussion started by: gopher2
2 Replies

4. UNIX and Linux Applications

Migrating Oracle from Big Endian to Little Endian Platorm

Hi, We are trying to migrate an oracle database from Sun Solaris (SunOS 5.9 Generic_118558-28 sun4u sparc SUNW,Ultra-60) to Linux 2.6.18-53.1.19.el5 #1 SMP Tue Apr 22 03:01:10 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux which is basically a Big Endian to Little Endian conversion. We shutdown... (3 Replies)
Discussion started by: luft
3 Replies

5. UNIX for Dummies Questions & Answers

Little Endiean and Big Endian

Dear Friends, I have one question in my mind. That question is "how to detect whether the system is little endiean or big endian" Processing the bit position is the difference between this endians. But I could not understand how to find the pariticular sytem works... (3 Replies)
Discussion started by: Nirmal Babu
3 Replies

6. UNIX for Advanced & Expert Users

Endian Conversion

Hi everybody, I met this week a problem. For now, we used TRU64 system based on alpha. Now, we're installing UP-UX systems (on Itanium). And we have problem with our files. Indeed, we use file with COMP-3, COMP-5 data. These files are used on both platforms. (we use also TXT files which... (1 Reply)
Discussion started by: bigmike59270
1 Replies

7. Programming

Big and Little Endian

We are developing an application using TLI for network communication.The Server Code is developed in Sun and client in SCO unix. When we route data from Client to Server we encrypt the data using DES algotithm utility.The problem we are facing that Sun uses Big Endian methodology to store data in... (1 Reply)
Discussion started by: S.P.Prasad
1 Replies

8. UNIX for Dummies Questions & Answers

Insane question : Playing mp3 file from Sun Sparc

hi, i know this is crazy. but i can do this from linux in intel platform. just wonder can my Sun Solaris 8 sparc can do the same thing? (2 Replies)
Discussion started by: champion
2 Replies

9. UNIX for Advanced & Expert Users

AIX endian again

Hi all I know AIX is big-endian machine.But does it read bytes in normal way from LSB. Does it happen in some machine that at multi-byte integer level it is Little-endian and while reading a single byte it is Big-Endian. This is urgent Thanks in advance. (3 Replies)
Discussion started by: Shobhit
3 Replies

10. UNIX for Advanced & Expert Users

Endian issues in TCP/IP

Hello, Can anybody tell me whether the little endian-big endian issues will affect porting from True64 to HP UNIX or TCP/IP will take care of that? If it affects what can be the solution. Thank you, (3 Replies)
Discussion started by: informshilpa
3 Replies
Login or Register to Ask a Question

Featured Tech Videos