1
2 #ifndef _UAPI_ASM_X86_VM86_H
3 #define _UAPI_ASM_X86_VM86_H
4
5
6
7
8
9
10
11
12
13
14
15
16 #include <asm/processor-flags.h>
17
18 #define BIOSSEG 0x0f000
19
20 #define CPU_086 0
21 #define CPU_186 1
22 #define CPU_286 2
23 #define CPU_386 3
24 #define CPU_486 4
25 #define CPU_586 5
26
27
28
29
30 #define VM86_TYPE(retval) ((retval) & 0xff)
31 #define VM86_ARG(retval) ((retval) >> 8)
32
33 #define VM86_SIGNAL 0
34 #define VM86_UNKNOWN 1
35
36 #define VM86_INTx 2
37 #define VM86_STI 3
38
39
40
41
42
43 #define VM86_PICRETURN 4
44 #define VM86_TRAP 6
45
46
47
48
49 #define VM86_PLUS_INSTALL_CHECK 0
50 #define VM86_ENTER 1
51 #define VM86_ENTER_NO_BYPASS 2
52 #define VM86_REQUEST_IRQ 3
53 #define VM86_FREE_IRQ 4
54 #define VM86_GET_IRQ_BITS 5
55 #define VM86_GET_AND_RESET_IRQ 6
56
57
58
59
60
61
62
63 struct vm86_regs {
64
65
66
67 long ebx;
68 long ecx;
69 long edx;
70 long esi;
71 long edi;
72 long ebp;
73 long eax;
74 long __null_ds;
75 long __null_es;
76 long __null_fs;
77 long __null_gs;
78 long orig_eax;
79 long eip;
80 unsigned short cs, __csh;
81 long eflags;
82 long esp;
83 unsigned short ss, __ssh;
84
85
86
87 unsigned short es, __esh;
88 unsigned short ds, __dsh;
89 unsigned short fs, __fsh;
90 unsigned short gs, __gsh;
91 };
92
93 struct revectored_struct {
94 unsigned long __map[8];
95 };
96
97 struct vm86_struct {
98 struct vm86_regs regs;
99 unsigned long flags;
100 unsigned long screen_bitmap;
101 unsigned long cpu_type;
102 struct revectored_struct int_revectored;
103 struct revectored_struct int21_revectored;
104 };
105
106
107
108
109 #define VM86_SCREEN_BITMAP 0x0001
110
111 struct vm86plus_info_struct {
112 unsigned long force_return_for_pic:1;
113 unsigned long vm86dbg_active:1;
114 unsigned long vm86dbg_TFpendig:1;
115 unsigned long unused:28;
116 unsigned long is_vm86pus:1;
117 unsigned char vm86dbg_intxxtab[32];
118 };
119 struct vm86plus_struct {
120 struct vm86_regs regs;
121 unsigned long flags;
122 unsigned long screen_bitmap;
123 unsigned long cpu_type;
124 struct revectored_struct int_revectored;
125 struct revectored_struct int21_revectored;
126 struct vm86plus_info_struct vm86plus;
127 };
128
129
130 #endif