Commit Graph

44 Commits

Author SHA1 Message Date
wiz 617b132aac Spell output with two ts. 2003-01-04 23:43:02 +00:00
jdolecek f50246965e handle __HAVE_MINIMAL_EMUL 2002-11-10 20:59:03 +00:00
jdolecek 3b4db9c39d set nsysent to 256 2002-11-01 21:09:52 +00:00
jdolecek 1524c4bf08 set struct emul's nsysent to compat SYS_NSYSENT, not SYS_MAXSYSCALL 2002-11-01 19:26:21 +00:00
manu 80ee637534 - Introduce a e_fault field in struct proc to provide emulation specific
memory fault handler. IRIX uses irix_vm_fault, and all other emulation
use NULL, which means to use uvm_fault.

- While we are there, explicitely set to NULL the uninitialized fields in
struct emul: e_fault and e_sysctl on most ports

- e_fault is used by the trap handler, for now only on mips. In order to avoid
intrusive modifications in UVM, the function pointed by e_fault does not
has exactly the same protoype as uvm_fault:
int uvm_fault __P((struct vm_map *, vaddr_t, vm_fault_t, vm_prot_t));
int e_fault __P((struct proc *, vaddr_t, vm_fault_t, vm_prot_t));

- In IRIX share groups, all the VM space is shared, except one page.
This bounds us to have different VM spaces and synchronize modifications
to the VM space accross share group members. We need an IRIX specific hook
to the page fault handler in order to propagate VM space modifications
caused by page faults.
2002-09-21 21:14:54 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
thorpej 011d4d5f44 Add kernel support for having userland provide the signal trampoline:
* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.
2002-07-04 23:32:02 +00:00
thorpej 27f38656ef Add missing const. 2002-05-05 08:23:03 +00:00
mrg 86477819ce regenerate. 2002-04-29 09:55:11 +00:00
mrg 0ce90a9fef build the netbsd32_compat* objects into libcompat.a, so they are available
to emulations not just netbsd itself.  rename the compat_10 functions to
match everything else.  fixes a problem reported by julian coleman.
2002-04-29 09:53:39 +00:00
christos 381e6a7764 make the stackgap_{init,alloc} functions MP friendly (i.e. pass struct proc *
in, instead of using curproc). While there add an optional size argument to
stackgap_init.
2002-03-16 20:43:48 +00:00
mrg 9191aacdb4 regen 2002-01-03 15:30:08 +00:00
mrg 5d231c5624 ooops, socket() and socketpair() need args now. 2002-01-03 15:28:43 +00:00
mrg af640de164 move the COMPAT_SUNOS SO_BROADCAST hack out of uipc_socket.c into the
compat/sunos code.  besides being cleaner this allows the sunos LKM
to properly work without any special kernel hacks.
2002-01-03 00:59:00 +00:00
briggs 9a0fda91f4 SUNOS_M_NATIVE is now a macro that takes an arg, not a constant. 2001-11-29 18:53:50 +00:00
lukem dab6ef8b56 add RCSIDs (including regeneration of files as appropriate) 2001-11-13 02:07:52 +00:00
thorpej bfaf142ff6 Add sunos32_setregs(), thus making sunos32 compile again. 2001-09-20 20:52:26 +00:00
jdolecek ef8abe0767 Make the setregs hook emulation-specific, rather than executable
format specific.
Struct emul has a e_setregs hook back, which points to emulation-specific
setregs function. es_setregs of struct execsw now only points to
optional executable-specific setup function (this is only used for
ECOFF).
2001-09-18 19:36:32 +00:00
christos 0f380fac15 Add an e_trapsignal member to struct emul, so that emulated processes can
send the appropriate signal depending on the trap type.
2001-06-18 02:00:48 +00:00
manu a7cdf998ec Removed obsoletes EMUL_NO_BSD_ASYNCIO_PIPE and EMUL_NO_SIGIO_ON_READ flags.
Async I/O OS specifities should now handled in OS specific code. Linux
has been done, but other emulation should be handled. See case LINUX_F_SETFL
in sys/compat/linux/common/linux_file.c:linux_sys_fcntl() for more details.

The data that has been collected yet:

                                  Net Free Open Linux SunOS AIX OSF1 Darwin
send SIGIO to write end of pipe		Y  N    N     N     N    N   Y     Y
send SIGIO to read end of pipe      Y  Y    N     N     N    ?   Y     ?
send SIGIO to write end of socket   Y  Y    Y     N     N    Y   Y     Y
send SIGIO to read end of socket    Y  Y    Y     Y     Y    ?   Y     ?
2001-06-16 21:44:27 +00:00
thorpej 80cc38a1af Fix a partial construction problem that can cause race conditions
between creation of a file descriptor and close(2) when using kernel
assisted threads.  What we do is stick descriptors in the table, but
mark them as "larval".  This causes essentially everything to treat
it as a non-existent descriptor, except for fdalloc(), which sees a
filled slot so that it won't (incorrectly) allocate it again.  When
a descriptor is fully constructed, the code that has constructed it
marks it as "mature" (which actually clears the "larval" flag), and
things continue to work as normal.

While here, gather all the code that gets a descriptor from the table
into a fd_getfile() function, and call it, rather than having the
same (sometimes incorrect) code copied all over the place.
2001-06-14 20:32:41 +00:00
mrg 46762d3560 fix lint exposed by GCC 3.0 20010604 (prerelease). 2001-06-04 20:56:51 +00:00
mrg 6a89288a37 use _KERNEL_OPT. 2001-05-30 11:37:21 +00:00
manu 7e6929fe90 Changed EMUL_BSD_ASYNCIO_PIPE to EMUL_NO_BSD_ASYNCIO_PIPE, so that
the native emulation (NetBSD) does not have a flag.
2001-05-07 09:55:12 +00:00
manu 5a6b8191b5 Added two flags to emulation packages:
EMUL_BSD_ASYNCIO_PIPE notes that the emulated binaries expect the original
BSD pipe behavior for asynchronous I/O, which is to fire SIGIO on read() and
write(). OSes without this flag do not expect any SIGIO to be fired on
read() and write() for pipes, even when async I/O was requested. As far as
we know, the OSes that need EMUL_BSD_ASYNCIO_PIPE are NetBSD, OSF/1 and
Darwin.

EMUL_NO_SIGIO_ON_READ notes that the emulated binaries that requested
asynchrnous I/O expect the reader process to be notified by a SIGIO, but
not the writer process. OSes without this flag expect the reader and the
writer to be notified when some data has arrived or when some data have been
read. As far as we know, the OSes that need EMUL_NO_SIGIO_ON_READ are Linux
and SunOS.
2001-05-06 19:09:52 +00:00
mrg 477f3d1140 header is struct netbsd32_exec 2001-02-08 12:32:41 +00:00
mrg 098da9d296 use the standard alt check for creat. 2001-02-07 01:34:21 +00:00
mrg d0f57eaf28 regen 2001-02-06 15:42:34 +00:00
mrg bb4dfb96a8 oops, use netbsd32_select(). 2001-02-06 15:41:53 +00:00
mrg 79c2fcd3b2 add from NetBSD Id. 2001-02-06 15:39:38 +00:00
mrg 5cd04bbafa use struct sunos32_dirent. now getwd() works. 2001-02-06 13:13:42 +00:00
mrg 04534d365c stat/lstat must use netbsd32_stat43 not stat43. 2001-02-06 10:32:34 +00:00
mrg 8507daffe2 regen 2001-02-05 12:48:33 +00:00
mrg f973f47b9c s/sunos_sendsig/sunos32_sendsig/ 2001-02-05 12:48:13 +00:00
mrg 2bdf90f148 use sunos32_sys_sigreturn 2001-02-05 12:46:19 +00:00
mrg 973fe837ab s/long/netbsd32_long/ in various places. call netbsd32_fcntl, not sys_fcntl. 2001-02-05 06:28:55 +00:00
mrg 07df067e6c make sunos32_sys_stime() & sunos32_sys_sigvec() work. 2001-02-05 06:27:57 +00:00
mrg 2343525d2b we don't #include ../sunos/sunos_ioctl.c anymore...sigh 2001-02-04 15:38:17 +00:00
mrg 9e0d8392a4 clean up sunos32_sys_mmap(), modelling it more like netbsd32_mmap() 2001-02-04 11:06:14 +00:00
mrg b4e92dfd81 regen 2001-02-04 09:48:43 +00:00
mrg b352fc1de2 s/long/netbsd32_long/ in sunos32_sys_mmap(). noted by chuq. 2001-02-04 09:47:22 +00:00
mrg 2110531265 implement stat & fstat properly. 2001-02-02 13:00:29 +00:00
mrg 2f62d51a64 generate. 2001-02-02 07:29:42 +00:00
mrg 3fbaadb80d initial support for sunos binaries running on a 64 bit sparc64 kernel.
some programs work, many do not yet.
2001-02-02 07:28:54 +00:00