1 /* $OpenBSD: sysarch.h,v 1.1 2021/09/14 12:03:49 jca Exp $ */ 2 3 /* 4 * Copyright (c) 2021 Jeremie Courreges-Anglas <jca@openbsd.org> 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 _RISCV64_SYSARCH_H_ 20 #define _RISCV64_SYSARCH_H_ 21 22 /* 23 * Architecture specific syscalls (riscv64) 24 */ 25 26 #define RISCV_SYNC_ICACHE 0 27 28 struct riscv_sync_icache_args { 29 u_int64_t addr; /* Virtual start address */ 30 size_t len; /* Region size */ 31 }; 32 33 #ifndef _KERNEL 34 35 #include <sys/cdefs.h> 36 37 __BEGIN_DECLS 38 int sysarch(int, void *); 39 __END_DECLS 40 41 #endif /* _KERNEL */ 42 43 #endif /* _RISCV64_SYSARCH_H_ */ 44