PERFORCE change 31043 for review
Peter Wemm
peter at wemm.org
Tue May 13 13:07:10 PDT 2003
John Baldwin wrote:
>
> On 13-May-2003 Peter Wemm wrote:
> > http://perforce.freebsd.org/chv.cgi?CH=31043
> >
> > Change 31043 by peter at 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 at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5
More information about the p4-projects
mailing list