xref: /openbsd-src/sys/arch/arm/include/sysarch.h (revision 4a39ccd02c887d988c1a5398dd2142879056da5f)
1*4a39ccd0Sderaadt /*	$OpenBSD: sysarch.h,v 1.3 2012/12/05 23:20:11 deraadt Exp $	*/
2e1e4f5b1Sdrahn /*	$NetBSD: sysarch.h,v 1.4 2002/03/30 06:23:39 thorpej Exp $	*/
3e1e4f5b1Sdrahn 
4e1e4f5b1Sdrahn /*
5e1e4f5b1Sdrahn  * Copyright (c) 1996-1997 Mark Brinicombe.
6e1e4f5b1Sdrahn  * All rights reserved.
7e1e4f5b1Sdrahn  *
8e1e4f5b1Sdrahn  * Redistribution and use in source and binary forms, with or without
9e1e4f5b1Sdrahn  * modification, are permitted provided that the following conditions
10e1e4f5b1Sdrahn  * are met:
11e1e4f5b1Sdrahn  * 1. Redistributions of source code must retain the above copyright
12e1e4f5b1Sdrahn  *    notice, this list of conditions and the following disclaimer.
13e1e4f5b1Sdrahn  * 2. Redistributions in binary form must reproduce the above copyright
14e1e4f5b1Sdrahn  *    notice, this list of conditions and the following disclaimer in the
15e1e4f5b1Sdrahn  *    documentation and/or other materials provided with the distribution.
16e1e4f5b1Sdrahn  * 3. All advertising materials mentioning features or use of this software
17e1e4f5b1Sdrahn  *    must display the following acknowledgement:
18e1e4f5b1Sdrahn  *	This product includes software developed by Mark Brinicombe.
19e1e4f5b1Sdrahn  * 4. The name of the company nor the name of the author may be used to
20e1e4f5b1Sdrahn  *    endorse or promote products derived from this software without specific
21e1e4f5b1Sdrahn  *    prior written permission.
22e1e4f5b1Sdrahn  *
23e1e4f5b1Sdrahn  * THIS SOFTWARE IS PROVIDED BY AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
24e1e4f5b1Sdrahn  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25e1e4f5b1Sdrahn  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26e1e4f5b1Sdrahn  * IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
27e1e4f5b1Sdrahn  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28e1e4f5b1Sdrahn  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
29e1e4f5b1Sdrahn  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30e1e4f5b1Sdrahn  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31e1e4f5b1Sdrahn  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32e1e4f5b1Sdrahn  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33e1e4f5b1Sdrahn  * SUCH DAMAGE.
34e1e4f5b1Sdrahn  */
35e1e4f5b1Sdrahn 
36e1e4f5b1Sdrahn #ifndef _ARM_SYSARCH_H_
37e1e4f5b1Sdrahn #define _ARM_SYSARCH_H_
38e1e4f5b1Sdrahn 
39e1e4f5b1Sdrahn /*
40e1e4f5b1Sdrahn  * Architecture specific syscalls (arm)
41e1e4f5b1Sdrahn  */
42e1e4f5b1Sdrahn 
43e1e4f5b1Sdrahn #define ARM_SYNC_ICACHE		0
44e1e4f5b1Sdrahn #define ARM_DRAIN_WRITEBUF	1
45e1e4f5b1Sdrahn 
46e1e4f5b1Sdrahn struct arm_sync_icache_args {
47e1e4f5b1Sdrahn 	u_int32_t	addr;		/* Virtual start address */
48e1e4f5b1Sdrahn 	size_t		len;		/* Region size */
49e1e4f5b1Sdrahn };
50e1e4f5b1Sdrahn 
51e1e4f5b1Sdrahn #ifndef _KERNEL
52*4a39ccd0Sderaadt 
53*4a39ccd0Sderaadt #include <sys/cdefs.h>
54*4a39ccd0Sderaadt 
55e1e4f5b1Sdrahn __BEGIN_DECLS
5638b77b7aSdrahn int	arm_sync_icache (u_int addr, int len);
5738b77b7aSdrahn int	arm_drain_writebuf (void);
5838b77b7aSdrahn int	sysarch (int, void *);
59e1e4f5b1Sdrahn __END_DECLS
60e1e4f5b1Sdrahn #endif
61e1e4f5b1Sdrahn 
62e1e4f5b1Sdrahn #endif /* !_ARM_SYSARCH_H_ */
63