1371853e5SOlivier Houchard /* $NetBSD: sysarch.h,v 1.5 2003/09/11 09:40:12 kleink Exp $ */ 2371853e5SOlivier Houchard 3d8315c79SWarner Losh /*- 4af3dc4a7SPedro F. Giffuni * SPDX-License-Identifier: BSD-4-Clause 5af3dc4a7SPedro F. Giffuni * 6371853e5SOlivier Houchard * Copyright (c) 1996-1997 Mark Brinicombe. 7371853e5SOlivier Houchard * All rights reserved. 8371853e5SOlivier Houchard * 9371853e5SOlivier Houchard * Redistribution and use in source and binary forms, with or without 10371853e5SOlivier Houchard * modification, are permitted provided that the following conditions 11371853e5SOlivier Houchard * are met: 12371853e5SOlivier Houchard * 1. Redistributions of source code must retain the above copyright 13371853e5SOlivier Houchard * notice, this list of conditions and the following disclaimer. 14371853e5SOlivier Houchard * 2. Redistributions in binary form must reproduce the above copyright 15371853e5SOlivier Houchard * notice, this list of conditions and the following disclaimer in the 16371853e5SOlivier Houchard * documentation and/or other materials provided with the distribution. 17371853e5SOlivier Houchard * 3. All advertising materials mentioning features or use of this software 18371853e5SOlivier Houchard * must display the following acknowledgement: 19371853e5SOlivier Houchard * This product includes software developed by Mark Brinicombe. 20371853e5SOlivier Houchard * 4. The name of the company nor the name of the author may be used to 21371853e5SOlivier Houchard * endorse or promote products derived from this software without specific 22371853e5SOlivier Houchard * prior written permission. 23371853e5SOlivier Houchard * 24371853e5SOlivier Houchard * THIS SOFTWARE IS PROVIDED BY AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 25371853e5SOlivier Houchard * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 26371853e5SOlivier Houchard * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 27371853e5SOlivier Houchard * IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 28371853e5SOlivier Houchard * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 29371853e5SOlivier Houchard * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30371853e5SOlivier Houchard * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31371853e5SOlivier Houchard * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32371853e5SOlivier Houchard * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33371853e5SOlivier Houchard * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34371853e5SOlivier Houchard * SUCH DAMAGE. 35371853e5SOlivier Houchard */ 36371853e5SOlivier Houchard 37371853e5SOlivier Houchard 38371853e5SOlivier Houchard #ifndef _ARM_SYSARCH_H_ 39371853e5SOlivier Houchard #define _ARM_SYSARCH_H_ 40371853e5SOlivier Houchard 41e081d0acSRafal Jaworowski #include <machine/armreg.h> 422aa4a62dSAndrew Turner 43e081d0acSRafal Jaworowski #ifndef LOCORE 440b898a9eSAndrew Turner #ifndef __ASSEMBLER__ 45e081d0acSRafal Jaworowski 46371853e5SOlivier Houchard /* 47*b522e138SIan Lepore * Pickup definition of various __types. 48371853e5SOlivier Houchard */ 49*b522e138SIan Lepore #include <sys/_types.h> 50371853e5SOlivier Houchard 51371853e5SOlivier Houchard /* 52371853e5SOlivier Houchard * Architecture specific syscalls (arm) 53371853e5SOlivier Houchard */ 54371853e5SOlivier Houchard 55371853e5SOlivier Houchard #define ARM_SYNC_ICACHE 0 56371853e5SOlivier Houchard #define ARM_DRAIN_WRITEBUF 1 57a74985cdSOlivier Houchard #define ARM_SET_TP 2 58a74985cdSOlivier Houchard #define ARM_GET_TP 3 59a86d7982SMichal Meloun #define ARM_GET_VFPSTATE 4 60371853e5SOlivier Houchard 61371853e5SOlivier Houchard struct arm_sync_icache_args { 62*b522e138SIan Lepore __uintptr_t addr; /* Virtual start address */ 63*b522e138SIan Lepore __size_t len; /* Region size */ 64371853e5SOlivier Houchard }; 65371853e5SOlivier Houchard 66a86d7982SMichal Meloun struct arm_get_vfpstate_args { 67*b522e138SIan Lepore __size_t mc_vfp_size; 68a86d7982SMichal Meloun void *mc_vfp; 69a86d7982SMichal Meloun }; 70a86d7982SMichal Meloun 71371853e5SOlivier Houchard #ifndef _KERNEL 72371853e5SOlivier Houchard __BEGIN_DECLS 73*b522e138SIan Lepore int arm_sync_icache(unsigned int, int); 74371853e5SOlivier Houchard int arm_drain_writebuf(void); 75a74985cdSOlivier Houchard int sysarch(int, void *); 76371853e5SOlivier Houchard __END_DECLS 77371853e5SOlivier Houchard #endif 78371853e5SOlivier Houchard 790b898a9eSAndrew Turner #endif /* __ASSEMBLER__ */ 80e081d0acSRafal Jaworowski #endif /* LOCORE */ 81e081d0acSRafal Jaworowski 82371853e5SOlivier Houchard #endif /* !_ARM_SYSARCH_H_ */ 83