table of contents
I386_VM86(2) | System Calls Manual | I386_VM86(2) |
NAME¶
i386_vm86 — control vm86-related functionsLIBRARY¶
Standard C Library (libc, -lc)SYNOPSIS¶
#include <sys/types.h>#include <machine/sysarch.h>
#include <machine/vm86.h> int
i386_vm86(int function, void *data);
DESCRIPTION¶
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
- This will initialize the kernel's vm86 parameter area for
the process, and permit the process to make vm86 calls. The
data argument points to the following structure:
struct vm86_init_args { int debug; int cpu_type; u_char int_map[32]; };
VM86_INTCALL
- This allows calls to be made to vm86 interrupt handlers by
the process. It effectively simulates an INT instruction.
data should point to the following structure:
struct vm86_intcall_args { int intnum; struct vm86frame vmf; };
VM86_GET_VME
- This is used to retrieve the current state of the
Pentium(r) processor's VME (Virtual-8086 Mode Extensions) flag, which is
bit 0 of CR4. data should be initialized to point to
the following:
struct vm86_vme_args { int state; /* status */ };
PSL_VM
bit set.
Control returns to the process upon delivery of a signal.
RETURN VALUES¶
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.ERRORS¶
The i386_vm86() system call will fail if:- [
EINVAL
] - The kernel does not have vm86 support, or an invalid function was specified.
- [
ENOMEM
] - There is not enough memory to initialize the kernel data structures.
AUTHORS¶
This man page was written by Jonathan Lemon, and updated by Bruce M Simpson.July 27, 1998 | Debian |