summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1997-08-21 10:13:12 +0000
committerkato <kato@FreeBSD.org>1997-08-21 10:13:12 +0000
commit1dcee24a4f6644762e69298d10555e4574b6faca (patch)
tree39209058a87f5c872984096b320c899777fe9b88 /sys/pc98
parent7e95ba029ed99ff5135ce8a0fbd9e0b2dc9d401e (diff)
downloadFreeBSD-src-1dcee24a4f6644762e69298d10555e4574b6faca.zip
FreeBSD-src-1dcee24a4f6644762e69298d10555e4574b6faca.tar.gz
Synchronize with sys/i386/i386/machdep.c, trap.c and
sys/i386/isa/npx.c revisions 1.257, 1.107 and 1.52, respectively.
Diffstat (limited to 'sys/pc98')
-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, 11 insertions, 9 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index 4e5f055..36981aa 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.50 1997/08/09 01:56:34 kato Exp $
+ * $Id: machdep.c,v 1.51 1997/08/18 11:29:57 kato Exp $
*/
#include "apm.h"
@@ -683,6 +683,7 @@ 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 7d4df49..1206b76 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.30 1997/08/18 11:29:58 kato Exp $
+ * $Id: trap.c,v 1.31 1997/08/20 10:24:56 kato Exp $
*/
/*
@@ -226,7 +226,7 @@ trap(frame)
asm("sti");
#endif /* CPU_BUGGY_CYRIX */
- if (CS_SECURE(frame.tf_cs) || (frame.tf_eflags & PSL_VM)) {
+ if ((ISPL(frame.tf_cs) == SEL_UPL) || (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" :
- CS_SECURE(frame->tf_cs) ? "user" : "kernel");
+ ISPL(frame->tf_cs) == SEL_UPL ? "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 (CS_SECURE(frame->tf_cs) || (frame->tf_eflags & PSL_VM)) {
+ if ((ISPL(frame->tf_cs) == SEL_UPL) || (frame->tf_eflags & PSL_VM)) {
ss = frame->tf_ss & 0xffff;
esp = frame->tf_esp;
} else {
@@ -943,7 +943,7 @@ syscall(frame)
u_int code;
sticks = p->p_sticks;
- if (!CS_SECURE(frame.tf_cs))
+ if (ISPL(frame.tf_cs) != SEL_UPL)
panic("syscall");
p->p_md.md_regs = &frame;
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index 4e5f055..36981aa 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.50 1997/08/09 01:56:34 kato Exp $
+ * $Id: machdep.c,v 1.51 1997/08/18 11:29:57 kato Exp $
*/
#include "apm.h"
@@ -683,6 +683,7 @@ 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 6c6a7df..16200c2 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.25 1997/08/09 01:55:51 kato Exp $
+ * $Id: npx.c,v 1.26 1997/08/18 11:30:05 kato Exp $
*/
#include "npx.h"
@@ -560,7 +560,7 @@ npxintr(unit)
* Pass exception to process.
*/
frame = (struct intrframe *)&unit; /* XXX */
- if (CS_SECURE(frame->if_cs) || (frame->if_eflags & PSL_VM)) {
+ if ((ISPL(frame->if_cs) == SEL_UPL) || (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