Home | History | Annotate | Line # | Download | only in mips
      1 /*	$NetBSD: netbsd32_machdep_13.c,v 1.5 2026/09/20 13:45:00 riastradh 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 (at) 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.5 2026/09/20 13:45:00 riastradh Exp $");
     34 
     35 #ifdef _KERNEL_OPT
     36 #include "opt_compat_netbsd.h"
     37 #endif
     38 
     39 #include <sys/param.h>
     40 #include <sys/systm.h>
     41 #include <sys/ioctl.h>
     42 #include <sys/exec.h>
     43 #include <sys/cpu.h>
     44 #include <sys/core.h>
     45 #include <sys/file.h>
     46 #include <sys/time.h>
     47 #include <sys/proc.h>
     48 #include <sys/uio.h>
     49 #include <sys/kernel.h>
     50 #include <sys/buf.h>
     51 #include <sys/signal.h>
     52 #include <sys/signalvar.h>
     53 #include <sys/mount.h>
     54 #include <sys/syscallargs.h>
     55 
     56 #include <compat/netbsd32/netbsd32.h>
     57 #include <compat/netbsd32/netbsd32_exec.h>
     58 #include <compat/netbsd32/netbsd32_syscallargs.h>
     59 
     60 #include <mips/cache.h>
     61 #include <mips/sysarch.h>
     62 #include <mips/cachectl.h>
     63 #include <mips/locore.h>
     64 #include <mips/frame.h>
     65 #include <mips/regnum.h>
     66 #include <mips/pcb.h>
     67 
     68 #include <uvm/uvm_extern.h>
     69 
     70 int
     71 compat_13_netbsd32_sigreturn(struct lwp *l,
     72 	const struct compat_13_netbsd32_sigreturn_args *uap,
     73 	register_t *retval)
     74 {
     75 	struct compat_13_sys_sigreturn_args ua;
     76 
     77 	memset(&ua, 0, sizeof(ua));
     78 	NETBSD32TOP_UAP(sigcntxp, struct sigcontext13 *);
     79 
     80 	return compat_13_sys_sigreturn(l, &ua, retval);
     81 }
     82 
     83 void
     84 netbsd32_machdep_md_13_init(void)
     85 {
     86 
     87 	/* nothing to do */
     88 }
     89 
     90 void
     91 netbsd32_machdep_md_13_fini(void)
     92 {
     93 
     94 	/* nothing to do */
     95 }
     96