xref: /freebsd/sys/i386/include/frame.h (revision 95ee2897)
15b81b6b3SRodney W. Grimes /*-
2bcfc2be1SKonstantin Belousov  * Copyright (c) 2003 Peter Wemm.
3bcfc2be1SKonstantin Belousov  * Copyright (c) 1990 The Regents of the University of California.
4bcfc2be1SKonstantin Belousov  * All rights reserved.
5bcfc2be1SKonstantin Belousov  *
6bcfc2be1SKonstantin Belousov  * This code is derived from software contributed to Berkeley by
7bcfc2be1SKonstantin Belousov  * William Jolitz.
8bcfc2be1SKonstantin Belousov  *
9bcfc2be1SKonstantin Belousov  * Redistribution and use in source and binary forms, with or without
10bcfc2be1SKonstantin Belousov  * modification, are permitted provided that the following conditions
11bcfc2be1SKonstantin Belousov  * are met:
12bcfc2be1SKonstantin Belousov  * 1. Redistributions of source code must retain the above copyright
13bcfc2be1SKonstantin Belousov  *    notice, this list of conditions and the following disclaimer.
14bcfc2be1SKonstantin Belousov  * 2. Redistributions in binary form must reproduce the above copyright
15bcfc2be1SKonstantin Belousov  *    notice, this list of conditions and the following disclaimer in the
16bcfc2be1SKonstantin Belousov  *    documentation and/or other materials provided with the distribution.
17fbbd9655SWarner Losh  * 3. Neither the name of the University nor the names of its contributors
18bcfc2be1SKonstantin Belousov  *    may be used to endorse or promote products derived from this software
19bcfc2be1SKonstantin Belousov  *    without specific prior written permission.
20bcfc2be1SKonstantin Belousov  *
21bcfc2be1SKonstantin Belousov  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22bcfc2be1SKonstantin Belousov  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23bcfc2be1SKonstantin Belousov  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24bcfc2be1SKonstantin Belousov  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25bcfc2be1SKonstantin Belousov  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26bcfc2be1SKonstantin Belousov  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27bcfc2be1SKonstantin Belousov  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28bcfc2be1SKonstantin Belousov  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29bcfc2be1SKonstantin Belousov  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30bcfc2be1SKonstantin Belousov  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31bcfc2be1SKonstantin Belousov  * SUCH DAMAGE.
325b81b6b3SRodney W. Grimes  */
33bcfc2be1SKonstantin Belousov 
34bcfc2be1SKonstantin Belousov #ifndef _I386_FRAME_H_
35bcfc2be1SKonstantin Belousov #define	_I386_FRAME_H_
365b81b6b3SRodney W. Grimes 
3731a53cd0SKonstantin Belousov #include <x86/frame.h>
38f9343dacSKonstantin Belousov 
39f9343dacSKonstantin Belousov #define	CS_SECURE(cs)		(ISPL(cs) == SEL_UPL)
40f9343dacSKonstantin Belousov #define	EFL_SECURE(ef, oef)	((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0)
41f9343dacSKonstantin Belousov 
42d86c1f0dSKonstantin Belousov #define	TRAMP_STACK_SZ		4096
43d86c1f0dSKonstantin Belousov #define	TRAMP_COPYOUT_SZ	128
44d86c1f0dSKonstantin Belousov #define	VM86_STACK_SPACE	16
45d86c1f0dSKonstantin Belousov 
46bcfc2be1SKonstantin Belousov #endif	/* _I386_FRAME_H_ */
47