Unix Emulation

MAME/MESS, Vice(C64), Stella(VCS2600), UAE(Amiga) and more.
Nai
Posts: 1
Joined: Sun Nov 02, 2008 6:24 pm

Unix Emulation

Unread postby Nai » Sun Nov 02, 2008 7:46 pm

I have SGI systems but interested in cloneing a disk to run inside an emulated environment (on Linux x86). Has anyone emulated irix-mips, sunos-sparc, hpux-parisc or aix-rs6000 on a linux_x86 system sucessfully. I searched the forums for older threads but did not see a solution in relation to the irix side of things.
0\

User avatar
josehill
Moderator
Moderator
Posts: 3292
Joined: Mon Jun 06, 2005 9:53 pm
Location: New England, USA
Contact:

Re: Unix Emulation

Unread postby josehill » Sun Nov 02, 2008 9:25 pm

No one has done it, at least for IRIX.

User avatar
porter
Posts: 2917
Joined: Wed Nov 01, 2006 10:37 pm
Location: NZ

Re: Unix Emulation

Unread postby porter » Sun Nov 02, 2008 9:35 pm

I am led to believe there is a DEC Alpha emulator that will run either DIGITAL UNIX or Tru64. There is also a PowerPC emulator that can run darwin. Oh, and I've also run UNIX release 7 on a PDP 11 emulator.
Land of the Long White Cloud and no Software Patents.

kramlq
Donor
Donor
Posts: 988
Joined: Tue Sep 20, 2005 5:10 pm
Location: IRL

Re: Unix Emulation

Unread postby kramlq » Mon Nov 03, 2008 1:22 am

There are various emulators for UNIX/RISC platforms available.

PersonalAlpha at the following site can apparently do Tru64, but I haven't tried it out. AFAIK it is from a DEC research project, so it should be fairly good.
http://www.emulatorsinternational.com/e ... lalpha.htm

BTW, you can also run DEC Ultrix using gxemul.

SimOS/MIPS can run a modified version of IRIX 5.3 on an IRIX/MIPS host, but is really slow when using Mipsy CPU model (embra just crashes, but I didn't look into it). SimOS/MIPS also runs on X86, but I couldnt try IRIX in it because the version I use in Linux/X86 has some custom hacks for some MIPS code I was testing. In theory it should work, but there might be some bugs to fix in SimOS first.

For SunOS/Solaris, there were some versions of SimICS that could emulate a SPARCstation. It might be only for SPARC hosts though.

I don't think there is an emulator for HPPA/HP-UX. HPPA isn't a nice architecture, and some of the more unusual features of it would be very slow to emulate.

Also, on the non-x86 front:
SimOS/PPC can do some modified versions of AIX, but requires a PPC host.
SimOS/Alpha can run a modified version of Digital Unix 4, but needs an Alpha host.

User avatar
hamei
Posts: 10430
Joined: Tue Feb 24, 2004 4:10 pm
Location: over the rainbow

Re: Unix Emulation

Unread postby hamei » Mon Nov 03, 2008 3:15 am

kramlq wrote: HPPA isn't a nice architecture ...

Really ? In what way ?

kramlq
Donor
Donor
Posts: 988
Joined: Tue Sep 20, 2005 5:10 pm
Location: IRL

Re: Unix Emulation

Unread postby kramlq » Mon Nov 03, 2008 4:13 am

hamei wrote:
kramlq wrote: HPPA isn't a nice architecture ...

Really ? In what way ?


I was kind of speaking generally there, rather than purely from an emulation perspective. Stuff like:
- its rather limited atomic primitives (it can only load and clear a word atomically)
- Disabling virtual addressing and entering physical addressing mode during an interrupt or exception.
- It uses the cache for both virtual and physical modes, which means aliasing issues can occur between the same location accessed via a virtual and physical address.
- Ambiguously defined instructions like cache line operations, which have implementation specific behaviour.
- It has more trap situations than most processors, which means more conditions to check for in an emulator (e.g. trap every time a branch instruction is taken).
- General register shadowing when an interrupt or exception occurs, and live mirroring of certain control registers. That means more overhead for an emulator.

HPPA is certainly not the worst CPU (that would be the IA32 and IA64), but as RISCs go, it isn't the nicest either IMHO.

User avatar
R-ten-K
Posts: 1886
Joined: Mon Nov 15, 2004 10:36 pm
Location: Nor Cal

Re: Unix Emulation

Unread postby R-ten-K » Mon Nov 03, 2008 10:49 am

I thought PA-RISC had its cache virtually addressed, isn't that the case? (at least 1.1 and 2.0 were).

PA-RISC is weird as an architecture for sure though...
"Was it a dream where you see yourself standing in sort of sun-god robes on a
pyramid with thousand naked women screaming and throwing little pickles at you?"

User avatar
porter
Posts: 2917
Joined: Wed Nov 01, 2006 10:37 pm
Location: NZ

Re: Unix Emulation

Unread postby porter » Mon Nov 03, 2008 11:59 am

R-ten-K wrote:PA-RISC is weird as an architecture for sure though...


From a C programmer's perspective, the oddest thing is that in 32bit mode the stack grows upwards, in 64bit mode the stack grows downwards.
Land of the Long White Cloud and no Software Patents.

kramlq
Donor
Donor
Posts: 988
Joined: Tue Sep 20, 2005 5:10 pm
Location: IRL

Re: Unix Emulation

Unread postby kramlq » Mon Nov 03, 2008 12:38 pm

R-ten-K wrote:I thought PA-RISC had its cache virtually addressed, isn't that the case? (at least 1.1 and 2.0 were).

With virtual addressing on, it virtually indexes the cache. In physical mode, it is physically indexed (as thats all it has available). As I said earlier, the CPU enters physical mode for every interrupt or exception, and until the handler turns on virtual mode, any addresses accessed must be "eqivalently mapped" (PA-RISC terminology) in virtual and physical mode, or else what you write in physical mode may not be seen later in virtual mode etc. It has other strange effects as well - for example, the handler itself should be equivalently mapped, or else strange things will happen for the instruction after the one where it switches to from physical to virtual mode.

To go back to the original point.... does anyone feel like writing an emulator that does all this? That is why there are are no emulators.

porter wrote:From a C programmer's perspective, the oddest thing is that in 32bit mode the stack grows upwards, in 64bit mode the stack grows downwards.

Ah yes! How did I forget its most notably weird feature!

User avatar
R-ten-K
Posts: 1886
Joined: Mon Nov 15, 2004 10:36 pm
Location: Nor Cal

Re: Unix Emulation

Unread postby R-ten-K » Mon Nov 03, 2008 1:42 pm

Some poor souls at QEMU are trying to get HP-PA emulation going.

Also, didn't the Itanium offer some level of support to emulate HP-PA? Which may be a reason why IA64 is so @#$@#$ up? Trying to offer support for x86 and HP-PA must have been a nightmare, ugh....

Also to be fair to HP-PA, some architectures do require physical addressing for certain privileged instructions. Looking at their docs they are physically tagging the cache, so "equivalent" mapping shouldn't be too bad (probably in some XX megabyte offset chunks). Alas multiprocessing must be a PITA, unless they have some very very clever cache controller going on there.

Anyhow, for those interested in full system emulation. I recommend to take a look at QEMU, full opensource... and they support X86, SPARC, MIPS, PPC, and ARM among others. You may be able to extend it to do your own system emulation if you are so inclined. SIMH does support a ton of old (historical) architectures.
Last edited by R-ten-K on Mon Nov 03, 2008 2:59 pm, edited 1 time in total.
"Was it a dream where you see yourself standing in sort of sun-god robes on a
pyramid with thousand naked women screaming and throwing little pickles at you?"

User avatar
porter
Posts: 2917
Joined: Wed Nov 01, 2006 10:37 pm
Location: NZ

Re: Unix Emulation

Unread postby porter » Mon Nov 03, 2008 1:58 pm

Nai wrote:Has anyone emulated irix-mips


The PlayStation One emulators do R3000 well.
Land of the Long White Cloud and no Software Patents.

kramlq
Donor
Donor
Posts: 988
Joined: Tue Sep 20, 2005 5:10 pm
Location: IRL

Re: Unix Emulation

Unread postby kramlq » Mon Nov 03, 2008 2:59 pm

R-ten-K wrote:Also, didn't the Itanium support offer some level of support to emulate HP-PA? Which may be a reason why IA64 is so @#$@#$ up? Trying to offer support for x86 and HP-PA must have been a nightmare, ugh....

A lot of HP-PA features were included into Itanium. The memory scheme, protection scheme, interrupts and even the type of control registers present are somewhat similar. I think it also supports the gateway page mechanism for system calls (which was unique to PA-RISC)

R-ten-K wrote:Also to be fair to HP-PA, some architectures do require physical addressing for certain privileged instructions. Looking at their docs they are physically tagging the cache, so "equivalent" mapping shouldn't be too bad (probably in some XX megabyte offset chunks). Alas multiprocessing must be a PITA, unless they have some very very clever cache controller going on there.

Equivalent mappings are done just like the normal way you would handle virtual aliases. But there are other implementation details that make this "design feature" a pain. Mainly to do with the fact that it affects exception/interrupt handling. If the active kernel stack is not equivalently mapped, you can't even touch that until VM is enabled, so you have nowhere to save the registers. After enabling VM, any faults might overwrite those registers. Lots of issues like that that complicate things for no good reason.

porter wrote:The PlayStation One emulators do R3000 well.

Yeah, MIPS is the easy part, but nothing emulates SGI platform hardware enough to boot an unmodified IRIX kernel. SimOS defines its own hardware, and IRIX had to be ported to that. The Mess (or Mame?) emulator boots to PROM, but AFAIK is incomplete, so can't boot IRIX.
Last edited by kramlq on Mon Nov 03, 2008 2:59 pm, edited 1 time in total.

User avatar
R-ten-K
Posts: 1886
Joined: Mon Nov 15, 2004 10:36 pm
Location: Nor Cal

Re: Unix Emulation

Unread postby R-ten-K » Mon Nov 03, 2008 2:59 pm

porter wrote:
Nai wrote:Has anyone emulated irix-mips


The PlayStation One emulators do R3000 well.


I seem to remember SimOS at Stanford did MIPS pretty well and had enough SGI HW emulation in to to be able to boot old versions of Irix (I think it was used in the Splash project, what eventually led to cc-numa so Stanford got a lot of info on SGI HW internals, the early prototypes of splash were in fact a bunch of 4D machines glued together).

I was told that the simos people eventually founded vmware based on the technology.

Don't know if it is active (I doubt it).

For mips emulation, here is a repository I have found helpful.

http://www.linux-mips.org/wiki/Emulators
"Was it a dream where you see yourself standing in sort of sun-god robes on a
pyramid with thousand naked women screaming and throwing little pickles at you?"

User avatar
R-ten-K
Posts: 1886
Joined: Mon Nov 15, 2004 10:36 pm
Location: Nor Cal

Re: Unix Emulation

Unread postby R-ten-K » Mon Nov 03, 2008 6:34 pm

LOL we submitted at the same time about SimOS.

From what I read from you about HP-PA it sounds like the architecture is fairly ugly... it would be interesting to find out why the #$#@ they decided to make those privileged ops such a PITA to deal with. The overhead, in instructions, that introduces in those handlers must have offset the simpler HW (I assume that was their goal). The OS people must have shitted some bricks, but then again maybe that is the reason why HP-UX was so "unique." HP sure did have some odd "isms."
"Was it a dream where you see yourself standing in sort of sun-god robes on a
pyramid with thousand naked women screaming and throwing little pickles at you?"

pip
Posts: 147
Joined: Thu Sep 28, 2006 6:50 pm
Location: Huntington Beach, CA
Contact:

Re: Unix Emulation

Unread postby pip » Mon Nov 03, 2008 9:44 pm

kramlq wrote:For SunOS/Solaris, there were some versions of SimICS that could emulate a SPARCstation. It might be only for SPARC hosts though.


Simics is now a commercial product, and supports a whole raft of targets. SPARC is probably the best represented, with emulated SunFire 3800-6800 (US3/4) with multiple processors, and also the Blade 1500. I also seem to remember an emulated target for the T1/Niagra, but don't see the docs around now. Also supported is an EV5 AlphaPC, ARM5, Itanium, various PPC flavors, MIPS Malta, and x86. Although the x86 will run Windows, and the Suns will run Solaris, the other targets only support Linux, and are mostly useful for embedded development. There are some cool features that I haven't seen in any other simulators--in particular, a simulated Voodoo3 that even does accelerated 3D (using OpenGL on the host machine). However, it is meant to be cycle-accurate, so speed is not a priority.
Anyway, it costs mucho $$, but licenses are free for students. I have a license, but haven't played with Simics as much as I would like.
:Octane: R12K/300x2, MXE
:Indy: :O2: :1600SW: :ChallengeL:


Return to “Emulation”

Who is online

Users browsing this forum: No registered users and 1 guest