| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: netbsd32_machdep_16.c,v 1.1.2.1 2018/09/29 06:31:02 pgoyette Exp $ */ | | 1 | /* $NetBSD: netbsd32_machdep_16.c,v 1.1.2.2 2018/09/29 06:55:33 pgoyette Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2009 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2009 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Matt Thomas <matt@3am-software.com>. | | 8 | * by Matt Thomas <matt@3am-software.com>. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -20,62 +20,65 @@ | | | @@ -20,62 +20,65 @@ |
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 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 | | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 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 | | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 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 | | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 | * POSSIBILITY OF SUCH DAMAGE. | | 29 | * POSSIBILITY OF SUCH DAMAGE. |
30 | */ | | 30 | */ |
31 | | | 31 | |
32 | #include <sys/cdefs.h> | | 32 | #include <sys/cdefs.h> |
33 | __KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.1.2.1 2018/09/29 06:31:02 pgoyette Exp $"); | | 33 | __KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.1.2.2 2018/09/29 06:55:33 pgoyette Exp $"); |
34 | | | 34 | |
35 | #include "opt_compat_netbsd.h" | | 35 | #include "opt_compat_netbsd.h" |
36 | #include "opt_coredump.h" | | 36 | #include "opt_coredump.h" |
37 | | | 37 | |
38 | #include <sys/param.h> | | 38 | #include <sys/param.h> |
39 | #include <sys/systm.h> | | 39 | #include <sys/systm.h> |
40 | #include <sys/ioctl.h> | | 40 | #include <sys/ioctl.h> |
41 | #include <sys/exec.h> | | 41 | #include <sys/exec.h> |
42 | #include <sys/cpu.h> | | 42 | #include <sys/cpu.h> |
43 | #include <sys/core.h> | | 43 | #include <sys/core.h> |
44 | #include <sys/file.h> | | 44 | #include <sys/file.h> |
45 | #include <sys/time.h> | | 45 | #include <sys/time.h> |
46 | #include <sys/proc.h> | | 46 | #include <sys/proc.h> |
47 | #include <sys/uio.h> | | 47 | #include <sys/uio.h> |
48 | #include <sys/kernel.h> | | 48 | #include <sys/kernel.h> |
49 | #include <sys/buf.h> | | 49 | #include <sys/buf.h> |
50 | #include <sys/signal.h> | | 50 | #include <sys/signal.h> |
51 | #include <sys/signalvar.h> | | 51 | #include <sys/signalvar.h> |
52 | #include <sys/mount.h> | | 52 | #include <sys/mount.h> |
53 | #include <sys/syscallargs.h> | | 53 | #include <sys/syscallargs.h> |
| | | 54 | #include <sys/module_hook.h> |
54 | | | 55 | |
55 | #include <compat/netbsd32/netbsd32.h> | | 56 | #include <compat/netbsd32/netbsd32.h> |
56 | #include <compat/netbsd32/netbsd32_exec.h> | | 57 | #include <compat/netbsd32/netbsd32_exec.h> |
57 | #include <compat/netbsd32/netbsd32_syscallargs.h> | | 58 | #include <compat/netbsd32/netbsd32_syscallargs.h> |
58 | | | 59 | |
59 | #include <mips/cache.h> | | 60 | #include <mips/cache.h> |
60 | #include <mips/sysarch.h> | | 61 | #include <mips/sysarch.h> |
61 | #include <mips/cachectl.h> | | 62 | #include <mips/cachectl.h> |
62 | #include <mips/locore.h> | | 63 | #include <mips/locore.h> |
63 | #include <mips/frame.h> | | 64 | #include <mips/frame.h> |
64 | #include <mips/regnum.h> | | 65 | #include <mips/regnum.h> |
65 | #include <mips/pcb.h> | | 66 | #include <mips/pcb.h> |
66 | | | 67 | |
67 | #include <uvm/uvm_extern.h> | | 68 | #include <uvm/uvm_extern.h> |
68 | | | 69 | |
| | | 70 | void netbsd32_sendsig_siginfo(const ksiginfo_t *, const sigset_t *); |
| | | 71 | |
69 | #ifdef COMPAT_16 | | 72 | #ifdef COMPAT_16 |
70 | int | | 73 | int |
71 | compat_16_netbsd32___sigreturn14(struct lwp *l, | | 74 | compat_16_netbsd32___sigreturn14(struct lwp *l, |
72 | const struct compat_16_netbsd32___sigreturn14_args *uap, | | 75 | const struct compat_16_netbsd32___sigreturn14_args *uap, |
73 | register_t *retval) | | 76 | register_t *retval) |
74 | { | | 77 | { |
75 | struct compat_16_sys___sigreturn14_args ua; | | 78 | struct compat_16_sys___sigreturn14_args ua; |
76 | | | 79 | |
77 | NETBSD32TOP_UAP(sigcntxp, struct sigcontext *); | | 80 | NETBSD32TOP_UAP(sigcntxp, struct sigcontext *); |
78 | | | 81 | |
79 | return compat_16_sys___sigreturn14(l, &ua, retval); | | 82 | return compat_16_sys___sigreturn14(l, &ua, retval); |
80 | } | | 83 | } |
81 | #endif | | 84 | #endif |