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 */ 2637904Sjlemon 2792986Sobrien#include <sys/cdefs.h> 2892986Sobrien__FBSDID("$FreeBSD$"); 2937904Sjlemon 3037904Sjlemon#include <machine/sysarch.h> 3137904Sjlemon 3237904Sjlemonint 3337904Sjlemoni386_vm86(int fcn, void *data) 3437904Sjlemon{ 3550817Sluoqi struct i386_vm86_args p; 3637904Sjlemon 3737904Sjlemon p.sub_op = fcn; 3850817Sluoqi p.sub_args = (char *)data; 3937904Sjlemon 40124296Snectar return (sysarch(I386_VM86, &p)); 4137904Sjlemon} 42