I386_VM86(2) | System Calls Manual | I386_VM86(2) |
i386_vm86
—
control vm86-related functions
Standard C Library (libc, -lc)
#include
<sys/types.h>
#include <machine/sysarch.h>
#include <machine/vm86.h>
int
i386_vm86
(int
function, void
*data);
The
i386_vm86
()
system call is used to call various vm86 related functions. The
function argument can be one of the following
values:
VM86_INIT
struct vm86_init_args { int debug; int cpu_type; u_char int_map[32]; };
The debug argument is used to turn on debugging code. The cpu_type argument controls the type of CPU being emulated, and is currently unimplemented. The int_map argument is a bitmap which determines whether vm86 interrupts should be handled in vm86 mode, or reflected back to the process. If the Nth bit is set, the interrupt will be reflected to the process, otherwise it will be dispatched by the vm86 interrupt table.
VM86_INTCALL
struct vm86_intcall_args { int intnum; struct vm86frame vmf; };
intnum specifies the operand of INT for the simulated call. A value of 0x10, for example, would often be used to call into the VGA BIOS. vmf is used to initialize CPU registers according to the calling convention for the interrupt handler.
VM86_GET_VME
struct vm86_vme_args { int state; /* status */ };
state will contain the state of the VME flag on return.
vm86 mode is entered by calling sigreturn(2)
with the correct machine context for vm86, and with the
PSL_VM
bit set. Control returns to the process upon
delivery of a signal.
The i386_vm86
() function returns the
value 0 if successful; otherwise the value -1 is returned and
the global variable errno is set to indicate the
error.
The i386_vm86
() system call will fail
if:
This man page was written by Jonathan Lemon, and updated by Bruce M Simpson.
July 27, 1998 | Debian |