i386_vm86.c revision 50817
137904Sjlemon/*-
237904Sjlemon * Copyright (c) 1998 Jonathan Lemon
337904Sjlemon * All rights reserved.
437904Sjlemon *
537904Sjlemon * Redistribution and use in source and binary forms, with or without
637904Sjlemon * modification, are permitted provided that the following conditions
737904Sjlemon * are met:
837904Sjlemon * 1. Redistributions of source code must retain the above copyright
937904Sjlemon *    notice, this list of conditions and the following disclaimer.
1037904Sjlemon * 2. Redistributions in binary form must reproduce the above copyright
1137904Sjlemon *    notice, this list of conditions and the following disclaimer in the
1237904Sjlemon *    documentation and/or other materials provided with the distribution.
1337904Sjlemon *
1437904Sjlemon * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1537904Sjlemon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1637904Sjlemon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1737904Sjlemon * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1837904Sjlemon * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1937904Sjlemon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2037904Sjlemon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2137904Sjlemon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2237904Sjlemon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2337904Sjlemon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2437904Sjlemon * SUCH DAMAGE.
2537904Sjlemon *
2650476Speter * $FreeBSD: head/lib/libc/i386/sys/i386_vm86.c 50817 1999-09-02 21:03:32Z luoqi $
2737904Sjlemon */
2837904Sjlemon
2937904Sjlemon#if defined(LIBC_RCS) && !defined(lint)
3050476Speterstatic const char rcsid[] = "$FreeBSD: head/lib/libc/i386/sys/i386_vm86.c 50817 1999-09-02 21:03:32Z luoqi $";
3137904Sjlemon#endif /* LIBC_RCS and not lint */
3237904Sjlemon
3337904Sjlemon#include <machine/sysarch.h>
3437904Sjlemon
3537904Sjlemonint
3637904Sjlemoni386_vm86(int fcn, void *data)
3737904Sjlemon{
3850817Sluoqi	struct i386_vm86_args p;
3937904Sjlemon
4037904Sjlemon	p.sub_op = fcn;
4150817Sluoqi	p.sub_args = (char *)data;
4237904Sjlemon
4337904Sjlemon	return (sysarch(I386_VM86, (void *)&p));
4437904Sjlemon}
45