Date: Sun, 23 Jul 2006 18:31:27 +0200 From: Tijl Coosemans <tijl@ulyssis.org> To: freebsd-hackers@freebsd.org Cc: Daniel Eischen <deischen@freebsd.org>, Divacky Roman <xdivac02@stud.fit.vutbr.cz>, kmacy@fsmware.com, freebsd-emulation@freebsd.org, Michael Nottebrock <lofi@freebsd.org> Subject: Re: WINE vs. FreeBSD Message-ID: <200607231831.32410.tijl@ulyssis.org> In-Reply-To: <20060723091824.GA79726@stud.fit.vutbr.cz> References: <200607221914.15826.lofi@freebsd.org> <Pine.GSO.4.64.0607221912140.4394@sea.ntplx.net> <20060723091824.GA79726@stud.fit.vutbr.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart3152903.kl0IZcXFWA Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 23 July 2006 11:18, Divacky Roman wrote: > On Sat, Jul 22, 2006 at 07:15:35PM -0400, Daniel Eischen wrote: > > I think it is because WINE stomps on or TLS. =A0Nothing we can > > do about that except patch wine so it doesn't. =A0Look at the > > console messages for: > > > > =A0 Warning: pid XXX used static ldt allocation Wine's LDT code could probably be improved to bring in LDT_AUTO_ALLOC=20 and/or use the GDT entry for %fs through i386_set_fsbase() for TLS=20 instead of allocating an LDT entry (per thread). But, I don't think=20 this is currently a problem. As far as I can see FreeBSD's TLS support=20 doesn't use the LDT (anymore) so wine's static ldt allocation can't=20 possibly interfere with it. > I dont know details but judging from what linux does I think it might > be that wine requires more then one GDT entry for TLS areas. at least > comment in linux sources suggests so. > > linux has 3 GDT entries for TLS while fbsd just 1. Wine on FreeBSD doesn't use the GDT (yet?). It allocates LDT entries for=20 TLS which should work just as well. In any case, FreeBSD and Linux don't differ that much in this. =46reeBSD has 2 GDT entries available, one for %gs which is used by the=20 threading libs (following http://people.redhat.com/drepper/tls.pdf I=20 suppose) and one for %fs which is used by win32 code so wine could use=20 this instead of the LDT way. The related (undocumented) libc functions=20 are i386_get_fsbase, i386_set_fsbase, i386_get_gsbase and=20 i386_set_gsbase. Linux reserves 3 GDT entries, that can be manipulated through one=20 syscall (set_thread_area) and then it's up to the user to point %fs=20 or %gs (or some other selector?) to one of these entries. --nextPart3152903.kl0IZcXFWA Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQBEw6RkdMR2xnarec8RAmiZAKCxPxrOeOEXIDvTORBkVMZuFTTHMACgyNNQ s1337fO7ram0QU52sVBd/XA= =dP1Q -----END PGP SIGNATURE----- --nextPart3152903.kl0IZcXFWA--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607231831.32410.tijl>