xref: /openbsd-src/sys/arch/powerpc64/powerpc64/sys_machdep.c (revision 13861200971d68c7e584ecaf5e9bef6183e1b712)
1*13861200Skettenis /*	$OpenBSD: sys_machdep.c,v 1.1 2020/05/16 17:11:14 kettenis Exp $	*/
2*13861200Skettenis 
3*13861200Skettenis /*
4*13861200Skettenis  * Copyright (c) 1992, 1993
5*13861200Skettenis  *	The Regents of the University of California.  All rights reserved.
6*13861200Skettenis  *
7*13861200Skettenis  * This code is derived from software contributed to Berkeley by
8*13861200Skettenis  * Ralph Campbell.
9*13861200Skettenis  *
10*13861200Skettenis  * Redistribution and use in source and binary forms, with or without
11*13861200Skettenis  * modification, are permitted provided that the following conditions
12*13861200Skettenis  * are met:
13*13861200Skettenis  * 1. Redistributions of source code must retain the above copyright
14*13861200Skettenis  *    notice, this list of conditions and the following disclaimer.
15*13861200Skettenis  * 2. Redistributions in binary form must reproduce the above copyright
16*13861200Skettenis  *    notice, this list of conditions and the following disclaimer in the
17*13861200Skettenis  *    documentation and/or other materials provided with the distribution.
18*13861200Skettenis  * 3. All advertising materials mentioning features or use of this software
19*13861200Skettenis  *    must display the following acknowledgement:
20*13861200Skettenis  *	This product includes software developed by the University of
21*13861200Skettenis  *	California, Berkeley and its contributors.
22*13861200Skettenis  * 4. Neither the name of the University nor the names of its contributors
23*13861200Skettenis  *    may be used to endorse or promote products derived from this software
24*13861200Skettenis  *    without specific prior written permission.
25*13861200Skettenis  *
26*13861200Skettenis  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27*13861200Skettenis  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28*13861200Skettenis  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29*13861200Skettenis  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30*13861200Skettenis  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31*13861200Skettenis  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32*13861200Skettenis  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33*13861200Skettenis  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34*13861200Skettenis  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35*13861200Skettenis  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36*13861200Skettenis  * SUCH DAMAGE.
37*13861200Skettenis  *
38*13861200Skettenis  *	@(#)sys_machdep.c	8.1 (Berkeley) 6/10/93
39*13861200Skettenis  */
40*13861200Skettenis 
41*13861200Skettenis #include <sys/param.h>
42*13861200Skettenis #include <sys/systm.h>
43*13861200Skettenis #include <sys/ioctl.h>
44*13861200Skettenis #include <sys/time.h>
45*13861200Skettenis #include <sys/proc.h>
46*13861200Skettenis #include <sys/kernel.h>
47*13861200Skettenis #include <sys/buf.h>
48*13861200Skettenis 
49*13861200Skettenis #include <sys/mount.h>
50*13861200Skettenis #include <sys/syscallargs.h>
51*13861200Skettenis 
52*13861200Skettenis #include <uvm/uvm_extern.h>
53*13861200Skettenis 
54*13861200Skettenis int
sys_sysarch(struct proc * p,void * v,register_t * retval)55*13861200Skettenis sys_sysarch(struct proc *p, void *v, register_t *retval)
56*13861200Skettenis {
57*13861200Skettenis 	struct sys_sysarch_args /* {
58*13861200Skettenis 		syscallarg(int) op;
59*13861200Skettenis 		syscallarg(void *) parms;
60*13861200Skettenis 	} */ *uap = v;
61*13861200Skettenis 	int error = 0;
62*13861200Skettenis 
63*13861200Skettenis 	switch(SCARG(uap, op)) {
64*13861200Skettenis 	default:
65*13861200Skettenis 		error = EINVAL;
66*13861200Skettenis 		break;
67*13861200Skettenis 	}
68*13861200Skettenis 
69*13861200Skettenis 	return (error);
70*13861200Skettenis }
71