summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1997-08-18 11:30:05 +0000
committerkato <kato@FreeBSD.org>1997-08-18 11:30:05 +0000
commit1030957bb5e5a517ce8cbc4c18989e0b2dfae3ac (patch)
tree33a9076a62875b8fe6005be71185589487720e79
parentbb57ad2407023ae28885ef4f4d9f1636f6e39230 (diff)
downloadFreeBSD-src-1030957bb5e5a517ce8cbc4c18989e0b2dfae3ac.zip
FreeBSD-src-1030957bb5e5a517ce8cbc4c18989e0b2dfae3ac.tar.gz
Synchronize with sys/i386/i386/machdep.c, trapc and sys/i386/isa/npx.c
revisions 1.256, 1.105 and 1.51, respectively.
-rw-r--r--sys/pc98/i386/machdep.c3
-rw-r--r--sys/pc98/i386/trap.c10
-rw-r--r--sys/pc98/pc98/machdep.c3
-rw-r--r--sys/pc98/pc98/npx.c4
4 files changed, 9 insertions, 11 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index 792d46f..4e5f055 100644
--- a/sys/pc98/i386/machdep.c
+++ b/sys/pc98/i386/machdep.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
- * $Id: machdep.c,v 1.49 1997/08/06 09:43:45 kato Exp $
+ * $Id: machdep.c,v 1.50 1997/08/09 01:56:34 kato Exp $
*/
#include "apm.h"
@@ -683,7 +683,6 @@ sigreturn(p, uap, retval)
* hardware check for invalid selectors, excess privilege in
* other selectors, invalid %eip's and invalid %esp's.
*/
-#define CS_SECURE(cs) (ISPL(cs) == SEL_UPL)
if (!CS_SECURE(scp->sc_cs)) {
#ifdef DEBUG
printf("sigreturn: cs = 0x%x\n", scp->sc_cs);
diff --git a/sys/pc98/i386/trap.c b/sys/pc98/i386/trap.c
index eca49a3..4727c1a 100644
--- a/sys/pc98/i386/trap.c
+++ b/sys/pc98/i386/trap.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
- * $Id: trap.c,v 1.28 1997/08/10 10:53:49 kato Exp $
+ * $Id: trap.c,v 1.29 1997/08/13 11:00:09 kato Exp $
*/
/*
@@ -226,7 +226,7 @@ trap(frame)
asm("sti");
#endif /* CPU_BUGGY_CYRIX */
- 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;
@@ -772,7 +772,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
@@ -785,7 +785,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 {
@@ -935,7 +935,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;
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index 792d46f..4e5f055 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
- * $Id: machdep.c,v 1.49 1997/08/06 09:43:45 kato Exp $
+ * $Id: machdep.c,v 1.50 1997/08/09 01:56:34 kato Exp $
*/
#include "apm.h"
@@ -683,7 +683,6 @@ sigreturn(p, uap, retval)
* hardware check for invalid selectors, excess privilege in
* other selectors, invalid %eip's and invalid %esp's.
*/
-#define CS_SECURE(cs) (ISPL(cs) == SEL_UPL)
if (!CS_SECURE(scp->sc_cs)) {
#ifdef DEBUG
printf("sigreturn: cs = 0x%x\n", scp->sc_cs);
diff --git a/sys/pc98/pc98/npx.c b/sys/pc98/pc98/npx.c
index 8aa2b41..6c6a7df 100644
--- a/sys/pc98/pc98/npx.c
+++ b/sys/pc98/pc98/npx.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
- * $Id: npx.c,v 1.24 1997/07/21 13:13:43 kato Exp $
+ * $Id: npx.c,v 1.25 1997/08/09 01:55:51 kato Exp $
*/
#include "npx.h"
@@ -560,7 +560,7 @@ npxintr(unit)
* Pass exception to process.
*/
frame = (struct intrframe *)&unit; /* XXX */
- if ((ISPL(frame->if_cs) == SEL_UPL) || (frame->if_eflags & PSL_VM)) {
+ if (CS_SECURE(frame->if_cs) || (frame->if_eflags & PSL_VM)) {
/*
* Interrupt is essentially a trap, so we can afford to call
* the SIGFPE handler (if any) as soon as the interrupt
OpenPOWER on IntegriCloud