Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Add COMPAT_SVR4 for m68k.



details:   https://anonhg.NetBSD.org/src/rev/89105bccd071
branches:  trunk
changeset: 472049:89105bccd071
user:      kleink <kleink%NetBSD.org@localhost>
date:      Mon Apr 19 21:22:56 1999 +0000

description:
Add COMPAT_SVR4 for m68k.

diffstat:

 sys/arch/amiga/amiga/conf.c             |    5 +-
 sys/arch/amiga/amiga/genassym.cf        |   17 +-
 sys/arch/amiga/amiga/locore.s           |    3 +-
 sys/arch/amiga/conf/GENERIC             |    5 +-
 sys/arch/amiga/conf/files.amiga         |    5 +-
 sys/arch/amiga/include/Makefile         |    5 +-
 sys/arch/amiga/include/svr4_machdep.h   |    8 +
 sys/arch/atari/atari/conf.c             |    5 +-
 sys/arch/atari/atari/genassym.cf        |   18 +-
 sys/arch/atari/atari/locore.s           |    3 +-
 sys/arch/atari/conf/GENERIC             |    5 +-
 sys/arch/atari/conf/files.atari         |    5 +-
 sys/arch/atari/include/Makefile         |    6 +-
 sys/arch/atari/include/svr4_machdep.h   |    8 +
 sys/arch/hp300/conf/GENERIC             |    5 +-
 sys/arch/hp300/conf/files.hp300         |    8 +-
 sys/arch/hp300/hp300/conf.c             |    5 +-
 sys/arch/hp300/hp300/genassym.cf        |   18 +-
 sys/arch/hp300/hp300/locore.s           |    3 +-
 sys/arch/hp300/include/Makefile         |    5 +-
 sys/arch/hp300/include/svr4_machdep.h   |    8 +
 sys/arch/m68k/conf/files.m68k           |    6 +-
 sys/arch/m68k/include/Makefile          |    6 +-
 sys/arch/m68k/include/svr4_machdep.h    |  119 +++++++++++
 sys/arch/m68k/m68k/sigcode.s            |   21 +-
 sys/arch/m68k/m68k/svr4_machdep.c       |  338 ++++++++++++++++++++++++++++++++
 sys/arch/mac68k/conf/GENERIC            |    5 +-
 sys/arch/mac68k/conf/files.mac68k       |    5 +-
 sys/arch/mac68k/include/Makefile        |    6 +-
 sys/arch/mac68k/include/svr4_machdep.h  |    8 +
 sys/arch/mac68k/mac68k/conf.c           |    5 +-
 sys/arch/mac68k/mac68k/genassym.cf      |   18 +-
 sys/arch/mac68k/mac68k/locore.s         |    3 +-
 sys/arch/mvme68k/conf/files.mvme68k     |    5 +-
 sys/arch/mvme68k/include/Makefile       |    4 +-
 sys/arch/mvme68k/include/svr4_machdep.h |    8 +
 sys/arch/mvme68k/mvme68k/conf.c         |    5 +-
 sys/arch/mvme68k/mvme68k/genassym.cf    |   18 +-
 sys/arch/mvme68k/mvme68k/locore.s       |    3 +-
 sys/arch/next68k/conf/GENERIC           |    5 +-
 sys/arch/next68k/conf/files.next68k     |    5 +-
 sys/arch/next68k/include/Makefile       |    6 +-
 sys/arch/next68k/include/svr4_machdep.h |    8 +
 sys/arch/next68k/next68k/conf.c         |    5 +-
 sys/arch/next68k/next68k/genassym.cf    |   18 +-
 sys/arch/next68k/next68k/locore.s       |    3 +-
 sys/arch/sun3/conf/GENERIC              |    5 +-
 sys/arch/sun3/conf/GENERIC3X            |    5 +-
 sys/arch/sun3/conf/files.sun3           |    5 +-
 sys/arch/sun3/include/Makefile          |    6 +-
 sys/arch/sun3/include/svr4_machdep.h    |    8 +
 sys/arch/sun3/sun3/conf.c               |    5 +-
 sys/arch/sun3/sun3/genassym.c           |   19 +-
 sys/arch/sun3/sun3/locore.s             |    3 +-
 sys/arch/sun3/sun3x/genassym.c          |   19 +-
 sys/arch/sun3/sun3x/locore.s            |    3 +-
 sys/arch/x68k/conf/GENERIC              |    5 +-
 sys/arch/x68k/conf/files.x68k           |    5 +-
 sys/arch/x68k/include/Makefile          |    6 +-
 sys/arch/x68k/include/svr4_machdep.h    |    8 +
 sys/arch/x68k/x68k/conf.c               |    5 +-
 sys/arch/x68k/x68k/genassym.cf          |   18 +-
 sys/arch/x68k/x68k/locore.s             |    3 +-
 sys/compat/svr4/svr4_exec.h             |    9 +-
 64 files changed, 840 insertions(+), 80 deletions(-)

diffs (truncated from 1894 to 300 lines):

diff -r e7ace416f116 -r 89105bccd071 sys/arch/amiga/amiga/conf.c
--- a/sys/arch/amiga/amiga/conf.c       Mon Apr 19 21:19:08 1999 +0000
+++ b/sys/arch/amiga/amiga/conf.c       Mon Apr 19 21:22:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.c,v 1.55 1998/11/13 04:47:03 oster Exp $  */
+/*     $NetBSD: conf.c,v 1.56 1999/04/19 21:22:56 kleink Exp $ */
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -35,6 +35,8 @@
  *      @(#)conf.c     7.9 (Berkeley) 5/28/91
  */
 
+#include "opt_compat_svr4.h"
+
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/buf.h>
@@ -216,6 +218,7 @@
        cdev_lkm_dummy(),               /* 49 */
 #endif
        cdev_disk_init(NRAID,raid),     /* 50: RAIDframe disk driver */
+       cdev_svr4_net_init(NSVR4_NET,svr4_net), /* 51: svr4 net pseudo-device */
 };
 int    nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
 
diff -r e7ace416f116 -r 89105bccd071 sys/arch/amiga/amiga/genassym.cf
--- a/sys/arch/amiga/amiga/genassym.cf  Mon Apr 19 21:19:08 1999 +0000
+++ b/sys/arch/amiga/amiga/genassym.cf  Mon Apr 19 21:22:56 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.10 1999/03/27 16:56:09 mhitch Exp $
+#      $NetBSD: genassym.cf,v 1.11 1999/04/19 21:22:56 kleink Exp $
 
 #
 # Copyright (c) 1982, 1990, 1993
@@ -35,6 +35,8 @@
 #      @(#)genassym.c  8.3 (Berkeley) 1/4/94
 #
 
+include "opt_compat_svr4.h"
+
 include <sys/param.h>
 include <sys/buf.h>
 include <sys/proc.h>
@@ -47,6 +49,11 @@
 
 include <uvm/uvm_extern.h>
 
+ifdef COMPAT_SVR4
+include <compat/svr4/svr4_syscall.h>
+include <compat/svr4/svr4_ucontext.h>
+endif
+
 include <machine/cpu.h>
 include <machine/psl.h>
 include <machine/reg.h>
@@ -179,3 +186,11 @@
 # miscellaneous custom chip register offsets
 define CIAICR          offsetof(struct CIA, icr)
 
+# SVR4 binary compatibility
+ifdef COMPAT_SVR4
+define SVR4_SIGF_HANDLER       offsetof(struct svr4_sigframe, sf_handler)
+define SVR4_SIGF_UC            offsetof(struct svr4_sigframe, sf_uc)
+define SVR4_SYS_context                SVR4_SYS_context
+define SVR4_SYS_exit           SVR4_SYS_exit
+define SVR4_SETCONTEXT         SVR4_SETCONTEXT
+endif
diff -r e7ace416f116 -r 89105bccd071 sys/arch/amiga/amiga/locore.s
--- a/sys/arch/amiga/amiga/locore.s     Mon Apr 19 21:19:08 1999 +0000
+++ b/sys/arch/amiga/amiga/locore.s     Mon Apr 19 21:22:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.107 1999/03/26 21:18:50 is Exp $  */
+/*     $NetBSD: locore.s,v 1.108 1999/04/19 21:22:56 kleink Exp $      */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -48,6 +48,7 @@
 
 #include "opt_bb060stupidrom.h"
 #include "opt_compat_netbsd.h"
+#include "opt_compat_svr4.h"
 
 #include "assym.h"
 #include <machine/asm.h>
diff -r e7ace416f116 -r 89105bccd071 sys/arch/amiga/conf/GENERIC
--- a/sys/arch/amiga/conf/GENERIC       Mon Apr 19 21:19:08 1999 +0000
+++ b/sys/arch/amiga/conf/GENERIC       Mon Apr 19 21:22:56 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: GENERIC,v 1.120 1999/04/10 21:23:27 tron Exp $
+#      $NetBSD: GENERIC,v 1.121 1999/04/19 21:22:56 kleink Exp $
 
 #
 #if 0
@@ -93,9 +93,10 @@
 options        COMPAT_12       # compatibility with NetBSD 1.2
 options        COMPAT_13       # compatibility with NetBSD 1.3
 options        COMPAT_SUNOS    # Support to run Sun (m68k) executables
+options        COMPAT_SVR4     # Support to run SVR4 (m68k) executables
 options        COMPAT_NOMID    # allow nonvalid machine id executables
 #options       COMPAT_LINUX    # Support to run Linux/m68k executables
-#options       EXEC_ELF32      # 32-bit ELF executables (Linux)
+#options       EXEC_ELF32      # 32-bit ELF executables (Linux, SVR4)
 
 #
 # Support for System V IPC facilities.
diff -r e7ace416f116 -r 89105bccd071 sys/arch/amiga/conf/files.amiga
--- a/sys/arch/amiga/conf/files.amiga   Mon Apr 19 21:19:08 1999 +0000
+++ b/sys/arch/amiga/conf/files.amiga   Mon Apr 19 21:22:56 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.amiga,v 1.85 1999/04/16 11:13:38 kleink Exp $
+#      $NetBSD: files.amiga,v 1.86 1999/04/19 21:22:57 kleink Exp $
 
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 16                       # NOTE THAT AMIGA IS SPECIAL!
@@ -404,6 +404,9 @@
 include "compat/sunos/files.sunos"
 file   arch/m68k/m68k/sunos_machdep.c  compat_sunos
 
+# SVR4 Binary Compatibility (COMPAT_SVR4)
+include "compat/svr4/files.svr4"
+
 # Linux binary compatibility (COMPAT_LINUX)
 include "compat/linux/files.linux"
 include "compat/linux/arch/m68k/files.linux_m68k"
diff -r e7ace416f116 -r 89105bccd071 sys/arch/amiga/include/Makefile
--- a/sys/arch/amiga/include/Makefile   Mon Apr 19 21:19:08 1999 +0000
+++ b/sys/arch/amiga/include/Makefile   Mon Apr 19 21:22:56 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.4 1999/03/15 12:42:51 minoura Exp $
+#      $NetBSD: Makefile,v 1.5 1999/04/19 21:22:57 kleink Exp $
 
 KDIR=  /sys/arch/amiga/include
 INCSDIR= /usr/include/amiga
@@ -7,6 +7,7 @@
        cpufunc.h db_machdep.h disklabel.h elf_machdep.h endian.h fbio.h \
        float.h frame.h ieee.h ieeefp.h intr.h kcore.h limits.h mtpr.h \
        param.h pcb.h pmap.h proc.h profile.h psl.h pte.h ptrace.h reg.h \
-       setjmp.h signal.h stdarg.h trap.h types.h varargs.h vmparam.h
+       setjmp.h signal.h stdarg.h svr4_machdep.h trap.h types.h varargs.h \
+       vmparam.h
 
 .include <bsd.kinc.mk>
diff -r e7ace416f116 -r 89105bccd071 sys/arch/amiga/include/svr4_machdep.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/amiga/include/svr4_machdep.h     Mon Apr 19 21:22:56 1999 +0000
@@ -0,0 +1,8 @@
+/*     $NetBSD: svr4_machdep.h,v 1.1 1999/04/19 21:22:57 kleink Exp $  */
+
+#ifndef _MACHINE_SVR4_MACHDEP_H_
+#define _MACHINE_SVR4_MACHDEP_H_
+
+#include <m68k/frame.h>
+
+#endif
diff -r e7ace416f116 -r 89105bccd071 sys/arch/atari/atari/conf.c
--- a/sys/arch/atari/atari/conf.c       Mon Apr 19 21:19:08 1999 +0000
+++ b/sys/arch/atari/atari/conf.c       Mon Apr 19 21:22:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.c,v 1.39 1998/11/21 23:41:13 oster Exp $  */
+/*     $NetBSD: conf.c,v 1.40 1999/04/19 21:22:57 kleink Exp $ */
 
 /*
  * Copyright (c) 1991 The Regents of the University of California.
@@ -35,6 +35,8 @@
  *      @(#)conf.c     7.9 (Berkeley) 5/28/91
  */
 
+#include "opt_compat_svr4.h"
+
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/buf.h>
@@ -313,6 +315,7 @@
 #endif /* __I4B_IS_INTEGRATED */
        cdev_scsibus_init(NSCSIBUS,scsibus), /* 49: SCSI bus */
        cdev_disk_init(NRAID,raid),     /* 50: RAIDframe disk driver */
+       cdev_svr4_net_init(NSVR4_NET,svr4_net), /* 51: svr4 net pseudo-device */
 };
 int    nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
 
diff -r e7ace416f116 -r 89105bccd071 sys/arch/atari/atari/genassym.cf
--- a/sys/arch/atari/atari/genassym.cf  Mon Apr 19 21:19:08 1999 +0000
+++ b/sys/arch/atari/atari/genassym.cf  Mon Apr 19 21:22:56 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.10 1999/03/28 06:00:18 simonb Exp $
+#      $NetBSD: genassym.cf,v 1.11 1999/04/19 21:22:57 kleink Exp $
 
 #-
 # Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -36,6 +36,8 @@
 #  POSSIBILITY OF SUCH DAMAGE.
 #
 
+include "opt_compat_svr4.h"
+
 include <sys/param.h>
 include <sys/buf.h>
 include <sys/proc.h>
@@ -47,6 +49,11 @@
 include <vm/vm.h>
 include <uvm/uvm_extern.h>
 
+ifdef COMPAT_SVR4
+include <compat/svr4/svr4_syscalls.h>
+include <compat/svr4/svr4_ucontext.h>
+endif
+
 include <machine/cpu.h>
 include <machine/trap.h>
 include <machine/psl.h>
@@ -202,3 +209,12 @@
 
 define SCU_SOFTINT             AD_SCU + offsetof(struct scu, sys_int)
 define SCU_SYSMASK             AD_SCU + offsetof(struct scu, sys_mask)
+
+# SVR4 binary compatibility
+ifdef COMPAT_SVR4
+define SVR4_SIGF_HANDLER       offsetof(struct svr4_sigframe, sf_handler)
+define SVR4_SIGF_UC            offsetof(struct svr4_sigframe, sf_uc)
+define SVR4_SYS_context                SVR4_SYS_context
+define SVR4_SYS_exit           SVR4_SYS_exit
+define SVR4_SETCONTEXT         SVR4_SETCONTEXT
+endif
diff -r e7ace416f116 -r 89105bccd071 sys/arch/atari/atari/locore.s
--- a/sys/arch/atari/atari/locore.s     Mon Apr 19 21:19:08 1999 +0000
+++ b/sys/arch/atari/atari/locore.s     Mon Apr 19 21:22:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.60 1999/03/24 05:50:58 mrg Exp $  */
+/*     $NetBSD: locore.s,v 1.61 1999/04/19 21:22:57 kleink Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -50,6 +50,7 @@
  */
 
 #include "opt_compat_netbsd.h"
+#include "opt_compat_svr4.h"
 #include "opt_ddb.h"
 
 #include "assym.h"
diff -r e7ace416f116 -r 89105bccd071 sys/arch/atari/conf/GENERIC
--- a/sys/arch/atari/conf/GENERIC       Mon Apr 19 21:19:08 1999 +0000
+++ b/sys/arch/atari/conf/GENERIC       Mon Apr 19 21:22:56 1999 +0000
@@ -1,5 +1,5 @@
 #
-#      $NetBSD: GENERIC,v 1.52 1998/12/15 19:50:07 itohy Exp $
+#      $NetBSD: GENERIC,v 1.53 1999/04/19 21:22:57 kleink Exp $
 #
 # Generic atari
 #
@@ -97,9 +97,10 @@
 options        COMPAT_13       # Compatibility to NetBSD1.3
 #options       COMPAT_09       # has no meaning on the atari
 #options       COMPAT_SUNOS    # Support to run Sun-3 executables
+#options       COMPAT_SVR4     # Support to run SVR4 executables
 #options       TCP_COMPAT_42   # Disable UDP checksums (not needed)
 #options       COMPAT_LINUX    # Support to run Linux/m68k executables
-#options       EXEC_ELF32      # 32-bit ELF executables (Linux)
+#options       EXEC_ELF32      # 32-bit ELF executables (Linux, SVR4)
 
 #
 # Support for System V IPC facilities.
diff -r e7ace416f116 -r 89105bccd071 sys/arch/atari/conf/files.atari
--- a/sys/arch/atari/conf/files.atari   Mon Apr 19 21:19:08 1999 +0000
+++ b/sys/arch/atari/conf/files.atari   Mon Apr 19 21:22:56 1999 +0000
@@ -1,5 +1,5 @@
 #
-#      $NetBSD: files.atari,v 1.60 1999/03/15 15:47:11 leo Exp $
+#      $NetBSD: files.atari,v 1.61 1999/04/19 21:22:57 kleink Exp $
 
 maxpartitions 16
 
@@ -205,6 +205,9 @@
 include "compat/sunos/files.sunos"
 file   arch/m68k/m68k/sunos_machdep.c  compat_sunos
 
+# SVR4 Binary Compatibility (COMPAT_SVR4)
+include "compat/svr4/files.svr4"
+
 # Linux binary compatibility (COMPAT_LINUX)
 include "compat/linux/files.linux"
 include "compat/linux/arch/m68k/files.linux_m68k"
diff -r e7ace416f116 -r 89105bccd071 sys/arch/atari/include/Makefile
--- a/sys/arch/atari/include/Makefile   Mon Apr 19 21:19:08 1999 +0000
+++ b/sys/arch/atari/include/Makefile   Mon Apr 19 21:22:56 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.7 1999/03/31 10:48:00 leo Exp $
+#      $NetBSD: Makefile,v 1.8 1999/04/19 21:22:57 kleink Exp $
 
 KDIR=  /sys/arch/atari/include
 INCSDIR= /usr/include/atari
@@ -7,7 +7,7 @@
        cpufunc.h db_machdep.h disklabel.h elf_machdep.h endian.h \
        float.h frame.h intr.h ieee.h ieeefp.h kcore.h limits.h \
        msioctl.h mtpr.h param.h pcb.h pmap.h proc.h profile.h psl.h \
-       pte.h ptrace.h reg.h setjmp.h signal.h stdarg.h trap.h types.h \
-       varargs.h vmparam.h
+       pte.h ptrace.h reg.h setjmp.h signal.h stdarg.h svr4_machdep.h trap.h \
+       types.h varargs.h vmparam.h



Home | Main Index | Thread Index | Old Index