I'm CC-ing this to linux-mips.
> > as you may already have read on the MIPS mailinglist I've changed
> > Linux/MIPS' system call interface to work like the one of Risc/OS
> > and IRIX. This give a nice way to be more compatible than the
> > ABI demands ...
> Yes, i saw that. Seems resonable. Only one thought: Isn't irix and
> risc/os big endian systems? Considering that, would it not be nicer
> to have Linux and NetBSD to be compatible on the system call level
> so they could share binaries without compat interfaces?
The big deal that I want is that I can even use libraries like libc.so
from an SGI. I think this is usefull to make running comercial
software useable on Linux/MIPS.
Implementing yet another syscall interface for the NetBSD syscalls would
be nice. Unluckily the syscall numbers are not identical :-( Even
worse - I cloned the behaviour of IRIX to return an error status from
a syscall in a3. I think we now still have the time to redesign the
basic interfaces of our two OSes to make compatibility without kludges
possible. I think of renumbering the syscalls the following way:
0 - 999 SVR4 flavoured calls a la Risc/OS, IRIX
1000 - 1999 SYSV flavoured calls a la Risc/OS, IRIX
2000 - 2999 BSD flavoured calls a la Risc/OS, IRIX
3000 - 3999 POSIX flavoured calls a la Risc/OS, IRIX
4000 - 4999 Linux flavoured calls
5000 - 5999 NetBSD flavoured calls
For compatibility you could use the number range from 0 - 999 to
mean the same thing as 5000 - 5999 for quite some time. This might
even be a good solution as I found no more syscall in the 0 - 999
number range in the IRIX 5.3 header files (/usr/include/sys.s).
Note that I could move the Linux syscall numbers again with no
problem; It's just that I try to avoid the known to be in use
range from 0 - 3999. I'm also interested in Ultrix in that direction.
Oh, and didn't Sony have some BSD flavour for it's News systems?
About the byte order - I try to make the design decisions with
respect to both byte orders; there is interest in running Linux/MIPS
in big endian mode on Magnum and Olivetti systems. Oh, and there
are some wired ideas like bi-endian OSes. Mips Computer Systems, Inc.
tried to write it but by that time Mips was bought by SGI and so
the project was cancelled.
> > What I'm now interested in is some info about how NetBSD does
> > system calls:
> > - What are the calling conventions (parameters/return values/
> > errors)?
> > - Which number range is being used for the syscalls? (Background:
> > Risc/OS and Irix reserve numbers 2000-2999 for BSD. Would be
> > nice if NetBSD would do the same.
> Calling convention is the same as in a function call, A0 = syscall
> number, A1 = arg 1 and so on. Return value in v0 and perhaps v1.
> Syscall numbers are in the low range from zero and upwards.
> Syscall emulation interfaces are implemented. For the Mips systems
> one exist for, ouch, ultrix. Well, nice in a way, but NetBSD is
> not bug compatible with ultrix so expect programs to work better :-)
Or to work at all ... I've written some not so nice things about Risc/OS
in comp.sys.mips but what I've heared till now about Ultrix beats every-
thing by an order of magnitude ...