summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include/vm86.h
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-04-21 22:33:19 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-04-21 22:33:19 +0000
commit67d88b0a9910a68bb666b448d2dac29cb4d3d8c2 (patch)
tree967b89f6e07398a22bd8c76d30179b648776542d /sys/arch/i386/include/vm86.h
parentba95d3c1d69cdb251d15a12ebf70f50b0ea2019b (diff)
partial sync with netbsd 960418, more to come
Diffstat (limited to 'sys/arch/i386/include/vm86.h')
-rw-r--r--sys/arch/i386/include/vm86.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/arch/i386/include/vm86.h b/sys/arch/i386/include/vm86.h
index 67a584be27e..6adc36548a0 100644
--- a/sys/arch/i386/include/vm86.h
+++ b/sys/arch/i386/include/vm86.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: vm86.h,v 1.3 1996/04/18 19:21:42 niklas Exp $ */
-/* $NetBSD: vm86.h,v 1.4 1996/04/11 10:07:25 mycroft Exp $ */
+/* $OpenBSD: vm86.h,v 1.4 1996/04/21 22:16:48 deraadt Exp $ */
+/* $NetBSD: vm86.h,v 1.5 1996/04/12 05:57:45 mycroft Exp $ */
#define VM86_USE_VIF
@@ -52,6 +52,9 @@
#define VM86_SETDIRECT (~PSL_USERSTATIC)
#define VM86_GETDIRECT (VM86_SETDIRECT|PSL_MBO|PSL_MBZ)
+#define VM86_SETDIRECT (~PSL_USERSTATIC)
+#define VM86_GETDIRECT (VM86_SETDIRECT|PSL_MBO|PSL_MBZ)
+
struct vm86_regs {
struct sigcontext vmsc;
};
@@ -124,7 +127,8 @@ set_vflags(p, flags)
struct trapframe *tf = p->p_md.md_regs;
struct pcb *pcb = &p->p_addr->u_pcb;
- SETFLAGS(pcb->vm86_eflags, flags, pcb->vm86_flagmask | ~VM86_GETDIRECT);
+ flags &= ~pcb->vm86_flagmask;
+ SETFLAGS(pcb->vm86_eflags, flags, ~VM86_GETDIRECT);
SETFLAGS(tf->tf_eflags, flags, VM86_SETDIRECT);
#ifndef VM86_USE_VIF
if ((pcb->vm86_eflags & (PSL_I|PSL_VIP)) == (PSL_I|PSL_VIP))
@@ -142,7 +146,7 @@ get_vflags(p)
struct pcb *pcb = &p->p_addr->u_pcb;
int flags = 0;
- SETFLAGS(flags, pcb->vm86_eflags, pcb->vm86_flagmask | ~VM86_GETDIRECT);
+ SETFLAGS(flags, pcb->vm86_eflags, ~VM86_GETDIRECT);
SETFLAGS(flags, tf->tf_eflags, VM86_GETDIRECT);
return (flags);
}
@@ -155,7 +159,8 @@ set_vflags_short(p, flags)
struct trapframe *tf = p->p_md.md_regs;
struct pcb *pcb = &p->p_addr->u_pcb;
- SETFLAGS(pcb->vm86_eflags, flags, (pcb->vm86_flagmask | ~VM86_GETDIRECT) & 0xffff);
+ flags &= ~pcb->vm86_flagmask;
+ SETFLAGS(pcb->vm86_eflags, flags, ~VM86_GETDIRECT & 0xffff);
SETFLAGS(tf->tf_eflags, flags, VM86_SETDIRECT & 0xffff);
#ifndef VM86_USE_VIF
if ((pcb->vm86_eflags & (PSL_I|PSL_VIP)) == (PSL_I|PSL_VIP))
@@ -171,7 +176,7 @@ get_vflags_short(p)
struct pcb *pcb = &p->p_addr->u_pcb;
int flags = 0;
- SETFLAGS(flags, pcb->vm86_eflags, (pcb->vm86_flagmask | ~VM86_GETDIRECT) & 0xffff);
+ SETFLAGS(flags, pcb->vm86_eflags, ~VM86_GETDIRECT & 0xffff);
SETFLAGS(flags, tf->tf_eflags, VM86_GETDIRECT & 0xffff);
return (flags);
}