NetBSD/sys/compat/osf1
2000-12-13 03:16:36 +00:00
..
files.osf1 put the ecoff specific code from osf1_exec.c to osf1_exec_ecoff.c 2000-12-08 21:39:30 +00:00
Makefile
osf1_cvt_errno.c
osf1_cvt_signal.c
osf1_cvt.c add e_path (emulation path) to struct emul, which replaces emulation-specific 2000-12-01 12:28:30 +00:00
osf1_cvt.h
osf1_descrip.c remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-28 15:39:24 +00:00
osf1_errno.h
osf1_exec_ecoff.c put the ecoff specific code from osf1_exec.c to osf1_exec_ecoff.c 2000-12-08 21:39:30 +00:00
osf1_exec.c Do the md_syscall, __HAVE_MINIMAL_EMUL and __HAVE_SYSCALL_INTERN thangs. 2000-12-13 03:16:36 +00:00
osf1_exec.h provide extern const struct emul emul_osf1 2000-12-01 12:51:03 +00:00
osf1_file.c make LKM safe 2000-12-01 19:20:56 +00:00
osf1_generic.c
osf1_ioctl.c LKMify 2000-11-29 21:51:49 +00:00
osf1_misc.c make LKM safe 2000-12-01 19:20:56 +00:00
osf1_mmap.c Add an align argument to uvm_map() and some callers of that 2000-09-13 15:00:15 +00:00
osf1_mount.c make LKM safe 2000-12-01 19:20:56 +00:00
osf1_prot.c
osf1_resource.c
osf1_signal.c add e_path (emulation path) to struct emul, which replaces emulation-specific 2000-12-01 12:28:30 +00:00
osf1_signal.h
osf1_socket.c add e_path (emulation path) to struct emul, which replaces emulation-specific 2000-12-01 12:28:30 +00:00
osf1_syscall.h Regen. 2000-12-13 01:29:35 +00:00
osf1_syscallargs.h Regen. 2000-12-13 01:29:35 +00:00
osf1_syscalls.c Regen. 2000-12-13 01:29:35 +00:00
osf1_sysent.c Regen. 2000-12-13 01:29:35 +00:00
osf1_sysv_ipc.c
osf1_time.c
osf1.h Port FreeBSD's osf1_sys_getsysinfo() and fill in setsysinfo. These are 2000-11-17 03:06:28 +00:00
README.dynamic
README.mach-traps
README.syscalls Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
syscalls.conf Round up sysent[] table size. 2000-12-13 01:29:16 +00:00
syscalls.master Get rid of the damn EMUL_GET* flags. 2000-12-09 07:10:34 +00:00

$NetBSD: README.syscalls,v 1.3 2000/03/13 23:52:35 soren Exp $

XXX this file should be gutted.  functions' comments should go with
XXX the functions.  Further, this file is ... very out of date.

Once the new syscall argument-handling method was implemented, most
OSF/1 syscalls boiled down to their NetBSD equivalents.  The
differences are detailed in this file.

Note that some OSF/1 syscalls, including some of those that map
directly to equivalent NetBSD syscalls, are not implemented; they
were not needed, so the effort to implement and check them was not
expended.

Finally, there are some OSF/1 syscalls which were left unimplemented,
but which seem strange enough to merit a bit more explanation.

OSF/1 compatibility is helped by the fact that the sigcontext
structure was created for NetBSD/Alpha to be the same as the OSF/1
sigcontext structure.  Because of this, only one sendsig() function is
needed, and then the NetBSD sigreturn() function can be used for OSF/1
sigreturn(), as well.

The system calls are split out among the three files:
	osf1_ioctl.c
	osf1_misc.c
	osf1_mount.c
as follows:
	osf1_ioctl.c contains all osf1_ioctl() handling code.
	osf1_mount.c contains all code dealing with mounting and
		unmounting file systems, and with mount points in
		general (e.g. osf1_getfsstat()).
	osf1_misc.c contains the rest of the emulation functions.

The emulation functions as follows:

osf1_mknod()
	dev_t's are different between OSF/1 and NetBSD.  In OSF/1 a
	dev_t has 12 bits of major number and 20 bits of minor number.
	Under NetBSD, it's 24 bits of major, 8 bits of minor (but the
	top 16 bits of the major number are unused, and may be
	rearranged later).  In any case, it was decided that the
	primary use for OSF/1 binaries would be to complement native
	NetBSD binaries, so file system dev_t's are assumed to be in
	the NetBSD format, and osf1_mknod() translates from the OSF/1
	format to the NetBSD format.

osf1_getfsstat()
	The statfs structure is different between NetBSD and OSF/1,
	and the way file system types are denoted is different, as
	well.  This routine is the same as getfsstat(), except it
	converts the statfs structures before returning them to the
	OSF/1 process.

osf1_lseek()
	To compensate for quad alignment on 32-bit machines, the
	NetBSD lseek() needs an extra argument of padding, before the
	off_t 'offset' argument.  This wrapper inserts the padding,
	and calls the NetBSD routine.

osf1_mount()
	The file system type specification and the way you specify
	mount options differs substantially between NetBSD and OSF/1.
	This routine (and its callees) fakes up NetBSD arguments, and
	calls the NetBSD routine.

osf1_unmount()
	Probably not necessary, but safe; translates flags, in case
	the NetBSD unmount flags ever change.

osf1_exec_with_loader() [UNIMPLEMENTED]
	From the description in the OSF/1 manual page, this executes a
	file with a named loader, or "/sbin/loader" if none is named.
	It appears to be used in some way, when executing dynamically
	linked binaries, but is _not_ called directly from user space
	in the normal case.  The interface by which it passes the name
	of the file to be executed, its arguments, etc., to the loader
	is unspecified, and, from experimental evidence, doesn't seem
	to be the normal UN*X argument-passing convention (i.e.
	argc/argv).  For proper dynamically linked binary support,
	this function will probably have to be implemented, but it's
	unclear how that can be done (short of disassembling a lot of
	code).

osf1_open()
	Translates OSF/1 flags to NetBSD flags.

osf1_ioctl()
	Screens out ioctl requests that aren't known to work, and
	translates those that differ between NetBSD and OSF/1.

osf1_reboot()
	Translates OSF/1 flags to NetBSD flags.

osf1_stat()
	The stat structure differs between NetBSD and OSF/1, both in
	terms of field sizes, and in the dev_t representation.
	This does a NetBSD stat(), translates the results, and returns
	them to the OSF/1 process.

osf1_lstat()
	Same as osf1_stat(), but for lstat().

osf1_mmap()
	The NetBSD version needs 4 bytes of padding before the off_t
	'pos' argument, and also uses different flags than the OSF/1
	version.  This wrapper translates the flags and deals with the
	argument struct padding differences, then calls the NetBSD
	routine.

osf1_fstat()
	Same as osf1_stat(), but for fstat().

osf1_fcntl()
	Translates OSF/1 fcntl() requests into their NetBSD
	counterparts, then calls the NetBSD fcntl() to do the
	operations.

osf1_socket()
	Makes sure that the socket type is valid for NetBSD, and if
	so, calls NetBSD's socket().

osf1_sendto()
	Makes sure that the 'flags' argument doesn't use flags that
	NetBSD can't handle, and calls NetBSD's sendto().

osf1_getrlimit()
	Makes sure that the 'which' selector is one that NetBSD can
	deal with, and calls NetBSD's getrlimit().

osf1_setrlimit()
	Same as osf1_getrlimit(), but for setrlimit().

osf1_sigaction()
	Deals with the differences in the NetBSD and OSF/1 sigaction
	structures, and calls NetBSD's sigaction with the appropriate
	arguments.  If the call requests that the old sigaction be
	passed back, osf1_sigaction() translates it back to the OSF/1
	form, and returns it appropriately.

osf1_statfs()
	Does that statfs() on the given pathname, then translates the
	NetBSD statfs structure into the one that OSF/1 uses and
	returns it.  Makes a best effort on the mount type, because
	there's not a one-to-one mapping between NetBSD and OSF/1
	mount types.

osf1_fstatfs()
	Same as osf1_statfs(), but for fstatfs().

osf1_usleep_thread()
	This function is how sleep() and usleep() (and possibly other
	functions) are implemented in OSF/1.  Its usage was discovered
	by disassembling the library routines that use it.  It takes
	two pointers to timeval structures as arguments.  The first
	contains the amount of time (in seconds and microseconds) to
	sleep.  If the second pointer is non-null, if the process
	wakes up early, the amount of time "unslept" is returned.  If
	the process doesn't wake up early, zero is returned.

osf1_setsysinfo()
	A null-op; used early on, but nothing cares that it actually
	does anything.