summaryrefslogtreecommitdiff
path: root/lib/libarch/i386
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-03-19 23:15:57 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-03-19 23:15:57 +0000
commite46701f3ba417eb809e480d2383217567bd8a0d3 (patch)
tree6418b00c595e11941ebeb3d312e0136cfb1621b8 /lib/libarch/i386
parent169c29d1b708c51bbae3f546e0adfe0d433b5b7b (diff)
From NetBSD: merge of 960317
Diffstat (limited to 'lib/libarch/i386')
-rw-r--r--lib/libarch/i386/Makefile18
-rw-r--r--lib/libarch/i386/Makefile.inc12
-rw-r--r--lib/libarch/i386/i386_get_ioperm.243
-rw-r--r--lib/libarch/i386/i386_get_ioperm.c42
-rw-r--r--lib/libarch/i386/i386_iopl.243
-rw-r--r--lib/libarch/i386/i386_iopl.c42
-rw-r--r--lib/libarch/i386/i386_set_ioperm.c42
-rw-r--r--lib/libarch/i386/i386_vm86.2104
-rw-r--r--lib/libarch/i386/i386_vm86.c54
-rw-r--r--lib/libarch/i386/shlib_version2
10 files changed, 299 insertions, 103 deletions
diff --git a/lib/libarch/i386/Makefile b/lib/libarch/i386/Makefile
new file mode 100644
index 00000000000..1700bbcc81f
--- /dev/null
+++ b/lib/libarch/i386/Makefile
@@ -0,0 +1,18 @@
+# $OpenBSD: Makefile,v 1.1 1996/03/19 23:14:56 niklas Exp $
+# $NetBSD: Makefile,v 1.1 1996/02/21 02:45:47 jtk Exp $
+
+.PATH: ${LIBC}/i386
+
+SRCS+= i386_get_ldt.c i386_set_ldt.c \
+ i386_iopl.c i386_get_ioperm.c i386_set_ioperm.c \
+ i386_vm86.c
+
+MAN+= i386_get_ldt.2 \
+ i386_iopl.2 i386_get_ioperm.2 \
+ i386_vm86.2
+
+MLINKS+=i386_get_ldt.2 i386_set_ldt.2 \
+ i386_get_ioperm.2 i386_set_ioperm.2
+
+.include <bsd.lib.mk>
+
diff --git a/lib/libarch/i386/Makefile.inc b/lib/libarch/i386/Makefile.inc
deleted file mode 100644
index 9c967b8fbe1..00000000000
--- a/lib/libarch/i386/Makefile.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-# Makefile.inc,v 1.1 1993/09/03 19:04:23 jtc Exp
-
-.PATH: ${LIBC}/i386
-
-SRCS+= i386_get_ldt.c i386_set_ldt.c \
- i386_iopl.c i386_get_ioperm.c i386_set_ioperm.c
-
-MAN+= i386_get_ldt.2 \
- i386_iopl.2 i386_get_ioperm.2
-
-MLINKS+=i386_get_ldt.2 i386_set_ldt.2 \
- i386_get_ioperm.2 i386_set_ioperm.2
diff --git a/lib/libarch/i386/i386_get_ioperm.2 b/lib/libarch/i386/i386_get_ioperm.2
index aab8d7bdba4..87e2fb0cdb7 100644
--- a/lib/libarch/i386/i386_get_ioperm.2
+++ b/lib/libarch/i386/i386_get_ioperm.2
@@ -1,6 +1,12 @@
-.\" Copyright (c) 1980, 1991 Regents of the University of California.
+.\" $OpenBSD: i386_get_ioperm.2,v 1.3 1996/03/19 23:14:58 niklas Exp $
+.\" $NetBSD: i386_get_ioperm.2,v 1.3 1996/02/27 22:57:17 jtc Exp $
+.\"
+.\" 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:
@@ -11,26 +17,23 @@
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
+.\" This product includes software developed by the NetBSD
+.\" Foundation, Inc. and its contributors.
+.\" 4. Neither the name of The NetBSD Foundation nor the names of its
+.\" contributors may be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
.\"
-.\" from: @(#)fork.2 6.5 (Berkeley) 3/10/91
-.\" $NetBSD: i386_get_ioperm.2,v 1.2 1996/01/05 14:56:42 pk Exp $
+.\" 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 REGENTS 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.
.\"
.Dd October 14, 1995
.Dt I386_GET_IOPERM 2
diff --git a/lib/libarch/i386/i386_get_ioperm.c b/lib/libarch/i386/i386_get_ioperm.c
index b794b06dcbd..afba8bfedfd 100644
--- a/lib/libarch/i386/i386_get_ioperm.c
+++ b/lib/libarch/i386/i386_get_ioperm.c
@@ -1,8 +1,13 @@
-/* $NetBSD: i386_get_ioperm.c,v 1.1 1995/10/15 02:29:10 mycroft Exp $ */
+/* $OpenBSD: i386_get_ioperm.c,v 1.2 1996/03/19 23:14:59 niklas Exp $ */
+/* $NetBSD: i386_get_ioperm.c,v 1.2 1996/02/27 22:57:22 jtc Exp $ */
-/*
- * Copyright (c) 1995 Charles M. Hannum. All rights reserved.
- *
+/*-
+ * 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:
@@ -13,20 +18,23 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Charles M. Hannum.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ * 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 REGENTS 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.
*/
#include <sys/cdefs.h>
diff --git a/lib/libarch/i386/i386_iopl.2 b/lib/libarch/i386/i386_iopl.2
index 85ccc1d2ef6..b23a5e386d0 100644
--- a/lib/libarch/i386/i386_iopl.2
+++ b/lib/libarch/i386/i386_iopl.2
@@ -1,6 +1,12 @@
-.\" Copyright (c) 1980, 1991 Regents of the University of California.
+.\" $OpenBSD: i386_iopl.2,v 1.3 1996/03/19 23:14:59 niklas Exp $
+.\" $NetBSD: i386_iopl.2,v 1.3 1996/02/27 22:57:25 jtc Exp $
+.\"
+.\" 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:
@@ -11,26 +17,23 @@
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
+.\" This product includes software developed by the NetBSD
+.\" Foundation, Inc. and its contributors.
+.\" 4. Neither the name of The NetBSD Foundation nor the names of its
+.\" contributors may be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
.\"
-.\" from: @(#)fork.2 6.5 (Berkeley) 3/10/91
-.\" $NetBSD: i386_iopl.2,v 1.2 1996/01/05 14:56:45 pk Exp $
+.\" 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 REGENTS 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.
.\"
.Dd October 14, 1995
.Dt I386_IOPL 2
diff --git a/lib/libarch/i386/i386_iopl.c b/lib/libarch/i386/i386_iopl.c
index 22be4a9a328..1883881a2ca 100644
--- a/lib/libarch/i386/i386_iopl.c
+++ b/lib/libarch/i386/i386_iopl.c
@@ -1,8 +1,13 @@
-/* $NetBSD: i386_iopl.c,v 1.1 1995/10/15 02:29:12 mycroft Exp $ */
+/* $OpenBSD: i386_iopl.c,v 1.2 1996/03/19 23:15:00 niklas Exp $ */
+/* $NetBSD: i386_iopl.c,v 1.2 1996/02/27 22:57:29 jtc Exp $ */
-/*
- * Copyright (c) 1995 Charles M. Hannum. All rights reserved.
- *
+/*-
+ * 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:
@@ -13,20 +18,23 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Charles M. Hannum.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ * 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 REGENTS 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.
*/
#include <sys/cdefs.h>
diff --git a/lib/libarch/i386/i386_set_ioperm.c b/lib/libarch/i386/i386_set_ioperm.c
index d1976f4a078..6a814e72ae0 100644
--- a/lib/libarch/i386/i386_set_ioperm.c
+++ b/lib/libarch/i386/i386_set_ioperm.c
@@ -1,8 +1,13 @@
-/* $NetBSD: i386_set_ioperm.c,v 1.1 1995/10/15 02:29:13 mycroft Exp $ */
+/* $OpenBSD: i386_set_ioperm.c,v 1.2 1996/03/19 23:15:01 niklas Exp $ */
+/* $NetBSD: i386_set_ioperm.c,v 1.2 1996/02/27 22:57:31 jtc Exp $ */
-/*
- * Copyright (c) 1995 Charles M. Hannum. All rights reserved.
- *
+/*-
+ * 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:
@@ -13,20 +18,23 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Charles M. Hannum.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ * 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 REGENTS 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.
*/
#include <sys/cdefs.h>
diff --git a/lib/libarch/i386/i386_vm86.2 b/lib/libarch/i386/i386_vm86.2
new file mode 100644
index 00000000000..52db5bbeb90
--- /dev/null
+++ b/lib/libarch/i386/i386_vm86.2
@@ -0,0 +1,104 @@
+.\" $OpenBSD: i386_vm86.2,v 1.1 1996/03/19 23:15:02 niklas Exp $
+.\" $NetBSD: i386_vm86.2,v 1.1 1996/02/21 00:21:52 jtk Exp $
+.\"
+.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by John Kohl.
+.\"
+.\" 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.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the NetBSD
+.\" Foundation, Inc. and its contributors.
+.\" 4. Neither the name of The NetBSD Foundation nor the names of its
+.\" contributors may be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
+.\"
+.\" 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 REGENTS 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.
+.\"
+.\" from: @(#)fork.2 6.5 (Berkeley) 3/10/91
+.\"
+.Dd February 20, 1996
+.Dt I386_VM86 2
+.Os NetBSD
+.Sh NAME
+.Nm i386_vm86
+.Nd set virtual 8086 processor registers and mode
+.Sh SYNOPSIS
+.Fd #include <sys/types.h>
+.Fd #include <signal.h>
+.Fd #include <machine/segments.h>
+.Fd #include <machine/sysarch.h>
+.Fd #include <machine/vm86.h>
+.Ft int
+.Fn i386_vm86 "struct vm86_struct *vmcp"
+.Sh DESCRIPTION
+.Fn i386_vm86
+will set the process into virtual 8086 mode using the registers and
+selectors specified by the context pointed to by
+.Ar vmcp .
+The processor registers are set from
+.Ar vmcp->substr.regs ,
+and the emulated processor type from
+.Ar vmcp->substr.ss_cpu_type .
+.Pp
+The kernel keeps a pointer to the context, and uses the tables stored at
+.Ar vmcp->int_byuser
+and
+.Ar vmcp->int21_byuser
+for fast virtual interrupt handling. If the
+.Ar n th
+bit is clear in the first of
+these arrays, then the kernel may directly emulate the real-mode x86 INT
+.Ar n
+instruction handling. If the
+.Ar n
+th bit is set, then the process is
+delivered a signal when an INT instruction is executed.
+.Pp
+Since MS-DOS puts many DOS functions onto interrupt 21, it is handled
+specially: the
+.Ar k
+th bit in the
+.Ar vmcp->int21_byuser
+array is checked when INT
+.Ar 21
+is requested and the
+.Ar ah
+register is
+.Ar k .
+.Sh RETURN VALUES
+This routine does not normally return: 32-bit mode will be restored by
+the delivery of a signal to the process. In case of an error in setting
+the VM86 mode, a value of -1 is returned and the global variable
+.Va errno
+is set to indicate the error.
+.Sh ERRORS
+.Fn i386_vm86
+will fail if:
+.Bl -tag -width [EINVAL]
+.It Bq Er EFAULT
+The state at
+.Ar vmcp
+was not readable to the user process.
+.Sh REFERENCES
+i386 Microprocessor Programmer's Reference Manual, Intel
diff --git a/lib/libarch/i386/i386_vm86.c b/lib/libarch/i386/i386_vm86.c
new file mode 100644
index 00000000000..1bff69f3d29
--- /dev/null
+++ b/lib/libarch/i386/i386_vm86.c
@@ -0,0 +1,54 @@
+/* $OpenBSD: i386_vm86.c,v 1.1 1996/03/19 23:15:03 niklas Exp $ */
+/* $NetBSD: i386_vm86.c,v 1.1 1996/02/21 00:21:56 jtk Exp $ */
+
+/*-
+ * Copyright (c) 1996 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by John Kohl.
+ *
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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 REGENTS 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.
+ */
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <machine/signal.h>
+#include <machine/segments.h>
+#include <machine/sysarch.h>
+#include <machine/vm86.h>
+
+int
+i386_vm86(vmcp)
+ register struct vm86_struct *vmcp;
+{
+
+ return sysarch(I386_VM86, (char *)vmcp);
+}
+
diff --git a/lib/libarch/i386/shlib_version b/lib/libarch/i386/shlib_version
new file mode 100644
index 00000000000..dea2b62cafc
--- /dev/null
+++ b/lib/libarch/i386/shlib_version
@@ -0,0 +1,2 @@
+major=0
+minor=2