1 .\" Copyright (c) 1998 Jonathan Lemon
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd control vm86-related functions
40 .Fn i386_vm86 "int function" "void *data"
45 is used to call various vm86 related functions.
49 can be one of the following values:
50 .Bl -tag -offset indent -width VM86_SET_VME
52 This will initialize the kernel's vm86 parameter area for the
53 process, and permit the process to make vm86 calls.
57 points to the following structure:
59 struct vm86_init_args {
69 is used to turn on debugging code.
73 controls the type of CPU being emulated, and is currently unimplemented.
77 is a bitmap which determines whether vm86 interrupts should be handled
78 in vm86 mode, or reflected back to the process.
81 bit is set, the interrupt will be reflected to the process, otherwise
82 it will be dispatched by the vm86 interrupt table.
84 This allows calls to be made to vm86 interrupt handlers by the process.
85 It effectively simulates an INT instruction.
87 should point to the following structure:
89 struct vm86_intcall_args {
96 specifies the operand of INT for the simulated call.
97 A value of 0x10, for example, would often be used to call into the VGA BIOS.
99 is used to initialize CPU registers according to the calling convention for
100 the interrupt handler.
102 This is used to retrieve the current state of the Pentium(r) processor's
103 VME (Virtual-8086 Mode Extensions) flag, which is bit 0 of CR4.
105 should be initialized to point to the following:
107 struct vm86_vme_args {
108 int state; /* status */
113 will contain the state of the VME flag on return.
114 .\" .It Dv VM86_SET_VME
117 vm86 mode is entered by calling
119 with the correct machine context for vm86, and with the
122 Control returns to the process upon delivery of a signal.
132 The kernel does not have vm86 support, or an invalid function was specified.
134 There is not enough memory to initialize the kernel data structures.
138 This man page was written by
141 .An Bruce M Simpson .