Module Name:    src
Committed By:   pgoyette
Date:           Thu Sep 27 01:35:41 UTC 2018

Modified Files:
        src/sys/arch/acorn32/conf [pgoyette-compat]: files.acorn32
        src/sys/arch/arm/arm32 [pgoyette-compat]: netbsd32_machdep.c
        src/sys/arch/arm/conf [pgoyette-compat]: files.arm
Added Files:
        src/sys/arch/arm/arm32 [pgoyette-compat]: netbsd32_machdep_13.c
            netbsd32_machdep_16.c
Removed Files:
        src/sys/arch/acorn32/acorn32 [pgoyette-compat]: netbsd32_machdep.c
            netbsd32_machdep_16.c

Log Message:
(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!


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r0 src/sys/arch/acorn32/acorn32/netbsd32_machdep.c
cvs rdiff -u -r1.1.2.2 -r0 src/sys/arch/acorn32/acorn32/netbsd32_machdep_16.c
cvs rdiff -u -r1.29.64.1 -r1.29.64.2 src/sys/arch/acorn32/conf/files.acorn32
cvs rdiff -u -r1.7 -r1.7.16.1 src/sys/arch/arm/arm32/netbsd32_machdep.c
cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/arm/arm32/netbsd32_machdep_13.c \
    src/sys/arch/arm/arm32/netbsd32_machdep_16.c
cvs rdiff -u -r1.138.2.2 -r1.138.2.3 src/sys/arch/arm/conf/files.arm

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/acorn32/conf/files.acorn32
diff -u src/sys/arch/acorn32/conf/files.acorn32:1.29.64.1 src/sys/arch/acorn32/conf/files.acorn32:1.29.64.2
--- src/sys/arch/acorn32/conf/files.acorn32:1.29.64.1	Mon Sep 24 10:21:00 2018
+++ src/sys/arch/acorn32/conf/files.acorn32	Thu Sep 27 01:35:41 2018
@@ -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 @@ include "dev/pckbport/files.pckbport"
 #
 # 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"

Index: src/sys/arch/arm/arm32/netbsd32_machdep.c
diff -u src/sys/arch/arm/arm32/netbsd32_machdep.c:1.7 src/sys/arch/arm/arm32/netbsd32_machdep.c:1.7.16.1
--- src/sys/arch/arm/arm32/netbsd32_machdep.c:1.7	Thu Nov 26 13:15:34 2015
+++ src/sys/arch/arm/arm32/netbsd32_machdep.c	Thu Sep 27 01:35:41 2018
@@ -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 @@ netbsd32_vm_default_addr(struct proc *p,
 		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 *);
-
-	return compat_16_sys___sigreturn14(l, &ua, retval);
+ 
+	/* nothing to do */
 }
-#endif
+

Index: src/sys/arch/arm/conf/files.arm
diff -u src/sys/arch/arm/conf/files.arm:1.138.2.2 src/sys/arch/arm/conf/files.arm:1.138.2.3
--- src/sys/arch/arm/conf/files.arm:1.138.2.2	Thu Sep  6 06:55:26 2018
+++ src/sys/arch/arm/conf/files.arm	Thu Sep 27 01:35:41 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.arm,v 1.138.2.2 2018/09/06 06:55:26 pgoyette Exp $
+#	$NetBSD: files.arm,v 1.138.2.3 2018/09/27 01:35:41 pgoyette Exp $
 
 # temporary define to allow easy moving to ../arch/arm/arm32
 defflag				ARM32
@@ -227,6 +227,12 @@ file	arch/arm/arm32/bcopy_page.S		arm32
 #
 include "compat/netbsd32/files.netbsd32"
 file	arch/arm/arm32/netbsd32_machdep.c	arm32 & compat_netbsd32
+file   arch/arm/arm32/netbsd32_machdep.c        arm32 & compat_netbsd32
+file   arch/arm/arm32/netbsd32_machdep_16.c     arm32 & compat_netbsd32 &
+                                                                compat_16
+file   arch/arm/arm32/netbsd32_machdep_13.c     arm32 & compat_netbsd32 &
+                                                                compat_13
+
 
 # Linux binary compatibility (COMPAT_LINUX)
 include "compat/ossaudio/files.ossaudio"

Added files:

Index: src/sys/arch/arm/arm32/netbsd32_machdep_13.c
diff -u /dev/null src/sys/arch/arm/arm32/netbsd32_machdep_13.c:1.1.2.1
--- /dev/null	Thu Sep 27 01:35:42 2018
+++ src/sys/arch/arm/arm32/netbsd32_machdep_13.c	Thu Sep 27 01:35:41 2018
@@ -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);
+}
+
+int
+netbsd32_sysarch(struct lwp *l, const struct netbsd32_sysarch_args *uap,
+	register_t *retval)
+{
+	return sys_sysarch(l, (const struct sys_sysarch_args *)uap, retval);
+}
+
+vaddr_t
+netbsd32_vm_default_addr(struct proc *p, vaddr_t base, vsize_t sz,
+    int topdown)
+{
+	if (topdown)
+		return VM_DEFAULT_ADDRESS_TOPDOWN(base, sz);
+	else    
+		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);
+}
+#endif
+
+#ifdef COMPAT_16
+int
+compat_16_netbsd32___sigreturn14(struct lwp *l,
+	const struct compat_16_netbsd32___sigreturn14_args *uap,
+	register_t *retval)
+{
+	struct compat_16_sys___sigreturn14_args ua;
+
+	NETBSD32TOP_UAP(sigcntxp, struct sigcontext *);
+
+	return compat_16_sys___sigreturn14(l, &ua, retval);
+}
+#endif
Index: src/sys/arch/arm/arm32/netbsd32_machdep_16.c
diff -u /dev/null src/sys/arch/arm/arm32/netbsd32_machdep_16.c:1.1.2.1
--- /dev/null	Thu Sep 27 01:35:42 2018
+++ src/sys/arch/arm/arm32/netbsd32_machdep_16.c	Thu Sep 27 01:35:41 2018
@@ -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_16.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);
+}
+
+int
+netbsd32_sysarch(struct lwp *l, const struct netbsd32_sysarch_args *uap,
+	register_t *retval)
+{
+	return sys_sysarch(l, (const struct sys_sysarch_args *)uap, retval);
+}
+
+vaddr_t
+netbsd32_vm_default_addr(struct proc *p, vaddr_t base, vsize_t sz,
+    int topdown)
+{
+	if (topdown)
+		return VM_DEFAULT_ADDRESS_TOPDOWN(base, sz);
+	else    
+		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);
+}
+#endif
+
+#ifdef COMPAT_16
+int
+compat_16_netbsd32___sigreturn14(struct lwp *l,
+	const struct compat_16_netbsd32___sigreturn14_args *uap,
+	register_t *retval)
+{
+	struct compat_16_sys___sigreturn14_args ua;
+
+	NETBSD32TOP_UAP(sigcntxp, struct sigcontext *);
+
+	return compat_16_sys___sigreturn14(l, &ua, retval);
+}
+#endif

Reply via email to