xref: /openbsd/sys/arch/mips64/include/sysarch.h (revision 73471bf0)
1 /*	$OpenBSD: sysarch.h,v 1.2 2012/12/05 23:20:13 deraadt Exp $	*/
2 
3 /*
4  * Copyright (c) 2009 Miodrag Vallat.
5  *
6  * Permission to use, copy, modify, and distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef	_MIPS64_SYSARCH_H_
20 #define	_MIPS64_SYSARCH_H_
21 
22 /*
23  * Architecture specific syscalls (mips64)
24  */
25 
26 #define	MIPS64_CACHEFLUSH	0
27 
28 /*
29  * Argument structure and defines to mimic IRIX cacheflush() system call
30  */
31 
32 struct	mips64_cacheflush_args {
33 	vaddr_t	va;
34 	size_t	sz;
35 	int	which;
36 #define	ICACHE	0x01
37 #define	DCACHE	0x02
38 #define	BCACHE	(ICACHE | DCACHE)
39 };
40 
41 #ifndef _KERNEL
42 
43 #include <sys/cdefs.h>
44 
45 __BEGIN_DECLS
46 int	cacheflush(void *, int, int);
47 int	_flush_cache(char *, int, int);
48 int	sysarch(int, void *);
49 __END_DECLS
50 #endif	/* _KERNEL */
51 
52 #endif	/* _MIPS64_SYSARCH_H_ */
53