xref: /f-stack/freebsd/arm/include/sysarch.h (revision 22ce4aff)
1a9643ea8Slogwang /*	$NetBSD: sysarch.h,v 1.5 2003/09/11 09:40:12 kleink Exp $	*/
2a9643ea8Slogwang 
3a9643ea8Slogwang /*-
4*22ce4affSfengbojiang  * SPDX-License-Identifier: BSD-4-Clause
5*22ce4affSfengbojiang  *
6a9643ea8Slogwang  * Copyright (c) 1996-1997 Mark Brinicombe.
7a9643ea8Slogwang  * All rights reserved.
8a9643ea8Slogwang  *
9a9643ea8Slogwang  * Redistribution and use in source and binary forms, with or without
10a9643ea8Slogwang  * modification, are permitted provided that the following conditions
11a9643ea8Slogwang  * are met:
12a9643ea8Slogwang  * 1. Redistributions of source code must retain the above copyright
13a9643ea8Slogwang  *    notice, this list of conditions and the following disclaimer.
14a9643ea8Slogwang  * 2. Redistributions in binary form must reproduce the above copyright
15a9643ea8Slogwang  *    notice, this list of conditions and the following disclaimer in the
16a9643ea8Slogwang  *    documentation and/or other materials provided with the distribution.
17a9643ea8Slogwang  * 3. All advertising materials mentioning features or use of this software
18a9643ea8Slogwang  *    must display the following acknowledgement:
19a9643ea8Slogwang  *	This product includes software developed by Mark Brinicombe.
20a9643ea8Slogwang  * 4. The name of the company nor the name of the author may be used to
21a9643ea8Slogwang  *    endorse or promote products derived from this software without specific
22a9643ea8Slogwang  *    prior written permission.
23a9643ea8Slogwang  *
24a9643ea8Slogwang  * THIS SOFTWARE IS PROVIDED BY AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
25a9643ea8Slogwang  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26a9643ea8Slogwang  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27a9643ea8Slogwang  * IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
28a9643ea8Slogwang  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29a9643ea8Slogwang  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30a9643ea8Slogwang  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31a9643ea8Slogwang  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32a9643ea8Slogwang  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33a9643ea8Slogwang  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34a9643ea8Slogwang  * SUCH DAMAGE.
35a9643ea8Slogwang  */
36a9643ea8Slogwang 
37a9643ea8Slogwang /* $FreeBSD$ */
38a9643ea8Slogwang 
39a9643ea8Slogwang #ifndef _ARM_SYSARCH_H_
40a9643ea8Slogwang #define _ARM_SYSARCH_H_
41a9643ea8Slogwang 
42a9643ea8Slogwang #include <machine/armreg.h>
43a9643ea8Slogwang 
44a9643ea8Slogwang #ifndef LOCORE
45a9643ea8Slogwang #ifndef __ASSEMBLER__
46a9643ea8Slogwang 
47a9643ea8Slogwang /*
48*22ce4affSfengbojiang  * Pickup definition of various __types.
49a9643ea8Slogwang  */
50*22ce4affSfengbojiang #include <sys/_types.h>
51a9643ea8Slogwang 
52a9643ea8Slogwang /*
53a9643ea8Slogwang  * Architecture specific syscalls (arm)
54a9643ea8Slogwang  */
55a9643ea8Slogwang 
56a9643ea8Slogwang #define ARM_SYNC_ICACHE		0
57a9643ea8Slogwang #define ARM_DRAIN_WRITEBUF	1
58a9643ea8Slogwang #define ARM_SET_TP		2
59a9643ea8Slogwang #define ARM_GET_TP		3
60*22ce4affSfengbojiang #define ARM_GET_VFPSTATE	4
61a9643ea8Slogwang 
62a9643ea8Slogwang struct arm_sync_icache_args {
63*22ce4affSfengbojiang 	__uintptr_t	addr;		/* Virtual start address */
64*22ce4affSfengbojiang 	__size_t	len;		/* Region size */
65*22ce4affSfengbojiang };
66*22ce4affSfengbojiang 
67*22ce4affSfengbojiang struct arm_get_vfpstate_args {
68*22ce4affSfengbojiang 	__size_t	mc_vfp_size;
69*22ce4affSfengbojiang 	void 		*mc_vfp;
70a9643ea8Slogwang };
71a9643ea8Slogwang 
72a9643ea8Slogwang #ifndef _KERNEL
73a9643ea8Slogwang __BEGIN_DECLS
74*22ce4affSfengbojiang int	arm_sync_icache(unsigned int, int);
75a9643ea8Slogwang int	arm_drain_writebuf(void);
76a9643ea8Slogwang int	sysarch(int, void *);
77a9643ea8Slogwang __END_DECLS
78a9643ea8Slogwang #endif
79a9643ea8Slogwang 
80a9643ea8Slogwang #endif /* __ASSEMBLER__ */
81a9643ea8Slogwang #endif /* LOCORE */
82a9643ea8Slogwang 
83a9643ea8Slogwang #endif /* !_ARM_SYSARCH_H_ */
84