[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu-darwin-user

From: Ian Rogers
Subject: Re: [Qemu-devel] qemu-darwin-user
Date: Fri, 27 Aug 2004 13:25:37 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114


I think there will be a fundamental limit you reach with this work. The reason being the mach messages can contain pointers to data structures which the kernel fills in. If the pointers are in the wrong endian then the kernel will do something to the application. You can write code to perform transformations on pointers for all the messages you can find documentation on, but some systems will be entirely closed (for example, microsofts messages). Of course you could emulate both the server and the application, but I think you will need a lot of kernel jiggery pokery still. I believe this is the same problem that stops Mac OS X being in a 64bit memory space. You basically need different messages for every kind of pointer you can have. Apple estimated it would take 6months to write support for all those messages, but they revised that up to 2 years iirc. 64 bit OS X applications send 32bit messages currently and pointers to datastructures must appear within the first 4Gb as a consequence. Let me know if I'm wrong.

Hope this is of help,


Pierre d'Herbemont wrote:


I am interested by your code, is there a place where I can get it?


Le 27 août 04, à 14:08, Jocelyn Mayer a écrit :

On Fri, 2004-08-27 at 13:13, Pierre d'Herbemont wrote:

Hi all,


I have done some work on the darwin-user side. Since it doesn't work
yet, I don't submit patch for it but I have updated the qemu branch on
opendarwin [1][2], and you can now ./configure
--target-list=i386-darwin-user. Basically it can load a Fat or a
regular binary, and have the dynamic linker called. Unfortunately it
crashes somewhere in _dyld_reloc right now.

You may be interressed to know that I have working code for BSD/Darwin
program emulation, including working FAT/mach-O loader.
In fact, I was working on Darwin emulation before I integrate my PPC
emulation code into Qemu.
As I already emulated all basic syscalls & sysctl for the 4 BSD flavours
(Net, Open, Free & Darwin), but Mach ones, you may like to get my code.
This code used to be in the Linux kernel but I can easily adapt it for
Qemu. The big missing parts to allow the execution of complex programs
are mach syscalls and signals management, but I guess this part can be
taken from Linux-user emulation with a few changes.

Jocelyn Mayer <address@hidden>
Never organized

Qemu-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]