Date: Tue, 13 May 2003 13:07:08 -0700 From: Peter Wemm <peter@wemm.org> To: John Baldwin <jhb@FreeBSD.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 31043 for review Message-ID: <20030513200708.BE6F42A7EA@canning.wemm.org> In-Reply-To: <XFMail.20030513123550.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote: > > On 13-May-2003 Peter Wemm wrote: > > http://perforce.freebsd.org/chv.cgi?CH=31043 > > > > Change 31043 by peter@peter_hammer on 2003/05/12 19:08:19 > > > > And now for something completely different... i386 binary emulation! > > This was submitted by p4/i386 on the amd64 box itself! > > Can we possibly have a shared compat/ia32? syscalls.master should be > able to be shared for example. Yes. I think compat/freebsd32 (generic 32 bit on 64 bit platform) and compat/ia32 (x86 specifically) is the right breakup. And the truely MD parts go in $arch/compat/ia32. For example: ia64/ia32 has a custom mmap implementation for partial pages. This isn't needed on amd64, but I suppose it could be #ifdef'ed in the common area. ia64 has a very different ia32_setregs() for the exec interface while the amd64 version is very similar to the i386 version. This is highly MD. sendsig/sigreturn probably would have to be MD since they deal with the native kernel's trapframes. I can't think of anything specific for compat/ia32 at the moment, but perhaps the sysarch stuff to interface with the user_ldt stuff could go there. However, I'm not sure I want to go here yet. I only did this because it took about 30 minutes and I needed something to test the extra context switch code to deal with the segment registers and userland %fs/%gs. If I couldn't have stolen it directly from ia64 I wouldn't have done it yet and would probably have spent the 30 minutes trying to figure out how to switch a userland binary into 32 bit mode while in userland and not bothered with the syscalls etc. Anyway, it was a useful validation of the context switch stuff. pmap is more urgent. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030513200708.BE6F42A7EA>