Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/irix Uses svr4_mmap for mmap32 emulation. This wi...



details:   https://anonhg.NetBSD.org/src/rev/6080b4e98f0d
branches:  trunk
changeset: 518585:6080b4e98f0d
user:      manu <manu%NetBSD.org@localhost>
date:      Sun Dec 02 08:47:17 2001 +0000

description:
Uses svr4_mmap for mmap32 emulation. This will not implement all the
IRIX functionnality, but it should be enough to get dynamic linking working

diffstat:

 sys/compat/irix/irix_syscall.h     |   7 +++++--
 sys/compat/irix/irix_syscallargs.h |  14 ++++++++++++--
 sys/compat/irix/irix_syscalls.c    |   8 ++++----
 sys/compat/irix/irix_sysent.c      |  10 +++++-----
 sys/compat/irix/syscalls.master    |   5 +++--
 5 files changed, 29 insertions(+), 15 deletions(-)

diffs (144 lines):

diff -r e6ea4e7b1dcb -r 6080b4e98f0d sys/compat/irix/irix_syscall.h
--- a/sys/compat/irix/irix_syscall.h    Sun Dec 02 08:41:14 2001 +0000
+++ b/sys/compat/irix/irix_syscall.h    Sun Dec 02 08:47:17 2001 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: irix_syscall.h,v 1.5 2001/12/02 08:30:10 manu Exp $ */
+/* $NetBSD: irix_syscall.h,v 1.6 2001/12/02 08:47:17 manu Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from        NetBSD: syscalls.master,v 1.3 2001/11/28 12:00:54 manu Exp 
+ * created from        NetBSD: syscalls.master,v 1.4 2001/12/02 08:30:11 manu Exp 
  */
 
 /* syscall: "syscall" ret: "int" args: */
@@ -173,5 +173,8 @@
 /* syscall: "poll" ret: "int" args: "struct pollfd *" "u_int" "int" */
 #define        IRIX_SYS_poll   87
 
+/* syscall: "mmap" ret: "void *" args: "void *" "svr4_size_t" "int" "int" "int" "svr4_off_t" */
+#define        IRIX_SYS_mmap   134
+
 #define        IRIX_SYS_MAXSYSCALL     226
 #define        IRIX_SYS_NSYSENT        226
diff -r e6ea4e7b1dcb -r 6080b4e98f0d sys/compat/irix/irix_syscallargs.h
--- a/sys/compat/irix/irix_syscallargs.h        Sun Dec 02 08:41:14 2001 +0000
+++ b/sys/compat/irix/irix_syscallargs.h        Sun Dec 02 08:47:17 2001 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: irix_syscallargs.h,v 1.5 2001/12/02 08:30:10 manu Exp $ */
+/* $NetBSD: irix_syscallargs.h,v 1.6 2001/12/02 08:47:17 manu Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from        NetBSD: syscalls.master,v 1.3 2001/11/28 12:00:54 manu Exp 
+ * created from        NetBSD: syscalls.master,v 1.4 2001/12/02 08:30:11 manu Exp 
  */
 
 #ifndef _IRIX_SYS__SYSCALLARGS_H_
@@ -175,6 +175,15 @@
        syscallarg(int) flags;
 };
 
+struct svr4_sys_mmap_args {
+       syscallarg(void *) addr;
+       syscallarg(svr4_size_t) len;
+       syscallarg(int) prot;
+       syscallarg(int) flags;
+       syscallarg(int) fd;
+       syscallarg(svr4_off_t) pos;
+};
+
 /*
  * System call prototypes.
  */
@@ -239,4 +248,5 @@
 int    svr4_sys_getmsg(struct proc *, void *, register_t *);
 int    svr4_sys_putmsg(struct proc *, void *, register_t *);
 int    sys_poll(struct proc *, void *, register_t *);
+int    svr4_sys_mmap(struct proc *, void *, register_t *);
 #endif /* _IRIX_SYS__SYSCALLARGS_H_ */
diff -r e6ea4e7b1dcb -r 6080b4e98f0d sys/compat/irix/irix_syscalls.c
--- a/sys/compat/irix/irix_syscalls.c   Sun Dec 02 08:41:14 2001 +0000
+++ b/sys/compat/irix/irix_syscalls.c   Sun Dec 02 08:47:17 2001 +0000
@@ -1,14 +1,14 @@
-/* $NetBSD: irix_syscalls.c,v 1.5 2001/12/02 08:30:10 manu Exp $ */
+/* $NetBSD: irix_syscalls.c,v 1.6 2001/12/02 08:47:17 manu Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from        NetBSD: syscalls.master,v 1.3 2001/11/28 12:00:54 manu Exp 
+ * created from        NetBSD: syscalls.master,v 1.4 2001/12/02 08:30:11 manu Exp 
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: irix_syscalls.c,v 1.5 2001/12/02 08:30:10 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irix_syscalls.c,v 1.6 2001/12/02 08:47:17 manu Exp $");
 
 #if defined(_KERNEL_OPT)
 #if defined(_KERNEL_OPT)
@@ -174,7 +174,7 @@
        "#131 (unimplemented procblk)",         /* 131 = unimplemented procblk */
        "#132 (unimplemented sprocsp)",         /* 132 = unimplemented sprocsp */
        "#133 (unimplemented sgigsc)",          /* 133 = unimplemented sgigsc */
-       "#134 (unimplemented mmap)",            /* 134 = unimplemented mmap */
+       "mmap",                 /* 134 = mmap */
        "#135 (unimplemented munmap)",          /* 135 = unimplemented munmap */
        "#136 (unimplemented mprotect)",                /* 136 = unimplemented mprotect */
        "#137 (unimplemented msync)",           /* 137 = unimplemented msync */
diff -r e6ea4e7b1dcb -r 6080b4e98f0d sys/compat/irix/irix_sysent.c
--- a/sys/compat/irix/irix_sysent.c     Sun Dec 02 08:41:14 2001 +0000
+++ b/sys/compat/irix/irix_sysent.c     Sun Dec 02 08:47:17 2001 +0000
@@ -1,14 +1,14 @@
-/* $NetBSD: irix_sysent.c,v 1.5 2001/12/02 08:30:10 manu Exp $ */
+/* $NetBSD: irix_sysent.c,v 1.6 2001/12/02 08:47:17 manu Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from        NetBSD: syscalls.master,v 1.3 2001/11/28 12:00:54 manu Exp 
+ * created from        NetBSD: syscalls.master,v 1.4 2001/12/02 08:30:11 manu Exp 
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: irix_sysent.c,v 1.5 2001/12/02 08:30:10 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irix_sysent.c,v 1.6 2001/12/02 08:47:17 manu Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ntp.h"
@@ -311,8 +311,8 @@
            sys_nosys },                        /* 132 = unimplemented sprocsp */
        { 0, 0, 0,
            sys_nosys },                        /* 133 = unimplemented sgigsc */
-       { 0, 0, 0,
-           sys_nosys },                        /* 134 = unimplemented mmap */
+       { 6, s(struct svr4_sys_mmap_args), 0,
+           svr4_sys_mmap },                    /* 134 = mmap */
        { 0, 0, 0,
            sys_nosys },                        /* 135 = unimplemented munmap */
        { 0, 0, 0,
diff -r e6ea4e7b1dcb -r 6080b4e98f0d sys/compat/irix/syscalls.master
--- a/sys/compat/irix/syscalls.master   Sun Dec 02 08:41:14 2001 +0000
+++ b/sys/compat/irix/syscalls.master   Sun Dec 02 08:47:17 2001 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.4 2001/12/02 08:30:11 manu Exp $
+       $NetBSD: syscalls.master,v 1.5 2001/12/02 08:47:17 manu Exp $
 
 ;      @(#)syscalls.master     8.1 (Berkeley) 7/19/93
 
@@ -213,7 +213,8 @@
 131    UNIMPL          procblk
 132    UNIMPL          sprocsp
 133    UNIMPL          sgigsc
-134    UNIMPL          mmap
+134    STD             { void *svr4_sys_mmap(void *addr, svr4_size_t len, \
+                           int prot, int flags, int fd, svr4_off_t pos); }
 135    UNIMPL          munmap
 136    UNIMPL          mprotect
 137    UNIMPL          msync



Home | Main Index | Thread Index | Old Index