sysarch.h revision 1.1
1/*	$OpenBSD: sysarch.h,v 1.1 2009/09/27 18:20:13 miod 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
32struct	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#include <sys/cdefs.h>
43__BEGIN_DECLS
44int	cacheflush(void *, int, int);
45int	_flush_cache(char *, int, int);
46int	sysarch(int, void *);
47__END_DECLS
48#endif	/* _KERNEL */
49
50#endif	/* _MIPS64_SYSARCH_H_ */
51