Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jun 2000 10:10:38 +0930
From:      Mark Newton <newton@internode.com.au>
To:        Dan Nelson <dnelson@emsphone.com>
Cc:        Matthew Emmerton <matt@xena.gsicomp.on.ca>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: SVR4 Emulation [was Re: iBCS status?]
Message-ID:  <20000608101038.B46114@internode.com.au>
In-Reply-To: <20000607094626.B22129@dan.emsphone.com>
References:  <000a01bfcf7a$cc810330$1200a8c0@matt> <20000606152128.B82736@internode.com.au> <20000606012552.A1515@dan.emsphone.com> <20000606162453.B83108@internode.com.au> <20000606094719.A19961@dan.emsphone.com> <006101bfd04c$59de5c60$1200a8c0@matt> <20000607094626.B22129@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 07, 2000 at 09:46:26AM -0500, Dan Nelson wrote:

 > It's hard because SCO doesn't
 > document any of this.  You have to root through headers trying to
 > figure out what structures are used when.

How do you think the rest of the emulator has been written? :-)

Ok -- I envisaged that there'd be a difficulty with different SysV vendors
who used different semantics for the same syscalls, or different syscall
numbering schemes.  "It could happen!" (and, as we can see, it probably 
has).

To fix it in as painless a way as possible, I'm envisaging something
along the lines of this:

   * The existing svr4 KLD module, which implements the guts of the 
     emulator;  and

   * Additional much, much smaller modules which implement the differences
     between the "base" svr4 and wierd oddball variants.

The additional modules would be dependent on the base module.  Each one
would have its own syscall table, but most of the entries in it would 
point to symbols which are defined in the base module.  Only the system
calls which have totally different semantics would need to be defined
separately.

Of course, this also gives us a simple way to renumber syscalls.  

Each variant would have its own ELF brand to aid the selection of the 
correct API.

The files used to implement this would be in subdirectories of 
src/sys/svr4 and src/sys/i386/svr4, each of which would contain a 
*_sysvec.c file, a syscalls.master file, and the support .h files 
needed to glue it all together.  The result of running "make"
in src/modules/svr4 would be a base KLD plus several smaller flavour-
specific KLDs.

Note that syscall numbering isn't the only thing I can see that'll 
be different between "flavours" of SysVR4.  Things like ioctl() commands,
signal numbers, and basically all the other things the emulator translates
could exhibit minor differences between flavours, but the bulk of it should
be the same from vendor to vendor.

Comments?

   - mark

-- 
Mark Newton                               Email:  newton@internode.com.au (W)
Network Engineer                          Email:  newton@atdot.dotat.org  (H)
Internode Systems Pty Ltd                 Desk:   +61-8-82232999
"Network Man" - Anagram of "Mark Newton"  Mobile: +61-416-202-223


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000608101038.B46114>