Date: Fri, 17 Jun 2005 19:21:17 +0100 From: Peter Edwards <peadar.edwards@gmail.com> To: Maxim.Sobolev@portaone.com Cc: Peter Edwards <peadar@freebsd.org>, current@freebsd.org Subject: Re: Towards a working "wine". [long] Message-ID: <34cb7c840506171121cd0437f@mail.gmail.com> In-Reply-To: <42B31247.9010603@portaone.com> References: <20050617180232.GA25818@freefall.freebsd.org> <42B31247.9010603@portaone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 6/17/05, Maxim Sobolev <sobomax@portaone.com> wrote: > Peter Edwards wrote: > > Y'all, > > > > I wanted to run a substantial windows app using "wine", and failed > > miserably. Looking around, it appears to be an acknowledged fact > > that wine is borked on FreeBSD, so I did some hacking about. > > > > The problems I found are centered around address space allocation: > > Wine is inevitably somewhat sensitive to address space layout, > > seeing as it has to present the Win32 binaries with a reasonably > > familiar environment. (All this assumes standard kernel, etc. Fixed > > addresses are the order of the day) > > > > Problem 1: > > > > When starting up, Wine needs to mmap stuff at address 0x80000000, > > but does so without using MAP_FIXED: I think the intention is that > > the code involved should be "best effort" to map to the hint address > > supplied to mmap(), rather than an all-or-nothing thing. > > > > FreeBSD's mmap sees this as an address in the data segment (see > > problem 2 below), and shifts the hint along to an address past > > there. There appears to be a MAP_TRYFIXED flag that wine uses on > > some systems that affords the hint more weight, which is pretty > > trivial to implement (see wine_mmap.txt). That was enough to get > > my app running, but not for long. >=20 > Well, there is really no point of adding another MAP_TRYFIXED flag, > since wine can call mmap(2) with MAP_FIXED and then if that fails try to > call mmap(2) without it and deal with consequences. This will provide > the same functionality but you won't get dependency on particular > FreeBSD version to get MAP_TRYFIXED define. >=20 Nope: MAP_FIXED will unconditionally overwrite any existing mapping at the requested address.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34cb7c840506171121cd0437f>