Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Remove vm86.



details:   https://anonhg.NetBSD.org/src/rev/d06d79ecf15e
branches:  trunk
changeset: 355739:d06d79ecf15e
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Aug 12 07:35:08 2017 +0000

description:
Remove vm86.

Pass 4.

diffstat:

 distrib/sets/lists/comp/md.amd64 |    4 +-
 distrib/sets/lists/comp/md.i386  |    4 +-
 sys/arch/i386/include/Makefile   |    4 +-
 sys/arch/i386/include/mcontext.h |   13 +--
 sys/arch/i386/include/segments.h |   11 +--
 sys/arch/i386/include/vm86.h     |  167 ---------------------------------------
 6 files changed, 8 insertions(+), 195 deletions(-)

diffs (279 lines):

diff -r 6e2b53a039e1 -r d06d79ecf15e distrib/sets/lists/comp/md.amd64
--- a/distrib/sets/lists/comp/md.amd64  Sat Aug 12 07:21:57 2017 +0000
+++ b/distrib/sets/lists/comp/md.amd64  Sat Aug 12 07:35:08 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.250 2017/08/10 13:39:08 maxv Exp $
+# $NetBSD: md.amd64,v 1.251 2017/08/12 07:35:08 maxv Exp $
 
 ./usr/include/amd64                            comp-c-include
 ./usr/include/amd64/ansi.h                     comp-c-include
@@ -533,7 +533,7 @@
 ./usr/include/i386/tss.h                       comp-c-include
 ./usr/include/i386/types.h                     comp-c-include
 ./usr/include/i386/varargs.h                   comp-obsolete           obsolete
-./usr/include/i386/vm86.h                      comp-c-include
+./usr/include/i386/vm86.h                      comp-obsolete           obsolete
 ./usr/include/i386/vmparam.h                   comp-c-include
 ./usr/include/i386/wchar_limits.h              comp-c-include
 ./usr/include/ieeefp.h                         comp-c-include
diff -r 6e2b53a039e1 -r d06d79ecf15e distrib/sets/lists/comp/md.i386
--- a/distrib/sets/lists/comp/md.i386   Sat Aug 12 07:21:57 2017 +0000
+++ b/distrib/sets/lists/comp/md.i386   Sat Aug 12 07:35:08 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.173 2017/08/09 18:58:51 maxv Exp $
+# $NetBSD: md.i386,v 1.174 2017/08/12 07:35:08 maxv Exp $
 ./usr/include/clang-3.4/__wmmintrin_aes.h      comp-obsolete           obsolete
 ./usr/include/clang-3.4/__wmmintrin_pclmul.h   comp-obsolete           obsolete
 ./usr/include/clang-3.4/ammintrin.h            comp-obsolete           obsolete
@@ -465,7 +465,7 @@
 ./usr/include/i386/tss.h                       comp-c-include
 ./usr/include/i386/types.h                     comp-c-include
 ./usr/include/i386/varargs.h                   comp-obsolete           obsolete
-./usr/include/i386/vm86.h                      comp-c-include
+./usr/include/i386/vm86.h                      comp-obsolete           obsolete
 ./usr/include/i386/vmparam.h                   comp-c-include
 ./usr/include/i386/wchar_limits.h              comp-c-include
 ./usr/include/ieeefp.h                         comp-c-include
diff -r 6e2b53a039e1 -r d06d79ecf15e sys/arch/i386/include/Makefile
--- a/sys/arch/i386/include/Makefile    Sat Aug 12 07:21:57 2017 +0000
+++ b/sys/arch/i386/include/Makefile    Sat Aug 12 07:35:08 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.47 2017/08/09 18:58:51 maxv Exp $
+#      $NetBSD: Makefile,v 1.48 2017/08/12 07:35:08 maxv Exp $
 
 INCSDIR= /usr/include/i386
 
@@ -22,7 +22,7 @@
        segments.h setjmp.h signal.h sljit_machdep.h specialreg.h spkr.h \
        sysarch.h \
        trap.h tss.h types.h \
-       vm86.h vmparam.h \
+       vmparam.h \
        wchar_limits.h
 
 .include <bsd.kinc.mk>
diff -r 6e2b53a039e1 -r d06d79ecf15e sys/arch/i386/include/mcontext.h
--- a/sys/arch/i386/include/mcontext.h  Sat Aug 12 07:21:57 2017 +0000
+++ b/sys/arch/i386/include/mcontext.h  Sat Aug 12 07:35:08 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mcontext.h,v 1.12 2014/02/15 22:20:42 dsl Exp $        */
+/*     $NetBSD: mcontext.h,v 1.13 2017/08/12 07:35:08 maxv Exp $       */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -102,17 +102,6 @@
 
 #define _UC_UCONTEXT_ALIGN     (~0xf)
 
-#ifdef _KERNEL_OPT
-#include "opt_vm86.h"
-#ifdef VM86
-/*#include <machine/psl.h>*/
-#define PSL_VM 0x00020000
-#define _UC_MACHINE_SP(uc) ((uc)->uc_mcontext.__gregs[_REG_UESP] + \
-       ((uc)->uc_mcontext.__gregs[_REG_EFL] & PSL_VM ? \
-        ((uc)->uc_mcontext.__gregs[_REG_SS] << 4) : 0))
-#endif /* VM86 */
-#endif /* _KERNEL_OPT */
-
 #ifndef _UC_MACHINE_SP
 #define _UC_MACHINE_SP(uc)     ((uc)->uc_mcontext.__gregs[_REG_UESP])
 #endif
diff -r 6e2b53a039e1 -r d06d79ecf15e sys/arch/i386/include/segments.h
--- a/sys/arch/i386/include/segments.h  Sat Aug 12 07:21:57 2017 +0000
+++ b/sys/arch/i386/include/segments.h  Sat Aug 12 07:35:08 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: segments.h,v 1.60 2017/07/02 11:16:50 maxv Exp $       */
+/*     $NetBSD: segments.h,v 1.61 2017/08/12 07:35:08 maxv Exp $       */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -118,17 +118,8 @@
 
 #define LSEL(s,r)      (((s) << 3) | r | SEL_LDT)      /* a local selector */
 
-#if defined(_KERNEL_OPT)
-#include "opt_vm86.h"
-#endif
-
-#ifdef VM86
-#define USERMODE(c, f)         (ISPL(c) == SEL_UPL || ((f) & PSL_VM) != 0)
-#define KERNELMODE(c, f)       (ISPL(c) == SEL_KPL && ((f) & PSL_VM) == 0)
-#else
 #define USERMODE(c, f)         (ISPL(c) == SEL_UPL)
 #define KERNELMODE(c, f)       (ISPL(c) == SEL_KPL)
-#endif
 
 #ifndef _LOCORE
 
diff -r 6e2b53a039e1 -r d06d79ecf15e sys/arch/i386/include/vm86.h
--- a/sys/arch/i386/include/vm86.h      Sat Aug 12 07:21:57 2017 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/*     $NetBSD: vm86.h,v 1.19 2009/11/21 03:11:01 rmind Exp $  */
-
-#undef VM86_USE_VIF
-
-/*-
- * Copyright (c) 1996 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by John T. Kohl and Charles M. Hannum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#define SETFLAGS(targ, new, newmask) (targ) = ((targ) & ~(newmask)) | ((new) & (newmask))
-
-#define VM86_TYPE(x)   ((x) & 0xff)
-#define VM86_ARG(x)    (((x) & 0xff00) >> 8)
-#define        VM86_MAKEVAL(type,arg) ((type) | (((arg) & 0xff) << 8))
-#define                VM86_STI        0
-#define                VM86_INTx       1
-#define                VM86_SIGNAL     2
-#define                VM86_UNKNOWN    3
-
-#define        VM86_REALFLAGS  (~PSL_USERSTATIC)
-#define        VM86_VIRTFLAGS  (PSL_USERSTATIC & ~(PSL_MBO | PSL_MBZ))
-
-struct vm86_kern {                     /* kernel uses this stuff */
-       __gregset_t regs;
-       unsigned long ss_cpu_type;
-};
-#define cpu_type substr.ss_cpu_type
-
-/*
- * Kernel keeps copy of user-mode address of this, but doesn't copy it in.
- */
-struct vm86_struct {
-       struct vm86_kern substr;
-       unsigned long screen_bitmap;    /* not used/supported (yet) */
-       unsigned long flags;            /* not used/supported (yet) */
-       unsigned char int_byuser[32];   /* 256 bits each: pass control to user */
-       unsigned char int21_byuser[32]; /* otherwise, handle directly */
-};
-
-#define VCPU_086               0
-#define VCPU_186               1
-#define VCPU_286               2
-#define VCPU_386               3
-#define VCPU_486               4
-#define VCPU_586               5
-
-#ifdef _KERNEL
-int x86_vm86(struct lwp *, char *, register_t *);
-int compat_16_x86_vm86(struct lwp *, char *, register_t *);
-void vm86_gpfault(struct lwp *, int);
-void vm86_return(struct lwp *, int);
-static __inline void clr_vif(struct lwp *);
-static __inline void set_vif(struct lwp *);
-static __inline void set_vflags(struct lwp *, int);
-static __inline int get_vflags(struct lwp *);
-static __inline void set_vflags_short(struct lwp *, int);
-static __inline int get_vflags_short(struct lwp *);
-
-static __inline void
-clr_vif(struct lwp *l)
-{
-       struct pcb *pcb = lwp_getpcb(l);
-
-#ifndef VM86_USE_VIF
-       pcb->vm86_eflags &= ~PSL_I;
-#else
-       pcb->vm86_eflags &= ~PSL_VIF;
-#endif
-}
-
-static __inline void
-set_vif(struct lwp *l)
-{
-       struct pcb *pcb = lwp_getpcb(l);
-
-#ifndef VM86_USE_VIF
-       pcb->vm86_eflags |= PSL_I;
-       if ((pcb->vm86_eflags & (PSL_I|PSL_VIP)) == (PSL_I|PSL_VIP))
-#else
-       pcb->vm86_eflags |= PSL_VIF;
-       if ((pcb->vm86_eflags & (PSL_VIF|PSL_VIP)) == (PSL_VIF|PSL_VIP))
-#endif
-               vm86_return(l, VM86_STI);
-}
-
-static __inline void
-set_vflags(struct lwp *l, int flags)
-{
-       struct trapframe *tf = l->l_md.md_regs;
-       struct pcb *pcb = lwp_getpcb(l);
-
-       flags &= ~pcb->vm86_flagmask;
-       SETFLAGS(pcb->vm86_eflags, flags, VM86_VIRTFLAGS);
-       SETFLAGS(tf->tf_eflags, flags, VM86_REALFLAGS);
-#ifndef VM86_USE_VIF
-       if ((pcb->vm86_eflags & (PSL_I|PSL_VIP)) == (PSL_I|PSL_VIP))
-#else
-       if ((pcb->vm86_eflags & (PSL_VIF|PSL_VIP)) == (PSL_VIF|PSL_VIP))
-#endif
-               vm86_return(l, VM86_STI);
-}
-
-static __inline int
-get_vflags(struct lwp *l)
-{
-       struct trapframe *tf = l->l_md.md_regs;
-       struct pcb *pcb = lwp_getpcb(l);
-       int flags = PSL_MBO;
-
-       SETFLAGS(flags, pcb->vm86_eflags, VM86_VIRTFLAGS);
-       SETFLAGS(flags, tf->tf_eflags, VM86_REALFLAGS);
-       return (flags);
-}
-
-static __inline void
-set_vflags_short(struct lwp *l, int flags)
-{
-       struct trapframe *tf = l->l_md.md_regs;
-       struct pcb *pcb = lwp_getpcb(l);
-
-       flags &= ~pcb->vm86_flagmask;
-       SETFLAGS(pcb->vm86_eflags, flags, VM86_VIRTFLAGS & 0xffff);
-       SETFLAGS(tf->tf_eflags, flags, VM86_REALFLAGS & 0xffff);
-#ifndef VM86_USE_VIF
-       if ((pcb->vm86_eflags & (PSL_I|PSL_VIP)) == (PSL_I|PSL_VIP))
-               vm86_return(l, VM86_STI);
-#endif
-}
-
-static __inline int
-get_vflags_short(struct lwp *l)
-{
-       struct trapframe *tf = l->l_md.md_regs;
-       struct pcb *pcb = lwp_getpcb(l);
-       int flags = PSL_MBO;
-
-       SETFLAGS(flags, pcb->vm86_eflags, VM86_VIRTFLAGS & 0xffff);
-       SETFLAGS(flags, tf->tf_eflags, VM86_REALFLAGS & 0xffff);
-       return (flags);
-}
-#else
-int i386_vm86(struct vm86_struct *vmcp);
-#endif



Home | Main Index | Thread Index | Old Index