1*4a39ccd0Sderaadt /* $OpenBSD: sysarch.h,v 1.2 2012/12/05 23:20:13 deraadt Exp $ */ 26029ab56Smiod 36029ab56Smiod /* 46029ab56Smiod * Copyright (c) 2009 Miodrag Vallat. 56029ab56Smiod * 66029ab56Smiod * Permission to use, copy, modify, and distribute this software for any 76029ab56Smiod * purpose with or without fee is hereby granted, provided that the above 86029ab56Smiod * copyright notice and this permission notice appear in all copies. 96029ab56Smiod * 106029ab56Smiod * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 116029ab56Smiod * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 126029ab56Smiod * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 136029ab56Smiod * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 146029ab56Smiod * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 156029ab56Smiod * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 166029ab56Smiod * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 176029ab56Smiod */ 186029ab56Smiod 196029ab56Smiod #ifndef _MIPS64_SYSARCH_H_ 206029ab56Smiod #define _MIPS64_SYSARCH_H_ 216029ab56Smiod 226029ab56Smiod /* 236029ab56Smiod * Architecture specific syscalls (mips64) 246029ab56Smiod */ 256029ab56Smiod 266029ab56Smiod #define MIPS64_CACHEFLUSH 0 276029ab56Smiod 286029ab56Smiod /* 296029ab56Smiod * Argument structure and defines to mimic IRIX cacheflush() system call 306029ab56Smiod */ 316029ab56Smiod 326029ab56Smiod struct mips64_cacheflush_args { 336029ab56Smiod vaddr_t va; 346029ab56Smiod size_t sz; 356029ab56Smiod int which; 366029ab56Smiod #define ICACHE 0x01 376029ab56Smiod #define DCACHE 0x02 386029ab56Smiod #define BCACHE (ICACHE | DCACHE) 396029ab56Smiod }; 406029ab56Smiod 416029ab56Smiod #ifndef _KERNEL 42*4a39ccd0Sderaadt 436029ab56Smiod #include <sys/cdefs.h> 44*4a39ccd0Sderaadt 456029ab56Smiod __BEGIN_DECLS 466029ab56Smiod int cacheflush(void *, int, int); 476029ab56Smiod int _flush_cache(char *, int, int); 486029ab56Smiod int sysarch(int, void *); 496029ab56Smiod __END_DECLS 506029ab56Smiod #endif /* _KERNEL */ 516029ab56Smiod 526029ab56Smiod #endif /* _MIPS64_SYSARCH_H_ */ 53