Deleted Added
full compact
psl.h (256281) psl.h (258559)
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * from: @(#)psl.h 5.2 (Berkeley) 1/18/91
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * from: @(#)psl.h 5.2 (Berkeley) 1/18/91
33 * $FreeBSD: stable/10/sys/x86/include/psl.h 233204 2012-03-19 21:29:57Z tijl $
33 * $FreeBSD: stable/10/sys/x86/include/psl.h 258559 2013-11-25 15:58:48Z emaste $
34 */
35
36#ifndef _MACHINE_PSL_H_
37#define _MACHINE_PSL_H_
38
39/*
40 * 386 processor status longword.
41 */

--- 30 unchanged lines hidden (view full) ---

72#define PSL_USER (PSL_RESERVED_DEFAULT | PSL_I)
73
74/*
75 * Bits that can be changed in user mode on 486's. We allow these bits
76 * to be changed using ptrace(), sigreturn() and procfs. Setting PS_NT
77 * is undesirable but it may as well be allowed since users can inflict
78 * it on the kernel directly. Changes to PSL_AC are silently ignored on
79 * 386's.
34 */
35
36#ifndef _MACHINE_PSL_H_
37#define _MACHINE_PSL_H_
38
39/*
40 * 386 processor status longword.
41 */

--- 30 unchanged lines hidden (view full) ---

72#define PSL_USER (PSL_RESERVED_DEFAULT | PSL_I)
73
74/*
75 * Bits that can be changed in user mode on 486's. We allow these bits
76 * to be changed using ptrace(), sigreturn() and procfs. Setting PS_NT
77 * is undesirable but it may as well be allowed since users can inflict
78 * it on the kernel directly. Changes to PSL_AC are silently ignored on
79 * 386's.
80 *
81 * Users are allowed to change the privileged flag PSL_RF. The cpu sets PSL_RF
82 * in tf_eflags for faults. Debuggers should sometimes set it there too.
83 * tf_eflags is kept in the signal context during signal handling and there is
84 * no other place to remember it, so the PSL_RF bit may be corrupted by the
85 * signal handler without us knowing. Corruption of the PSL_RF bit at worst
86 * causes one more or one less debugger trap, so allowing it is fairly
87 * harmless.
80 */
81#define PSL_USERCHANGE (PSL_C | PSL_PF | PSL_AF | PSL_Z | PSL_N | PSL_T \
88 */
89#define PSL_USERCHANGE (PSL_C | PSL_PF | PSL_AF | PSL_Z | PSL_N | PSL_T \
82 | PSL_D | PSL_V | PSL_NT | PSL_AC | PSL_ID)
90 | PSL_D | PSL_V | PSL_NT | PSL_RF | PSL_AC | PSL_ID)
83
84#endif /* !_MACHINE_PSL_H_ */
91
92#endif /* !_MACHINE_PSL_H_ */