diff options
author | charnier <charnier@FreeBSD.org> | 1997-08-18 06:58:59 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1997-08-18 06:58:59 +0000 |
commit | e0224667fe353de8d6394686a4589a5a7935b6b2 (patch) | |
tree | 09a2df2389cb19d23678a3b740fd0debb15ff871 /sys/kern/subr_trap.c | |
parent | b224a05842b1f2b4d5704ed084f9ca79471d929d (diff) | |
download | FreeBSD-src-e0224667fe353de8d6394686a4589a5a7935b6b2.zip FreeBSD-src-e0224667fe353de8d6394686a4589a5a7935b6b2.tar.gz |
Use CS_SECURE macro.
Reviewed by: John Dyson
Diffstat (limited to 'sys/kern/subr_trap.c')
-rw-r--r-- | sys/kern/subr_trap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 4498fc3..72df964 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.103 1997/08/09 10:13:32 dyson Exp $ + * $Id: trap.c,v 1.104 1997/08/12 19:07:42 dyson Exp $ */ /* @@ -206,7 +206,7 @@ trap(frame) type = frame.tf_trapno; code = frame.tf_err; - if ((ISPL(frame.tf_cs) == SEL_UPL) || (frame.tf_eflags & PSL_VM)) { + if (CS_SECURE(frame.tf_cs) || (frame.tf_eflags & PSL_VM)) { /* user trap */ sticks = p->p_sticks; @@ -722,7 +722,7 @@ trap_fatal(frame) printf("\n\nFatal trap %d: %s while in %s mode\n", type, trap_msg[type], frame->tf_eflags & PSL_VM ? "vm86" : - ISPL(frame->tf_cs) == SEL_UPL ? "user" : "kernel"); + CS_SECURE(frame->tf_cs) ? "user" : "kernel"); #ifdef SMP printf("cpuid = %d\n", cpuid); #endif @@ -735,7 +735,7 @@ trap_fatal(frame) } printf("instruction pointer = 0x%x:0x%x\n", frame->tf_cs & 0xffff, frame->tf_eip); - if ((ISPL(frame->tf_cs) == SEL_UPL) || (frame->tf_eflags & PSL_VM)) { + if (CS_SECURE(frame->tf_cs) || (frame->tf_eflags & PSL_VM)) { ss = frame->tf_ss & 0xffff; esp = frame->tf_esp; } else { @@ -885,7 +885,7 @@ syscall(frame) u_int code; sticks = p->p_sticks; - if (ISPL(frame.tf_cs) != SEL_UPL) + if (!CS_SECURE(frame.tf_cs)) panic("syscall"); p->p_md.md_regs = &frame; |