xref: /dflybsd-src/sys/cpu/x86_64/include/sysarch.h (revision 2c64e990ea2bb1213bd0758af732469466873ba6)
1b2b3ffcdSSimon Schubert /*-
2b2b3ffcdSSimon Schubert  * Copyright (c) 1993 The Regents of the University of California.
3b2b3ffcdSSimon Schubert  * All rights reserved.
4b2b3ffcdSSimon Schubert  *
5b2b3ffcdSSimon Schubert  * Redistribution and use in source and binary forms, with or without
6b2b3ffcdSSimon Schubert  * modification, are permitted provided that the following conditions
7b2b3ffcdSSimon Schubert  * are met:
8b2b3ffcdSSimon Schubert  * 1. Redistributions of source code must retain the above copyright
9b2b3ffcdSSimon Schubert  *    notice, this list of conditions and the following disclaimer.
10b2b3ffcdSSimon Schubert  * 2. Redistributions in binary form must reproduce the above copyright
11b2b3ffcdSSimon Schubert  *    notice, this list of conditions and the following disclaimer in the
12b2b3ffcdSSimon Schubert  *    documentation and/or other materials provided with the distribution.
13*2c64e990Szrj  * 3. Neither the name of the University nor the names of its contributors
14b2b3ffcdSSimon Schubert  *    may be used to endorse or promote products derived from this software
15b2b3ffcdSSimon Schubert  *    without specific prior written permission.
16b2b3ffcdSSimon Schubert  *
17b2b3ffcdSSimon Schubert  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18b2b3ffcdSSimon Schubert  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19b2b3ffcdSSimon Schubert  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20b2b3ffcdSSimon Schubert  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21b2b3ffcdSSimon Schubert  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22b2b3ffcdSSimon Schubert  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23b2b3ffcdSSimon Schubert  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24b2b3ffcdSSimon Schubert  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25b2b3ffcdSSimon Schubert  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26b2b3ffcdSSimon Schubert  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27b2b3ffcdSSimon Schubert  * SUCH DAMAGE.
28b2b3ffcdSSimon Schubert  *
29b2b3ffcdSSimon Schubert  * $FreeBSD: src/sys/amd64/include/sysarch.h,v 1.22 2004/01/09 16:52:08 nectar Exp $
30b2b3ffcdSSimon Schubert  */
31b2b3ffcdSSimon Schubert 
32b2b3ffcdSSimon Schubert /*
33b2b3ffcdSSimon Schubert  * Architecture specific syscalls (x86_64)
34b2b3ffcdSSimon Schubert  */
35b2b3ffcdSSimon Schubert #ifndef _CPU_SYSARCH_H_
36b2b3ffcdSSimon Schubert #define _CPU_SYSARCH_H_
37b2b3ffcdSSimon Schubert 
38b2b3ffcdSSimon Schubert /* Leave space for 0-127 for to avoid translating syscalls */
39b2b3ffcdSSimon Schubert /* XXX */
40b2b3ffcdSSimon Schubert #define	AMD64_GET_FSBASE	128
41b2b3ffcdSSimon Schubert #define	AMD64_SET_FSBASE	129
42b2b3ffcdSSimon Schubert #define	AMD64_GET_GSBASE	130
43b2b3ffcdSSimon Schubert #define	AMD64_SET_GSBASE	131
44b2b3ffcdSSimon Schubert 
45b2b3ffcdSSimon Schubert #ifndef _KERNEL
46b2b3ffcdSSimon Schubert #include <sys/cdefs.h>
47b2b3ffcdSSimon Schubert 
48b2b3ffcdSSimon Schubert __BEGIN_DECLS
49b2b3ffcdSSimon Schubert int amd64_get_fsbase(void **);
50b2b3ffcdSSimon Schubert int amd64_get_gsbase(void **);
51b2b3ffcdSSimon Schubert int amd64_set_fsbase(void *);
52b2b3ffcdSSimon Schubert int amd64_set_gsbase(void *);
53b2b3ffcdSSimon Schubert int sysarch(int, void *);
54b2b3ffcdSSimon Schubert __END_DECLS
55b2b3ffcdSSimon Schubert #endif
56b2b3ffcdSSimon Schubert 
57b2b3ffcdSSimon Schubert #endif /* !_CPU_SYSARCH_H_ */
58