unbreak build
[reactos.git] / reactos / ntoskrnl / include / internal / i386 / v86m.h
1 #ifndef __V86M_
2 #define __V86M_
3
4 #include "ketypes.h"
5
6 /* Emulate cli/sti instructions */
7 #define KV86M_EMULATE_CLI_STI (0x1)
8 /* Allow the v86 mode code to access i/o ports */
9 #define KV86M_ALLOW_IO_PORT_ACCESS (0x2)
10
11 typedef struct _KV86M_REGISTERS
12 {
13 /*
14 * General purpose registers
15 */
16 ULONG Ebp;
17 ULONG Edi;
18 ULONG Esi;
19 ULONG Edx;
20 ULONG Ecx;
21 ULONG Ebx;
22 ULONG Eax;
23 ULONG Ds;
24 ULONG Es;
25 ULONG Fs;
26 ULONG Gs;
27
28 /*
29 * Control registers
30 */
31 ULONG Eip;
32 ULONG Cs;
33 ULONG Eflags;
34 ULONG Esp;
35 ULONG Ss;
36
37 /*
38 * Control structures
39 */
40 ULONG RecoveryAddress;
41 UCHAR RecoveryInstruction[4];
42 ULONG Vif;
43 ULONG Flags;
44 PNTSTATUS PStatus;
45 } KV86M_REGISTERS, *PKV86M_REGISTERS;
46
47 typedef struct _KV86M_TRAP_FRAME
48 {
49 KTRAP_FRAME Tf;
50
51 ULONG SavedExceptionStack;
52
53 /*
54 * These are put on the top of the stack by the routine that entered
55 * v86 mode so the exception handlers can find the control information
56 */
57 struct _KV86M_REGISTERS* regs;
58 ULONG orig_ebp;
59 } KV86M_TRAP_FRAME, *PKV86M_TRAP_FRAME;
60
61 #endif