Jump to content

OS X for SSE (qemu)


Dragon
 Share

417 posts in this topic

Recommended Posts

Integrating the SSE2 and SSE3 emulation right into the kernel would give us the ultimate solution. If we can successfully trap the exceptions raised by those missing instructions (and surely we must be able to - given thats how the SSE3 emulation works) and call into routines borrowed from the qemu code, then SSE-only OSx86 will be a reality.

 

I have no idea how to even begin putting such a thing together, but i'd dearly love to see it :P

Link to comment
Share on other sites

That's what I was thinking when I was first brainstorming the idea of OS X on SSE, but I figured it would require too much work for just a few of us to do. Semthex has the skills to patch it all together, I just hope he is interested.

Link to comment
Share on other sites

you can replace anything except for the mobo and processor with supported parts.

you've got pci cards, usb devices, sound cards

the only thing that may be incompatible is the cpu and there isn't anything you can do about that. (just buy a p3 with a compatible processor or replace with another)

Link to comment
Share on other sites

Sorry, I have a physics assessment tomorrow that i've been studying for.

 

About the user space emulator... I think that using it would increase the speed slightly, but because SSE2 is still being emulated, it will still be far from native speed. But unless we end up doing the SSE2 emulation, this is a good step towards native speed.

 

About the SSE2 emulator in qemu/bochs... somewhere in that code will be a function that gets the SSE2 instructions and translates them into SSE compatible instructions. I'm sure with a bit of modification, this code could be put into the OS X kernel. But since I don't know how to do that, we have to find someone that is able to do it. We Still don't have a reply from JaS or semthex, so i'm guessing they are either busy with something else, or not interested.

 

Anyways, after next week I am free from exams (for a while) so I will check up on this and reply more often.

 

Dragon

Link to comment
Share on other sites

dont be sorry, we all appreciate the effort you're putting into this - i was just keen to hear good news :)

 

of course your studies should come first.

 

hopefully JaS or Semthex will becom einterested enough.. ;)

 

http://en.wikipedia.org/wiki/VirtualBox - interesting at all? Its a QEMU-based 'virtualizer' but has dynamic recompilation.

 

From the wikipedia entry:

 

VirtualBox attempts to run as much guest code natively (i.e. directly on the host processor) as possible. This works well for user-mode code running in the guest's ring 3 of the Intel ring architecture. However, the guest's ring-0 code, which will usually contain lots of privileged instructions, will need to be intercepted. VirtualBox has a rather unique approach to fix this conflict: It tricks the guest operating system to actually execute its ring-0 code in ring 1, which is normally unused on the Intel architecture.

 

If problems arise, VirtualBox has a built-in dynamic recompiler, like other virtualizers do. VirtualBox's recompiler is based on the open-source QEMU. In addition, however, VirtualBox automatically disassembles and, in many situations, patches the guest code to avoid future recompilations, as these are comparably expensive.[2]As a result, both the guest's ring-3 and ring-0 code can run natively most of the time, and with this combination of "traditional" recompiling and actual code patching, VirtualBox achieves a performance that is comparable to that of VMware.[3]

 

Does that sound like it might possibly use QEMU's SSE-emulation code if it hits problems running it natively? :)

 

EDIT: Its guest OS page says Darwin doesnt work yet. dammit!

Link to comment
Share on other sites

It would be the perfect solution if it worked, but i've already taken a look at VirtualBox and gave up when I saw that it wasn't working with darwin.

For the moment it would be good if some people tried running OS X using the slax I posted and maybe posting if it was slow/fast for them.

It was running at a decent speed for me, and I have a 450mhz p3.

 

I'm going away on school camp next week, but keep posting so I can read up when I get back.

Link to comment
Share on other sites

Just FYI, I grabbed VirtualBox and tried it on my hackintosh (Pentium D920, Intel D945 - see sig) and tried to boot the Myzar 10.4.5 disc (only one I had to hand at that moment).

 

After the BIOS screen, two capital E's appear in the corner and then it does nothing else.

 

Anyone any idea what this error code (if thats what it is) signifies in the darwin bootloader? I figured we could perhaps grab the opensource version of VirtualBox and set about fixing the Darwin support. I have a sneaking suspicion that its only listed as not working because there is some problem with the bootloader. If we could get it to work, and if it does indeed emulate SSE2/3 on SSE1 hardware, we'd be set :dev:

 

EDIT: I guess the thing to do would be to boot virtualbox on an SSE-only box, boot up an OS that works (ie not darwin/OS X) and try to run something which needs SSE2 and see what happens. If it doesnt emulate the SSE2 instruction, there's no point in continuing with VirtualBox, at least not for our purposes.

Link to comment
Share on other sites

 Share

×
×
  • Create New...