3 * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 #ifndef __NTOSKRNL_INCLUDE_INTERNAL_I386_KE_H
20 #define __NTOSKRNL_INCLUDE_INTERNAL_I386_KE_H
23 #pragma GCC system_header
26 #define KTRAP_FRAME_DEBUGEBP (0x0)
27 #define KTRAP_FRAME_DEBUGEIP (0x4)
28 #define KTRAP_FRAME_DEBUGARGMARK (0x8)
29 #define KTRAP_FRAME_DEBUGPOINTER (0xC)
30 #define KTRAP_FRAME_TEMPCS (0x10)
31 #define KTRAP_FRAME_TEMPEIP (0x14)
32 #define KTRAP_FRAME_DR0 (0x18)
33 #define KTRAP_FRAME_DR1 (0x1C)
34 #define KTRAP_FRAME_DR2 (0x20)
35 #define KTRAP_FRAME_DR3 (0x24)
36 #define KTRAP_FRAME_DR6 (0x28)
37 #define KTRAP_FRAME_DR7 (0x2C)
38 #define KTRAP_FRAME_GS (0x30)
39 #define KTRAP_FRAME_RESERVED1 (0x32)
40 #define KTRAP_FRAME_ES (0x34)
41 #define KTRAP_FRAME_RESERVED2 (0x36)
42 #define KTRAP_FRAME_DS (0x38)
43 #define KTRAP_FRAME_RESERVED3 (0x3A)
44 #define KTRAP_FRAME_EDX (0x3C)
45 #define KTRAP_FRAME_ECX (0x40)
46 #define KTRAP_FRAME_EAX (0x44)
47 #define KTRAP_FRAME_PREVIOUS_MODE (0x48)
48 #define KTRAP_FRAME_EXCEPTION_LIST (0x4C)
49 #define KTRAP_FRAME_FS (0x50)
50 #define KTRAP_FRAME_RESERVED4 (0x52)
51 #define KTRAP_FRAME_EDI (0x54)
52 #define KTRAP_FRAME_ESI (0x58)
53 #define KTRAP_FRAME_EBX (0x5C)
54 #define KTRAP_FRAME_EBP (0x60)
55 #define KTRAP_FRAME_ERROR_CODE (0x64)
56 #define KTRAP_FRAME_EIP (0x68)
57 #define KTRAP_FRAME_CS (0x6C)
58 #define KTRAP_FRAME_EFLAGS (0x70)
59 #define KTRAP_FRAME_ESP (0x74)
60 #define KTRAP_FRAME_SS (0x78)
61 #define KTRAP_FRAME_RESERVED5 (0x7A)
62 #define KTRAP_FRAME_V86_ES (0x7C)
63 #define KTRAP_FRAME_RESERVED6 (0x7E)
64 #define KTRAP_FRAME_V86_DS (0x80)
65 #define KTRAP_FRAME_RESERVED7 (0x82)
66 #define KTRAP_FRAME_V86_FS (0x84)
67 #define KTRAP_FRAME_RESERVED8 (0x86)
68 #define KTRAP_FRAME_V86_GS (0x88)
69 #define KTRAP_FRAME_RESERVED9 (0x8A)
70 #define KTRAP_FRAME_SIZE (0x8C)
74 typedef struct _KTRAP_FRAME
120 } KTRAP_FRAME, *PKTRAP_FRAME;
124 KiInitializeGdt(struct _KPCR* Pcr);
126 Ki386ApplicationProcessorInitializeTSS(VOID);
128 Ki386BootInitializeTSS(VOID);
130 KiGdtPrepareForApplicationProcessorInit(ULONG Id);
132 Ki386InitializeLdt(VOID);
133 ULONG KeAllocateGdtSelector(ULONG Desc[2]);
134 VOID KeFreeGdtSelector(ULONG Entry);
136 NtEarlyInitVdm(VOID);
140 #endif /* __NTOSKRNL_INCLUDE_INTERNAL_I386_KE_H */