11 * I'm guessing at the VIF/VIP flag usage, but hope that this is how
12 * the Pentium uses them. Linux will return from vm86 mode when both
15 * On a Pentium, we could probably optimize the virtual flags directly
16 * in the eflags register instead of doing it "by hand" in vflags...
21 #define TF_MASK 0x00000100
22 #define IF_MASK 0x00000200
23 #define IOPL_MASK 0x00003000
24 #define NT_MASK 0x00004000
25 #define VM_MASK 0x00020000
26 #define AC_MASK 0x00040000
27 #define VIF_MASK 0x00080000 /* virtual interrupt flag */
28 #define VIP_MASK 0x00100000 /* virtual interrupt pending */
29 #define ID_MASK 0x00200000
31 #define BIOSSEG 0x0f000
41 * Return values for the 'vm86()' system call
43 #define VM86_TYPE(retval) ((retval) & 0xff)
44 #define VM86_ARG(retval) ((retval) >> 8)
46 #define VM86_SIGNAL 0 /* return due to signal */
47 #define VM86_UNKNOWN 1 /* unhandled GP fault - IO-instruction or similar */
48 #define VM86_INTx 2 /* int3/int x instruction (ARG = x) */
49 #define VM86_STI 3 /* sti/popf/iret instruction enabled virtual interrupts */
52 * This is the stack-layout when we have done a "SAVE_ALL" from vm86
53 * mode - the main change is that the old segment descriptors aren't
54 * useful any more and are forced to be zero by the kernel (and the
55 * hardware when a trap occurs), and the real segment descriptors are
56 * at the end of the structure. Look at ptrace.h to see the "normal"
62 * normal regs, with special meaning for the segment descriptors..
77 unsigned short cs
, __csh
;
80 unsigned short ss
, __ssh
;
82 * these are specific to v86 mode:
84 unsigned short es
, __esh
;
85 unsigned short ds
, __dsh
;
86 unsigned short fs
, __fsh
;
87 unsigned short gs
, __gsh
;
90 struct revectored_struct
{
91 unsigned long __map
[8]; /* 256 bits */
95 struct vm86_regs regs
;
97 unsigned long screen_bitmap
;
98 unsigned long cpu_type
;
99 struct revectored_struct int_revectored
;
100 struct revectored_struct int21_revectored
;
106 #define VM86_SCREEN_BITMAP 0x0001
110 void handle_vm86_fault(struct vm86_regs
*, long);
111 void handle_vm86_debug(struct vm86_regs
*, long);
119 extern vm86(struct vm86_struct
* __info
);
123 #endif /*_SYS_VM86_H */