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