diff options
author | 1996-03-19 23:14:49 +0000 | |
---|---|---|
committer | 1996-03-19 23:14:49 +0000 | |
commit | 3fbbad10a5e74a7aaa576a50d86494daddc162b3 (patch) | |
tree | bec35e877279413f30916fe46b8c9a5921b002b5 /lib/libarch | |
parent | Merging w/ NetBSD 021796. (diff) | |
download | wireguard-openbsd-3fbbad10a5e74a7aaa576a50d86494daddc162b3.tar.xz wireguard-openbsd-3fbbad10a5e74a7aaa576a50d86494daddc162b3.zip |
From NetBSD: merge of 960317
Diffstat (limited to 'lib/libarch')
-rw-r--r-- | lib/libarch/Makefile | 35 | ||||
-rw-r--r-- | lib/libarch/Makefile.inc | 16 | ||||
-rw-r--r-- | lib/libarch/alpha/Makefile | 8 | ||||
-rw-r--r-- | lib/libarch/alpha/Makefile.inc | 5 | ||||
-rw-r--r-- | lib/libarch/i386/Makefile | 18 | ||||
-rw-r--r-- | lib/libarch/i386/Makefile.inc | 12 | ||||
-rw-r--r-- | lib/libarch/i386/i386_get_ioperm.2 | 43 | ||||
-rw-r--r-- | lib/libarch/i386/i386_get_ioperm.c | 42 | ||||
-rw-r--r-- | lib/libarch/i386/i386_iopl.2 | 43 | ||||
-rw-r--r-- | lib/libarch/i386/i386_iopl.c | 42 | ||||
-rw-r--r-- | lib/libarch/i386/i386_set_ioperm.c | 42 | ||||
-rw-r--r-- | lib/libarch/i386/i386_vm86.2 | 104 | ||||
-rw-r--r-- | lib/libarch/i386/i386_vm86.c | 54 | ||||
-rw-r--r-- | lib/libarch/i386/shlib_version (renamed from lib/libarch/shlib_version) | 2 |
14 files changed, 327 insertions, 139 deletions
diff --git a/lib/libarch/Makefile b/lib/libarch/Makefile index 8f9d247ab1d..86ebcf7024a 100644 --- a/lib/libarch/Makefile +++ b/lib/libarch/Makefile @@ -1,33 +1,8 @@ -# $Id: Makefile,v 1.1.1.1 1995/10/18 08:41:19 deraadt Exp $ +# $OpenBSD: Makefile,v 1.2 1996/03/19 23:14:51 niklas Exp $ +# $NetBSD: Makefile,v 1.8 1996/02/21 02:43:52 jtk Exp $ -.if exists(${.CURDIR}/${MACHINE}) -.PATH: ${.CURDIR}/${MACHINE} -.include "${.CURDIR}/${MACHINE}/Makefile.inc" -AINC+= -I${.CURDIR}/${MACHINE} +.if exists(${MACHINE}) +SUBDIR+= ${MACHINE} .endif -.if exists(${.CURDIR}/${MACHINE_ARCH}) && (${MACHINE} != ${MACHINE_ARCH}) -.PATH: ${.CURDIR}/${MACHINE_ARCH} -.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc" -AINC+= -I${.CURDIR}/${MACHINE_ARCH} -.endif - -OBJS+= ${ASM} -POBJS+= ${ASM:.o=.po} -CLEANFILES+= ${ASM} ${POBJS} - - -.if exists(${.CURDIR}/${MACHINE}) || exists(${.CURDIR}/${MACHINE_ARCH}) -# then there's a lib for this machine/machine architecture -LIB= ${MACHINE} -.include <bsd.lib.mk> -.else -# there's NOT, so get the targets right -all: -clean: -cleandir: -depend: -install: -lint: -obj: -.endif +.include <bsd.subdir.mk> diff --git a/lib/libarch/Makefile.inc b/lib/libarch/Makefile.inc new file mode 100644 index 00000000000..51713b2ec15 --- /dev/null +++ b/lib/libarch/Makefile.inc @@ -0,0 +1,16 @@ +# $OpenBSD: Makefile.inc,v 1.1 1996/03/19 23:14:52 niklas Exp $ +# $NetBSD: Makefile.inc,v 1.1 1996/02/21 02:43:57 jtk Exp $ +# +# This Makefile includes boiler-plate stuff included by each subdir's Makefile. + +.if exists(${.CURDIR}/../${MACHINE_ARCH}) && (${MACHINE} != ${MACHINE_ARCH}) +.PATH: ${.CURDIR}/../${MACHINE_ARCH} +.include "${.CURDIR}/../${MACHINE_ARCH}/Makefile.inc" +AINC+= -I${.CURDIR}/../${MACHINE_ARCH} +.endif + +OBJS+= ${ASM} +POBJS+= ${ASM:.o=.po} +CLEANFILES+= ${ASM} ${POBJS} + +LIB= ${MACHINE} diff --git a/lib/libarch/alpha/Makefile b/lib/libarch/alpha/Makefile new file mode 100644 index 00000000000..d2822fd6bfd --- /dev/null +++ b/lib/libarch/alpha/Makefile @@ -0,0 +1,8 @@ +# $OpenBSD: Makefile,v 1.1 1996/03/19 23:14:54 niklas Exp $ +# $NetBSD: Makefile,v 1.1 1996/02/21 02:45:40 jtk Exp $ + +#.PATH: ${LIBC}/i386 + +SRCS+= alpha_mmclock_gettime.c alpha_mmclock_init.c gettimeofday.c + +.include <bsd.lib.mk> diff --git a/lib/libarch/alpha/Makefile.inc b/lib/libarch/alpha/Makefile.inc deleted file mode 100644 index c6d059d58a4..00000000000 --- a/lib/libarch/alpha/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# Makefile.inc,v 1.1 1993/09/03 19:04:23 jtc Exp - -#.PATH: ${LIBC}/i386 - -SRCS+= alpha_mmclock_gettime.c alpha_mmclock_init.c gettimeofday.c 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/shlib_version b/lib/libarch/i386/shlib_version index 3d7c908e43d..dea2b62cafc 100644 --- a/lib/libarch/shlib_version +++ b/lib/libarch/i386/shlib_version @@ -1,2 +1,2 @@ major=0 -minor=1 +minor=2 |