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