Source-Changes-HG archive

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

[src/pgoyette-compat]: src/sys/arch (Try to) move the arm-specific compat_net...



details:   https://anonhg.NetBSD.org/src/rev/5e1fe9d8a22f
branches:  pgoyette-compat
changeset: 830796:5e1fe9d8a22f
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Thu Sep 27 01:35:41 2018 +0000

description:
(Try to) move the arm-specific compat_netbsd32_machdep stuff to the
arm directory, not in acorn32!

XXX We still need to come back and hook up the _13 and _16 code!

diffstat:

 sys/arch/acorn32/acorn32/netbsd32_machdep.c    |   59 ----------
 sys/arch/acorn32/acorn32/netbsd32_machdep_16.c |   59 ----------
 sys/arch/acorn32/conf/files.acorn32            |    6 +-
 sys/arch/arm/arm32/netbsd32_machdep.c          |   42 ++----
 sys/arch/arm/arm32/netbsd32_machdep_13.c       |  136 +++++++++++++++++++++++++
 sys/arch/arm/arm32/netbsd32_machdep_16.c       |  136 +++++++++++++++++++++++++
 sys/arch/arm/conf/files.arm                    |    8 +-
 7 files changed, 298 insertions(+), 148 deletions(-)

diffs (truncated from 509 to 300 lines):

diff -r d12b6c8269df -r 5e1fe9d8a22f sys/arch/acorn32/acorn32/netbsd32_machdep.c
--- a/sys/arch/acorn32/acorn32/netbsd32_machdep.c       Thu Sep 27 01:34:38 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*     $NetBSD: netbsd32_machdep.c,v 1.1.2.1 2018/09/24 10:20:59 pgoyette Exp $        */
-
-/*
- * Copyright (c) 2001 Wasabi Systems, Inc.
- * All rights reserved.
- *
- * Written by Frank van der Linden for Wasabi Systems, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed for the NetBSD Project by
- *      Wasabi Systems, Inc.
- * 4. The name of Wasabi Systems, Inc. may not be used to endorse
- *    or promote products derived from this software without specific prior
- *    written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.1.2.1 2018/09/24 10:20:59 pgoyette Exp $");
-
-#ifdef _KERNEL_OPT
-#include "opt_compat_netbsd.h"
-#endif
-
-#include <compat/netbsd32/netbsd32.h>
-
-void
-netbsd32_machdep_md_init(void)
-{
-
-       /* nothing to do */
-}
-
-void
-netbsd32_machdep_md_fini(void)
-{
-
-       /* nothing to do */
-}
diff -r d12b6c8269df -r 5e1fe9d8a22f sys/arch/acorn32/acorn32/netbsd32_machdep_16.c
--- a/sys/arch/acorn32/acorn32/netbsd32_machdep_16.c    Thu Sep 27 01:34:38 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*     $NetBSD: netbsd32_machdep_16.c,v 1.1.2.2 2018/09/23 07:16:01 pgoyette Exp $     */
-
-/*
- * Copyright (c) 2001 Wasabi Systems, Inc.
- * All rights reserved.
- *
- * Written by Frank van der Linden for Wasabi Systems, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed for the NetBSD Project by
- *      Wasabi Systems, Inc.
- * 4. The name of Wasabi Systems, Inc. may not be used to endorse
- *    or promote products derived from this software without specific prior
- *    written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.1.2.2 2018/09/23 07:16:01 pgoyette Exp $");
-
-#ifdef _KERNEL_OPT
-#include "opt_compat_netbsd.h"
-#endif
-
-#include <compat/netbsd32/netbsd32.h>
-
-void
-netbsd32_machdep_md_16_init(void)
-{
-
-       /* nothing to do */
-}
-
-void
-netbsd32_machdep_md_16_fini(void)
-{
-
-       /* nothing to do */
-}
diff -r d12b6c8269df -r 5e1fe9d8a22f sys/arch/acorn32/conf/files.acorn32
--- a/sys/arch/acorn32/conf/files.acorn32       Thu Sep 27 01:34:38 2018 +0000
+++ b/sys/arch/acorn32/conf/files.acorn32       Thu Sep 27 01:35:41 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.acorn32,v 1.29.64.1 2018/09/24 10:21:00 pgoyette Exp $
+#      $NetBSD: files.acorn32,v 1.29.64.2 2018/09/27 01:35:41 pgoyette Exp $
 #
 # First try for arm-specific configuration info
 #
@@ -190,8 +190,8 @@
 #
 # Files for compat_netbsd32
 #
-file   arch/acorn32/acorn32/netbsd32_machdep.c         compat_netbsd32
-file   arch/acorn32/acorn32/netbsd32_machdep_16.c      compat_netbsd32 &
+#file  arch/acorn32/acorn32/netbsd32_machdep.c         compat_netbsd32
+#file  arch/acorn32/acorn32/netbsd32_machdep_16.c      compat_netbsd32 &
                                                                compat_16
 
 include "arch/acorn32/conf/majors.acorn32"
diff -r d12b6c8269df -r 5e1fe9d8a22f sys/arch/arm/arm32/netbsd32_machdep.c
--- a/sys/arch/arm/arm32/netbsd32_machdep.c     Thu Sep 27 01:34:38 2018 +0000
+++ b/sys/arch/arm/arm32/netbsd32_machdep.c     Thu Sep 27 01:35:41 2018 +0000
@@ -29,9 +29,13 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: netbsd32_machdep.c,v 1.7 2015/11/26 13:15:34 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: netbsd32_machdep.c,v 1.7.16.1 2018/09/27 01:35:41 pgoyette Exp $");
 
+#ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
+#include "opt_compat_netbsd32.h"
+#include "opt_compat_coredump.h"
+#endif
 
 #include <sys/param.h>
 #include <sys/core.h>
@@ -102,31 +106,17 @@
                return VM_DEFAULT_ADDRESS_BOTTOMUP(base, sz);
 }
 
-
-#ifdef COMPAT_13
-int
-compat_13_netbsd32_sigreturn(struct lwp *l,
-       const struct compat_13_netbsd32_sigreturn_args *uap,
-       register_t *retval)
-{
-       struct compat_13_sys_sigreturn_args ua;
-
-       NETBSD32TOP_UAP(sigcntxp, struct sigcontext13 *);
-
-       return compat_13_sys_sigreturn(l, &ua, retval);
+void  
+netbsd32_machdep_md_init(void)
+{ 
+ 
+       /* nothing to do */
 }
-#endif
-
-#ifdef COMPAT_16
-int
-compat_16_netbsd32___sigreturn14(struct lwp *l,
-       const struct compat_16_netbsd32___sigreturn14_args *uap,
-       register_t *retval)
+ 
+void
+netbsd32_machdep_md_fini(void)
 {
-       struct compat_16_sys___sigreturn14_args ua;
-
-       NETBSD32TOP_UAP(sigcntxp, struct sigcontext *);
+ 
+       /* nothing to do */
+}
 
-       return compat_16_sys___sigreturn14(l, &ua, retval);
-}
-#endif
diff -r d12b6c8269df -r 5e1fe9d8a22f sys/arch/arm/arm32/netbsd32_machdep_13.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/arm32/netbsd32_machdep_13.c  Thu Sep 27 01:35:41 2018 +0000
@@ -0,0 +1,136 @@
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+
+__KERNEL_RCSID(1, "$NetBSD: netbsd32_machdep_13.c,v 1.1.2.1 2018/09/27 01:35:41 pgoyette Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_compat_netbsd.h"
+#include "opt_compat_netbsd32.h"
+#include "opt_compat_coredump.h"
+#endif
+
+#include <sys/param.h>
+#include <sys/core.h>
+#include <sys/exec.h>
+#include <sys/lwp.h>
+#include <sys/signalvar.h>
+#include <sys/syscallargs.h>
+
+#include <uvm/uvm_extern.h>
+
+#include <compat/netbsd32/netbsd32.h>
+#include <compat/netbsd32/netbsd32_exec.h>
+#include <compat/netbsd32/netbsd32_syscallargs.h>
+
+const char machine32[] = MACHINE;
+const char machine_arch32[] = MACHINE_ARCH;
+
+int
+cpu_coredump32(struct lwp *l, struct coredump_iostate *iocookie,
+    struct core32 *chdr)
+{
+       return cpu_coredump(l, iocookie, (struct core *)chdr);
+}
+
+void
+netbsd32_sendsig (const ksiginfo_t *ksi, const sigset_t *ss)
+{
+       sendsig(ksi, ss);
+}
+
+void
+startlwp32(void *arg)
+{
+       startlwp(arg);
+}
+
+int
+cpu_mcontext32_validate(struct lwp *l, const mcontext32_t *mcp)
+{
+       return cpu_mcontext_validate(l, mcp);
+}
+void
+cpu_getmcontext32(struct lwp *l, mcontext32_t *mcp, unsigned int *flagsp)
+{
+       cpu_getmcontext(l, mcp, flagsp);
+}
+
+int
+cpu_setmcontext32(struct lwp *l, const mcontext32_t *mcp, unsigned int flags)
+{
+       return cpu_setmcontext(l, mcp, flags);



Home | Main Index | Thread Index | Old Index