xref: /netbsd-src/sys/arch/mips/mips/netbsd32_machdep_13.c (revision f3cfa6f6ce31685c6c4a758bc430e69eb99f50a4)
1 /*	$NetBSD: netbsd32_machdep_13.c,v 1.2 2019/01/27 02:08:38 pgoyette Exp $	*/
2 
3 /*-
4  * Copyright (c) 2009 The NetBSD Foundation, Inc.
5  * All rights reserved.
6  *
7  * This code is derived from software contributed to The NetBSD Foundation
8  * by Matt Thomas <matt@3am-software.com>.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  *    notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #include <sys/cdefs.h>
33 __KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_13.c,v 1.2 2019/01/27 02:08:38 pgoyette Exp $");
34 
35 #include "opt_compat_netbsd.h"
36 #include "opt_coredump.h"
37 
38 #include <sys/param.h>
39 #include <sys/systm.h>
40 #include <sys/ioctl.h>
41 #include <sys/exec.h>
42 #include <sys/cpu.h>
43 #include <sys/core.h>
44 #include <sys/file.h>
45 #include <sys/time.h>
46 #include <sys/proc.h>
47 #include <sys/uio.h>
48 #include <sys/kernel.h>
49 #include <sys/buf.h>
50 #include <sys/signal.h>
51 #include <sys/signalvar.h>
52 #include <sys/mount.h>
53 #include <sys/syscallargs.h>
54 
55 #include <compat/netbsd32/netbsd32.h>
56 #include <compat/netbsd32/netbsd32_exec.h>
57 #include <compat/netbsd32/netbsd32_syscallargs.h>
58 
59 #include <mips/cache.h>
60 #include <mips/sysarch.h>
61 #include <mips/cachectl.h>
62 #include <mips/locore.h>
63 #include <mips/frame.h>
64 #include <mips/regnum.h>
65 #include <mips/pcb.h>
66 
67 #include <uvm/uvm_extern.h>
68 
69 #if 0
70 cpu_coredump32
71 netbsd32_cpu_upcall
72 netbsd32_vm_default_addr
73 #endif
74 
75 int
76 compat_13_netbsd32_sigreturn(struct lwp *l,
77 	const struct compat_13_netbsd32_sigreturn_args *uap,
78 	register_t *retval)
79 {
80 	struct compat_13_sys_sigreturn_args ua;
81 
82 	NETBSD32TOP_UAP(sigcntxp, struct sigcontext13 *);
83 
84 	return compat_13_sys_sigreturn(l, &ua, retval);
85 }
86 
87 void
88 netbsd32_machdep_md_13_init(void)
89 {
90 
91 	/* nothing to do */
92 }
93 
94 void
95 netbsd32_machdep_md_13_fini(void)
96 {
97 
98 	/* nothing to do */
99 }
100