From owner-p4-projects@FreeBSD.ORG Tue May 13 13:07:10 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A4FE537B404; Tue, 13 May 2003 13:07:09 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41FEB37B401; Tue, 13 May 2003 13:07:09 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9F5843F3F; Tue, 13 May 2003 13:07:08 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id BE6F42A7EA; Tue, 13 May 2003 13:07:08 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: John Baldwin In-Reply-To: Date: Tue, 13 May 2003 13:07:08 -0700 From: Peter Wemm Message-Id: <20030513200708.BE6F42A7EA@canning.wemm.org> cc: Perforce Change Reviews Subject: Re: PERFORCE change 31043 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2003 20:07:10 -0000 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