1 #ifndef_LINUX_VM86_H 2 #define_LINUX_VM86_H 3
4 #defineTF_MASK 0x00000100
5 #defineIF_MASK 0x00000200
6 #defineIOPL_MASK 0x00003000
7 #defineNT_MASK 0x00004000
8 #defineVM_MASK 0x00020000
9 #defineAC_MASK 0x00040000
10
11 #defineBIOSSEG 0x0f000
12
13 #defineCPU_286 2
14 #defineCPU_386 3
15 #define CPU_486 4
16
17 /* 18 * This is the stack-layout when we have done a "SAVE_ALL" from vm86 19 * mode - the main change is that the old segment descriptors aren't 20 * useful any more and are forced to be zero by the kernel (and the 21 * hardware when a trap occurs), and the real segment descriptors are 22 * at the end of the structure. Look at ptrace.h to see the "normal" 23 * setup. 24 */ 25
26 structvm86_regs{ 27 /* 28 * normal regs, with special meaning for the segment descriptors.. 29 */ 30 longebx;
31 longecx;
32 longedx;
33 longesi;
34 longedi;
35 longebp;
36 longeax;
37 long__null_ds;
38 long__null_es;
39 long__null_fs;
40 long__null_gs;
41 longorig_eax;
42 longeip;
43 unsignedshortcs, __csh;
44 longeflags;
45 longesp;
46 unsignedshortss, __ssh;
47 /* 48 * these are specific to v86 mode: 49 */ 50 unsignedshortes, __esh;
51 unsignedshortds, __dsh;
52 unsignedshortfs, __fsh;
53 unsignedshortgs, __gsh;
54 };
55
56 structvm86_struct{ 57 structvm86_regsregs;
58 unsignedlongflags;
59 unsignedlongscreen_bitmap;
60 unsignedlongv_eflags;
61 unsignedlongcpu_type;
62 unsignedlongreturn_if_iflag;
63 unsignedcharint_revectored[0x100];
64 unsignedcharint21_revectored[0x100];
65 };
66
67 /* 68 * flags masks 69 */ 70 #defineVM86_SCREEN_BITMAP 1
71
72 #ifdef__KERNEL__ 73
74 voidhandle_vm86_fault(structvm86_regs *, long);
75
76 #endif 77
78 #endif