78b47c446fdc192f1c9b6cccd75295d7ecb965ce
[reactos.git] / reactos / include / ndk / i386 / ketypes.h
1 /*++ NDK Version: 0098
2
3 Copyright (c) Alex Ionescu. All rights reserved.
4
5 Header Name:
6
7 ketypes.h (X86)
8
9 Abstract:
10
11 i386 Type definitions for the Kernel services.
12
13 Author:
14
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16
17 --*/
18
19 #ifndef _I386_KETYPES_H
20 #define _I386_KETYPES_H
21
22 //
23 // Dependencies
24 //
25
26 //
27 // KPCR Access for non-IA64 builds
28 //
29 #define K0IPCR ((ULONG_PTR)(KIP0PCRADDRESS))
30 #define PCR ((volatile KPCR * const)K0IPCR)
31 #if defined(CONFIG_SMP) || defined(NT_BUILD)
32 #undef KeGetPcr
33 #define KeGetPcr() ((volatile KPCR * const)__readfsdword(0x1C))
34 #endif
35
36 //
37 // Machine Types
38 //
39 #define MACHINE_TYPE_ISA 0x0000
40 #define MACHINE_TYPE_EISA 0x0001
41 #define MACHINE_TYPE_MCA 0x0002
42
43 //
44 // X86 80386 Segment Types
45 //
46 #define I386_TASK_GATE 0x5
47 #define I386_TSS 0x9
48 #define I386_ACTIVE_TSS 0xB
49 #define I386_CALL_GATE 0xC
50 #define I386_INTERRUPT_GATE 0xE
51 #define I386_TRAP_GATE 0xF
52
53 //
54 // Selector Names
55 //
56 #define RPL_MASK 0x0003
57 #define MODE_MASK 0x0001
58 #define KGDT_R0_CODE 0x8
59 #define KGDT_R0_DATA 0x10
60 #define KGDT_R3_CODE 0x18
61 #define KGDT_R3_DATA 0x20
62 #define KGDT_TSS 0x28
63 #define KGDT_R0_PCR 0x30
64 #define KGDT_R3_TEB 0x38
65 #define KGDT_LDT 0x48
66 #define KGDT_DF_TSS 0x50
67 #define KGDT_NMI_TSS 0x58
68
69 //
70 // Define the number of GDTs that can be queried by user mode
71 //
72 #define KGDT_NUMBER 10
73
74 //
75 // CR4
76 //
77 #define CR4_VME 0x1
78 #define CR4_PVI 0x2
79 #define CR4_TSD 0x4
80 #define CR4_DE 0x8
81 #define CR4_PSE 0x10
82 #define CR4_PAE 0x20
83 #define CR4_MCE 0x40
84 #define CR4_PGE 0x80
85 #define CR4_FXSR 0x200
86 #define CR4_XMMEXCPT 0x400
87
88 //
89 // EFlags
90 //
91 #define EFLAGS_CF 0x01L
92 #define EFLAGS_ZF 0x40L
93 #define EFLAGS_TF 0x100L
94 #define EFLAGS_INTERRUPT_MASK 0x200L
95 #define EFLAGS_DF 0x400L
96 #define EFLAGS_IOPL 0x3000L
97 #define EFLAGS_NESTED_TASK 0x4000L
98 #define EFLAGS_RF 0x10000
99 #define EFLAGS_V86_MASK 0x20000
100 #define EFLAGS_ALIGN_CHECK 0x40000
101 #define EFLAGS_VIF 0x80000
102 #define EFLAGS_VIP 0x100000
103 #define EFLAGS_ID 0x200000
104 #define EFLAGS_USER_SANITIZE 0x3F4DD7
105 #define EFLAG_SIGN 0x8000
106 #define EFLAG_ZERO 0x4000
107
108 //
109 // IPI Types
110 //
111 #define IPI_APC 1
112 #define IPI_DPC 2
113 #define IPI_FREEZE 4
114 #define IPI_PACKET_READY 8
115 #define IPI_SYNCH_REQUEST 16
116
117 //
118 // PRCB Flags
119 //
120 #define PRCB_MAJOR_VERSION 1
121 #define PRCB_BUILD_DEBUG 1
122 #define PRCB_BUILD_UNIPROCESSOR 2
123
124 //
125 // HAL Variables
126 //
127 #define INITIAL_STALL_COUNT 100
128
129 //
130 // IOPM Definitions
131 //
132 #define IO_ACCESS_MAP_NONE 0
133 #define IOPM_OFFSET FIELD_OFFSET(KTSS, IoMaps[0].IoMap)
134 #define KiComputeIopmOffset(MapNumber) \
135 (MapNumber == IO_ACCESS_MAP_NONE) ? \
136 (USHORT)(sizeof(KTSS)) : \
137 (USHORT)(FIELD_OFFSET(KTSS, IoMaps[MapNumber-1].IoMap))
138
139 //
140 // Size of the XMM register save area in the FXSAVE format
141 //
142 #define SIZE_OF_FX_REGISTERS 128
143
144 //
145 // Static Kernel-Mode Address start (use MM_KSEG0_BASE for actual)
146 //
147 #define KSEG0_BASE 0x80000000
148
149 //
150 // Synchronization-level IRQL
151 //
152 #ifndef CONFIG_SMP
153 #define SYNCH_LEVEL DISPATCH_LEVEL
154 #else
155 #if (NTDDI_VERSION < NTDDI_WS03)
156 #define SYNCH_LEVEL (IPI_LEVEL - 1)
157 #else
158 #define SYNCH_LEVEL (IPI_LEVEL - 2)
159 #endif
160 #endif
161
162 //
163 // Trap Frame Definition
164 //
165 typedef struct _KTRAP_FRAME
166 {
167 ULONG DbgEbp;
168 ULONG DbgEip;
169 ULONG DbgArgMark;
170 ULONG DbgArgPointer;
171 ULONG TempSegCs;
172 ULONG TempEsp;
173 ULONG Dr0;
174 ULONG Dr1;
175 ULONG Dr2;
176 ULONG Dr3;
177 ULONG Dr6;
178 ULONG Dr7;
179 ULONG SegGs;
180 ULONG SegEs;
181 ULONG SegDs;
182 ULONG Edx;
183 ULONG Ecx;
184 ULONG Eax;
185 ULONG PreviousPreviousMode;
186 struct _EXCEPTION_REGISTRATION_RECORD FAR *ExceptionList;
187 ULONG SegFs;
188 ULONG Edi;
189 ULONG Esi;
190 ULONG Ebx;
191 ULONG Ebp;
192 ULONG ErrCode;
193 ULONG Eip;
194 ULONG SegCs;
195 ULONG EFlags;
196 ULONG HardwareEsp;
197 ULONG HardwareSegSs;
198 ULONG V86Es;
199 ULONG V86Ds;
200 ULONG V86Fs;
201 ULONG V86Gs;
202 } KTRAP_FRAME, *PKTRAP_FRAME;
203
204 //
205 // LDT Entry Definition
206 //
207 #ifndef _LDT_ENTRY_DEFINED
208 #define _LDT_ENTRY_DEFINED
209 typedef struct _LDT_ENTRY
210 {
211 USHORT LimitLow;
212 USHORT BaseLow;
213 union
214 {
215 struct
216 {
217 UCHAR BaseMid;
218 UCHAR Flags1;
219 UCHAR Flags2;
220 UCHAR BaseHi;
221 } Bytes;
222 struct
223 {
224 ULONG BaseMid:8;
225 ULONG Type:5;
226 ULONG Dpl:2;
227 ULONG Pres:1;
228 ULONG LimitHi:4;
229 ULONG Sys:1;
230 ULONG Reserved_0:1;
231 ULONG Default_Big:1;
232 ULONG Granularity:1;
233 ULONG BaseHi:8;
234 } Bits;
235 } HighWord;
236 } LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY;
237 #endif
238
239 //
240 // GDT Entry Definition
241 //
242 typedef struct _KGDTENTRY
243 {
244 USHORT LimitLow;
245 USHORT BaseLow;
246 union
247 {
248 struct
249 {
250 UCHAR BaseMid;
251 UCHAR Flags1;
252 UCHAR Flags2;
253 UCHAR BaseHi;
254 } Bytes;
255 struct
256 {
257 ULONG BaseMid:8;
258 ULONG Type:5;
259 ULONG Dpl:2;
260 ULONG Pres:1;
261 ULONG LimitHi:4;
262 ULONG Sys:1;
263 ULONG Reserved_0:1;
264 ULONG Default_Big:1;
265 ULONG Granularity:1;
266 ULONG BaseHi:8;
267 } Bits;
268 } HighWord;
269 } KGDTENTRY, *PKGDTENTRY;
270
271 //
272 // IDT Entry Access Definition
273 //
274 typedef struct _KIDT_ACCESS
275 {
276 union
277 {
278 struct
279 {
280 UCHAR Reserved;
281 UCHAR SegmentType:4;
282 UCHAR SystemSegmentFlag:1;
283 UCHAR Dpl:2;
284 UCHAR Present:1;
285 };
286 USHORT Value;
287 };
288 } KIDT_ACCESS, *PKIDT_ACCESS;
289
290 //
291 // IDT Entry Definition
292 //
293 typedef struct _KIDTENTRY
294 {
295 USHORT Offset;
296 USHORT Selector;
297 USHORT Access;
298 USHORT ExtendedOffset;
299 } KIDTENTRY, *PKIDTENTRY;
300
301 typedef struct _DESCRIPTOR
302 {
303 USHORT Pad;
304 USHORT Limit;
305 ULONG Base;
306 } KDESCRIPTOR, *PKDESCRIPTOR;
307
308 #ifndef NTOS_MODE_USER
309 //
310 // Macro to get current KPRCB
311 //
312 FORCEINLINE
313 struct _KPRCB *
314 KeGetCurrentPrcb(VOID)
315 {
316 return (struct _KPRCB *)(ULONG_PTR)__readfsdword(FIELD_OFFSET(KPCR, Prcb));
317 }
318
319 //
320 // FN/FX (FPU) Save Area Structures
321 //
322 typedef struct _FNSAVE_FORMAT
323 {
324 ULONG ControlWord;
325 ULONG StatusWord;
326 ULONG TagWord;
327 ULONG ErrorOffset;
328 ULONG ErrorSelector;
329 ULONG DataOffset;
330 ULONG DataSelector;
331 UCHAR RegisterArea[80];
332 } FNSAVE_FORMAT, *PFNSAVE_FORMAT;
333
334 typedef struct _FXSAVE_FORMAT
335 {
336 USHORT ControlWord;
337 USHORT StatusWord;
338 USHORT TagWord;
339 USHORT ErrorOpcode;
340 ULONG ErrorOffset;
341 ULONG ErrorSelector;
342 ULONG DataOffset;
343 ULONG DataSelector;
344 ULONG MXCsr;
345 ULONG MXCsrMask;
346 UCHAR RegisterArea[SIZE_OF_FX_REGISTERS];
347 UCHAR Reserved3[128];
348 UCHAR Reserved4[224];
349 UCHAR Align16Byte[8];
350 } FXSAVE_FORMAT, *PFXSAVE_FORMAT;
351
352 typedef struct _FX_SAVE_AREA
353 {
354 union
355 {
356 FNSAVE_FORMAT FnArea;
357 FXSAVE_FORMAT FxArea;
358 } U;
359 ULONG NpxSavedCpu;
360 ULONG Cr0NpxState;
361 } FX_SAVE_AREA, *PFX_SAVE_AREA;
362
363 //
364 // Special Registers Structure (outside of CONTEXT)
365 //
366 typedef struct _KSPECIAL_REGISTERS
367 {
368 ULONG Cr0;
369 ULONG Cr2;
370 ULONG Cr3;
371 ULONG Cr4;
372 ULONG KernelDr0;
373 ULONG KernelDr1;
374 ULONG KernelDr2;
375 ULONG KernelDr3;
376 ULONG KernelDr6;
377 ULONG KernelDr7;
378 KDESCRIPTOR Gdtr;
379 KDESCRIPTOR Idtr;
380 USHORT Tr;
381 USHORT Ldtr;
382 ULONG Reserved[6];
383 } KSPECIAL_REGISTERS, *PKSPECIAL_REGISTERS;
384
385 //
386 // Processor State Data
387 //
388 typedef struct _KPROCESSOR_STATE
389 {
390 CONTEXT ContextFrame;
391 KSPECIAL_REGISTERS SpecialRegisters;
392 } KPROCESSOR_STATE, *PKPROCESSOR_STATE;
393
394 //
395 // Processor Region Control Block
396 //
397 #pragma pack(push,4)
398 typedef struct _KPRCB
399 {
400 USHORT MinorVersion;
401 USHORT MajorVersion;
402 struct _KTHREAD *CurrentThread;
403 struct _KTHREAD *NextThread;
404 struct _KTHREAD *IdleThread;
405 UCHAR Number;
406 UCHAR Reserved;
407 USHORT BuildType;
408 KAFFINITY SetMember;
409 UCHAR CpuType;
410 UCHAR CpuID;
411 USHORT CpuStep;
412 KPROCESSOR_STATE ProcessorState;
413 ULONG KernelReserved[16];
414 ULONG HalReserved[16];
415 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
416 ULONG CFlushSize;
417 UCHAR PrcbPad0[88];
418 #else
419 UCHAR PrcbPad0[92];
420 #endif
421 KSPIN_LOCK_QUEUE LockQueue[LockQueueMaximumLock];
422 struct _KTHREAD *NpxThread;
423 ULONG InterruptCount;
424 ULONG KernelTime;
425 ULONG UserTime;
426 ULONG DpcTime;
427 ULONG DebugDpcTime;
428 ULONG InterruptTime;
429 ULONG AdjustDpcThreshold;
430 ULONG PageColor;
431 UCHAR SkipTick;
432 UCHAR DebuggerSavedIRQL;
433 #if (NTDDI_VERSION >= NTDDI_WS03)
434 UCHAR NodeColor;
435 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
436 UCHAR PollSlot;
437 #else
438 UCHAR Spare1;
439 #endif
440 ULONG NodeShiftedColor;
441 #else
442 UCHAR Spare1[6];
443 #endif
444 struct _KNODE *ParentNode;
445 ULONG MultiThreadProcessorSet;
446 struct _KPRCB *MultiThreadSetMaster;
447 #if (NTDDI_VERSION >= NTDDI_WS03)
448 ULONG SecondaryColorMask;
449 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
450 ULONG DpcTimeLimit;
451 #else
452 LONG Sleeping;
453 #endif
454 #else
455 ULONG ThreadStartCount[2];
456 #endif
457 ULONG CcFastReadNoWait;
458 ULONG CcFastReadWait;
459 ULONG CcFastReadNotPossible;
460 ULONG CcCopyReadNoWait;
461 ULONG CcCopyReadWait;
462 ULONG CcCopyReadNoWaitMiss;
463 #if (NTDDI_VERSION < NTDDI_LONGHORN)
464 ULONG KeAlignmentFixupCount;
465 #endif
466 ULONG SpareCounter0;
467 #if (NTDDI_VERSION < NTDDI_LONGHORN)
468 ULONG KeDcacheFlushCount;
469 ULONG KeExceptionDispatchCount;
470 ULONG KeFirstLevelTbFills;
471 ULONG KeFloatingEmulationCount;
472 ULONG KeIcacheFlushCount;
473 ULONG KeSecondLevelTbFills;
474 ULONG KeSystemCalls;
475 #endif
476 volatile ULONG IoReadOperationCount;
477 volatile ULONG IoWriteOperationCount;
478 volatile ULONG IoOtherOperationCount;
479 LARGE_INTEGER IoReadTransferCount;
480 LARGE_INTEGER IoWriteTransferCount;
481 LARGE_INTEGER IoOtherTransferCount;
482 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
483 ULONG CcFastMdlReadNoWait;
484 ULONG CcFastMdlReadWait;
485 ULONG CcFastMdlReadNotPossible;
486 ULONG CcMapDataNoWait;
487 ULONG CcMapDataWait;
488 ULONG CcPinMappedDataCount;
489 ULONG CcPinReadNoWait;
490 ULONG CcPinReadWait;
491 ULONG CcMdlReadNoWait;
492 ULONG CcMdlReadWait;
493 ULONG CcLazyWriteHotSpots;
494 ULONG CcLazyWriteIos;
495 ULONG CcLazyWritePages;
496 ULONG CcDataFlushes;
497 ULONG CcDataPages;
498 ULONG CcLostDelayedWrites;
499 ULONG CcFastReadResourceMiss;
500 ULONG CcCopyReadWaitMiss;
501 ULONG CcFastMdlReadResourceMiss;
502 ULONG CcMapDataNoWaitMiss;
503 ULONG CcMapDataWaitMiss;
504 ULONG CcPinReadNoWaitMiss;
505 ULONG CcPinReadWaitMiss;
506 ULONG CcMdlReadNoWaitMiss;
507 ULONG CcMdlReadWaitMiss;
508 ULONG CcReadAheadIos;
509 ULONG KeAlignmentFixupCount;
510 ULONG KeExceptionDispatchCount;
511 ULONG KeSystemCalls;
512 ULONG PrcbPad1[3];
513 #else
514 ULONG SpareCounter1[8];
515 #endif
516 PP_LOOKASIDE_LIST PPLookasideList[16];
517 PP_LOOKASIDE_LIST PPNPagedLookasideList[32];
518 PP_LOOKASIDE_LIST PPPagedLookasideList[32];
519 volatile ULONG PacketBarrier;
520 volatile ULONG ReverseStall;
521 PVOID IpiFrame;
522 UCHAR PrcbPad2[52];
523 volatile PVOID CurrentPacket[3];
524 volatile ULONG TargetSet;
525 volatile PKIPI_WORKER WorkerRoutine;
526 volatile ULONG IpiFrozen;
527 UCHAR PrcbPad3[40];
528 volatile ULONG RequestSummary;
529 volatile struct _KPRCB *SignalDone;
530 UCHAR PrcbPad4[56];
531 struct _KDPC_DATA DpcData[2];
532 PVOID DpcStack;
533 ULONG MaximumDpcQueueDepth;
534 ULONG DpcRequestRate;
535 ULONG MinimumDpcRate;
536 volatile UCHAR DpcInterruptRequested;
537 volatile UCHAR DpcThreadRequested;
538 volatile UCHAR DpcRoutineActive;
539 volatile UCHAR DpcThreadActive;
540 ULONG PrcbLock;
541 ULONG DpcLastCount;
542 volatile ULONG TimerHand;
543 volatile ULONG TimerRequest;
544 PVOID DpcThread;
545 KEVENT DpcEvent;
546 UCHAR ThreadDpcEnable;
547 volatile BOOLEAN QuantumEnd;
548 UCHAR PrcbPad50;
549 volatile UCHAR IdleSchedule;
550 LONG DpcSetEventRequest;
551 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
552 LONG Sleeping;
553 ULONG PeriodicCount;
554 ULONG PeriodicBias;
555 UCHAR PrcbPad5[6];
556 #else
557 UCHAR PrcbPad5[18];
558 #endif
559 LONG TickOffset;
560 KDPC CallDpc;
561 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
562 LONG ClockKeepAlive;
563 UCHAR ClockCheckSlot;
564 UCHAR ClockPollCycle;
565 UCHAR PrcbPad6[2];
566 LONG DpcWatchdogPeriod;
567 LONG DpcWatchDogCount;
568 LONG ThreadWatchdogPeriod;
569 LONG ThreadWatchDogCount;
570 ULONG PrcbPad70[2];
571 #else
572 ULONG PrcbPad7[8];
573 #endif
574 LIST_ENTRY WaitListHead;
575 ULONG ReadySummary;
576 ULONG QueueIndex;
577 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
578 SINGLE_LIST_ENTRY DeferredReadyListHead;
579 ULONGLONG StartCycles;
580 ULONGLONG CycleTime;
581 ULONGLONG PrcbPad71[3];
582 LIST_ENTRY DispatcherReadyListHead[32];
583 #else
584 LIST_ENTRY DispatcherReadyListHead[32];
585 SINGLE_LIST_ENTRY DeferredReadyListHead;
586 ULONG PrcbPad72[11];
587 #endif
588 PVOID ChainedInterruptList;
589 LONG LookasideIrpFloat;
590 volatile LONG MmPageFaultCount;
591 volatile LONG MmCopyOnWriteCount;
592 volatile LONG MmTransitionCount;
593 volatile LONG MmCacheTransitionCount;
594 volatile LONG MmDemandZeroCount;
595 volatile LONG MmPageReadCount;
596 volatile LONG MmPageReadIoCount;
597 volatile LONG MmCacheReadCount;
598 volatile LONG MmCacheIoCount;
599 volatile LONG MmDirtyPagesWriteCount;
600 volatile LONG MmDirtyWriteIoCount;
601 volatile LONG MmMappedPagesWriteCount;
602 volatile LONG MmMappedWriteIoCount;
603 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
604 ULONG CachedCommit;
605 ULONG CachedResidentAvailable;
606 PVOID HyperPte;
607 UCHAR CpuVendor;
608 UCHAR PrcbPad9[3];
609 #else
610 ULONG SpareFields0[1];
611 #endif
612 CHAR VendorString[13];
613 UCHAR InitialApicId;
614 UCHAR LogicalProcessorsPerPhysicalProcessor;
615 ULONG MHz;
616 ULONG FeatureBits;
617 LARGE_INTEGER UpdateSignature;
618 volatile LARGE_INTEGER IsrTime;
619 LARGE_INTEGER SpareField1;
620 FX_SAVE_AREA NpxSaveArea;
621 PROCESSOR_POWER_STATE PowerState;
622 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
623 KDPC DpcWatchdogDoc;
624 KTIMER DpcWatchdogTimer;
625 PVOID WheaInfo;
626 PVOID EtwSupport;
627 SLIST_HEADER InterruptObjectPool;
628 LARGE_INTEGER HyperCallPagePhysical;
629 LARGE_INTEGER HyperCallPageVirtual;
630 PVOID RateControl;
631 CACHE_DESCRIPTOR Cache[5];
632 ULONG CacheCount;
633 ULONG CacheProcessorMask[5];
634 UCHAR LogicalProcessorsPerCore;
635 UCHAR PrcbPad8[3];
636 ULONG PackageProcessorSet;
637 ULONG CoreProcessorSet;
638 #endif
639 } KPRCB, *PKPRCB;
640
641 //
642 // Processor Control Region
643 //
644 typedef struct _KIPCR
645 {
646 union
647 {
648 NT_TIB NtTib;
649 struct
650 {
651 struct _EXCEPTION_REGISTRATION_RECORD *Used_ExceptionList;
652 PVOID Used_StackBase;
653 PVOID PerfGlobalGroupMask;
654 PVOID TssCopy;
655 ULONG ContextSwitches;
656 KAFFINITY SetMemberCopy;
657 PVOID Used_Self;
658 };
659 };
660 struct _KPCR *Self;
661 struct _KPRCB *Prcb;
662 KIRQL Irql;
663 ULONG IRR;
664 ULONG IrrActive;
665 ULONG IDR;
666 PVOID KdVersionBlock;
667 PKIDTENTRY IDT;
668 PKGDTENTRY GDT;
669 struct _KTSS *TSS;
670 USHORT MajorVersion;
671 USHORT MinorVersion;
672 KAFFINITY SetMember;
673 ULONG StallScaleFactor;
674 UCHAR SpareUnused;
675 UCHAR Number;
676 UCHAR Reserved;
677 UCHAR L2CacheAssociativity;
678 ULONG VdmAlert;
679 ULONG KernelReserved[14];
680 ULONG SecondLevelCacheSize;
681 ULONG HalReserved[16];
682 ULONG InterruptMode;
683 UCHAR Spare1;
684 ULONG KernelReserved2[17];
685 KPRCB PrcbData;
686 } KIPCR, *PKIPCR;
687 #pragma pack(pop)
688
689 //
690 // TSS Definition
691 //
692 typedef struct _KiIoAccessMap
693 {
694 UCHAR DirectionMap[32];
695 UCHAR IoMap[8196];
696 } KIIO_ACCESS_MAP;
697
698 typedef struct _KTSS
699 {
700 USHORT Backlink;
701 USHORT Reserved0;
702 ULONG Esp0;
703 USHORT Ss0;
704 USHORT Reserved1;
705 ULONG NotUsed1[4];
706 ULONG CR3;
707 ULONG Eip;
708 ULONG EFlags;
709 ULONG Eax;
710 ULONG Ecx;
711 ULONG Edx;
712 ULONG Ebx;
713 ULONG Esp;
714 ULONG Ebp;
715 ULONG Esi;
716 ULONG Edi;
717 USHORT Es;
718 USHORT Reserved2;
719 USHORT Cs;
720 USHORT Reserved3;
721 USHORT Ss;
722 USHORT Reserved4;
723 USHORT Ds;
724 USHORT Reserved5;
725 USHORT Fs;
726 USHORT Reserved6;
727 USHORT Gs;
728 USHORT Reserved7;
729 USHORT LDT;
730 USHORT Reserved8;
731 USHORT Flags;
732 USHORT IoMapBase;
733 KIIO_ACCESS_MAP IoMaps[1];
734 UCHAR IntDirectionMap[32];
735 } KTSS, *PKTSS;
736
737 //
738 // i386 CPUs don't have exception frames
739 //
740 typedef struct _KEXCEPTION_FRAME KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;
741 #endif
742 #endif