Synchronize with trunk r58606.
[reactos.git] / ntoskrnl / kd64 / kddata.c
1 /*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/kd64/kddata.c
5 * PURPOSE: Contains all global variables and settings for KD64
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7 */
8
9 /* INCLUDES ******************************************************************/
10
11 #include <ntoskrnl.h>
12 #define NDEBUG
13 #include <debug.h>
14 #include "../mm/ARM3/miarm.h"
15 #undef MmSystemRangeStart
16
17 VOID NTAPI RtlpBreakWithStatusInstruction(VOID);
18
19 //
20 // Apply the KIPCR WDK workaround for x86 and AMD64
21 //
22 #if defined(_X86_) || defined(_AMD64_)
23 #define KPCR KIPCR
24 #endif
25
26 #if defined(_X86_)
27
28 #define KPCR_SELF_PCR_OFFSET FIELD_OFFSET(KPCR, Self)
29 #define KPCR_CURRENT_PRCB_OFFSET FIELD_OFFSET(KPCR, Prcb)
30 #define KPCR_CONTAINED_PRCB_OFFSET FIELD_OFFSET(KPCR, PrcbData)
31 #define KPCR_INITIAL_STACK_OFFSET 0
32 #define KPCR_STACK_LIMIT_OFFSET 0
33 #define KPRCB_PCR_PAGE_OFFSET 0
34 #define CBSTACK_FRAME_POINTER Ebp
35
36 #elif defined(_AMD64_)
37
38 #define KPCR_SELF_PCR_OFFSET FIELD_OFFSET(KPCR, Self)
39 #define KPCR_CURRENT_PRCB_OFFSET FIELD_OFFSET(KPCR, CurrentPrcb)
40 #define KPCR_CONTAINED_PRCB_OFFSET FIELD_OFFSET(KPCR, Prcb)
41 #define KPCR_INITIAL_STACK_OFFSET 0
42 #define KPCR_STACK_LIMIT_OFFSET 0
43 #define KPRCB_PCR_PAGE_OFFSET 0
44 #define CBSTACK_FRAME_POINTER Rbp
45
46 #elif defined(_ARM_)
47
48 #define KPCR_SELF_PCR_OFFSET 0
49 #define KPCR_CURRENT_PRCB_OFFSET FIELD_OFFSET(KPCR, Prcb)
50 #define KPCR_CONTAINED_PRCB_OFFSET 0
51 #define KPCR_INITIAL_STACK_OFFSET FIELD_OFFSET(KPCR, InitialStack)
52 #define KPCR_STACK_LIMIT_OFFSET FIELD_OFFSET(KPCR, StackLimit)
53 #define KPRCB_PCR_PAGE_OFFSET FIELD_OFFSET(KPRCB, PcrPage)
54 #define CBSTACK_FRAME_POINTER DummyFramePointer
55
56 #else
57 #error Unsupported Architecture
58 #endif
59
60 /* GLOBALS *******************************************************************/
61
62 //
63 // Debugger State
64 //
65 KD_CONTEXT KdpContext;
66 BOOLEAN KdpPortLocked;
67 KSPIN_LOCK KdpDebuggerLock;
68 BOOLEAN KdpControlCPressed;
69 BOOLEAN KdpContextSent;
70
71 //
72 // Debug Trap Handlers
73 //
74 PKDEBUG_ROUTINE KiDebugRoutine = KdpStub;
75 PKDEBUG_SWITCH_ROUTINE KiDebugSwitchRoutine;
76
77 //
78 // Debugger Configuration Settings
79 //
80 BOOLEAN KdBreakAfterSymbolLoad;
81 BOOLEAN KdPitchDebugger;
82 BOOLEAN _KdDebuggerNotPresent;
83 BOOLEAN _KdDebuggerEnabled;
84 BOOLEAN KdAutoEnableOnEvent;
85 BOOLEAN KdBlockEnable;
86 BOOLEAN KdIgnoreUmExceptions;
87 BOOLEAN KdPreviouslyEnabled;
88 BOOLEAN KdpDebuggerStructuresInitialized;
89 BOOLEAN KdEnteredDebugger;
90 ULONG KdDisableCount;
91 LARGE_INTEGER KdPerformanceCounterRate;
92
93 //
94 // Breakpoint Data
95 //
96 BREAKPOINT_ENTRY KdpBreakpointTable[KD_BREAKPOINT_MAX];
97 KD_BREAKPOINT_TYPE KdpBreakpointInstruction = KD_BREAKPOINT_VALUE;
98 BOOLEAN KdpOweBreakpoint;
99 BOOLEAN BreakpointsSuspended;
100 ULONG KdpNumInternalBreakpoints;
101
102 //
103 // Symbol Data
104 //
105 ULONG_PTR KdpCurrentSymbolStart, KdpCurrentSymbolEnd;
106
107 //
108 // Tracepoint Data
109 //
110 ULONG TraceDataBuffer[40];
111 ULONG TraceDataBufferPosition = 1;
112
113 //
114 // Time Slip Support
115 //
116 KDPC KdpTimeSlipDpc;
117 KTIMER KdpTimeSlipTimer;
118 WORK_QUEUE_ITEM KdpTimeSlipWorkItem;
119 LONG KdpTimeSlipPending = 1;
120 PKEVENT KdpTimeSlipEvent;
121 KSPIN_LOCK KdpTimeSlipEventLock;
122 LARGE_INTEGER KdTimerStop, KdTimerStart, KdTimerDifference;
123
124 //
125 // Buffers
126 //
127 CHAR KdpMessageBuffer[0x1000];
128 CHAR KdpPathBuffer[0x1000];
129
130 //
131 // KdPrint Buffers
132 //
133 CHAR KdPrintDefaultCircularBuffer[KD_DEFAULT_LOG_BUFFER_SIZE];
134 PCHAR KdPrintWritePointer = KdPrintDefaultCircularBuffer;
135 ULONG KdPrintRolloverCount;
136 PCHAR KdPrintCircularBuffer = KdPrintDefaultCircularBuffer;
137 ULONG KdPrintBufferSize = sizeof(KdPrintDefaultCircularBuffer);
138 ULONG KdPrintBufferChanges = 0;
139
140 //
141 // Debug Filter Masks
142 //
143 ULONG Kd_WIN2000_Mask = 1;
144 ULONG Kd_SYSTEM_Mask;
145 ULONG Kd_SMSS_Mask;
146 ULONG Kd_SETUP_Mask;
147 ULONG Kd_NTFS_Mask;
148 ULONG Kd_FSTUB_Mask;
149 ULONG Kd_CRASHDUMP_Mask;
150 ULONG Kd_CDAUDIO_Mask;
151 ULONG Kd_CDROM_Mask;
152 ULONG Kd_CLASSPNP_Mask;
153 ULONG Kd_DISK_Mask;
154 ULONG Kd_REDBOOK_Mask;
155 ULONG Kd_STORPROP_Mask;
156 ULONG Kd_SCSIPORT_Mask;
157 ULONG Kd_SCSIMINIPORT_Mask;
158 ULONG Kd_CONFIG_Mask;
159 ULONG Kd_I8042PRT_Mask;
160 ULONG Kd_SERMOUSE_Mask;
161 ULONG Kd_LSERMOUS_Mask;
162 ULONG Kd_KBDHID_Mask;
163 ULONG Kd_MOUHID_Mask;
164 ULONG Kd_KBDCLASS_Mask;
165 ULONG Kd_MOUCLASS_Mask;
166 ULONG Kd_TWOTRACK_Mask;
167 ULONG Kd_WMILIB_Mask;
168 ULONG Kd_ACPI_Mask;
169 ULONG Kd_AMLI_Mask;
170 ULONG Kd_HALIA64_Mask;
171 ULONG Kd_VIDEO_Mask;
172 ULONG Kd_SVCHOST_Mask;
173 ULONG Kd_VIDEOPRT_Mask;
174 ULONG Kd_TCPIP_Mask;
175 ULONG Kd_DMSYNTH_Mask;
176 ULONG Kd_NTOSPNP_Mask;
177 ULONG Kd_FASTFAT_Mask;
178 ULONG Kd_SAMSS_Mask;
179 ULONG Kd_PNPMGR_Mask;
180 ULONG Kd_NETAPI_Mask;
181 ULONG Kd_SCSERVER_Mask;
182 ULONG Kd_SCCLIENT_Mask;
183 ULONG Kd_SERIAL_Mask;
184 ULONG Kd_SERENUM_Mask;
185 ULONG Kd_UHCD_Mask;
186 ULONG Kd_RPCPROXY_Mask;
187 ULONG Kd_AUTOCHK_Mask;
188 ULONG Kd_DCOMSS_Mask;
189 ULONG Kd_UNIMODEM_Mask;
190 ULONG Kd_SIS_Mask;
191 ULONG Kd_FLTMGR_Mask;
192 ULONG Kd_WMICORE_Mask;
193 ULONG Kd_BURNENG_Mask;
194 ULONG Kd_IMAPI_Mask;
195 ULONG Kd_SXS_Mask;
196 ULONG Kd_FUSION_Mask;
197 ULONG Kd_IDLETASK_Mask;
198 ULONG Kd_SOFTPCI_Mask;
199 ULONG Kd_TAPE_Mask;
200 ULONG Kd_MCHGR_Mask;
201 ULONG Kd_IDEP_Mask;
202 ULONG Kd_PCIIDE_Mask;
203 ULONG Kd_FLOPPY_Mask;
204 ULONG Kd_FDC_Mask;
205 ULONG Kd_TERMSRV_Mask;
206 ULONG Kd_W32TIME_Mask;
207 ULONG Kd_PREFETCHER_Mask;
208 ULONG Kd_RSFILTER_Mask;
209 ULONG Kd_FCPORT_Mask;
210 ULONG Kd_PCI_Mask;
211 ULONG Kd_DMIO_Mask;
212 ULONG Kd_DMCONFIG_Mask;
213 ULONG Kd_DMADMIN_Mask;
214 ULONG Kd_WSOCKTRANSPORT_Mask;
215 ULONG Kd_VSS_Mask;
216 ULONG Kd_PNPMEM_Mask;
217 ULONG Kd_PROCESSOR_Mask;
218 ULONG Kd_DMSERVER_Mask;
219 ULONG Kd_SR_Mask;
220 ULONG Kd_INFINIBAND_Mask;
221 ULONG Kd_IHVDRIVER_Mask;
222 ULONG Kd_IHVVIDEO_Mask;
223 ULONG Kd_IHVAUDIO_Mask;
224 ULONG Kd_IHVNETWORK_Mask;
225 ULONG Kd_IHVSTREAMING_Mask;
226 ULONG Kd_IHVBUS_Mask;
227 ULONG Kd_HPS_Mask;
228 ULONG Kd_RTLTHREADPOOL_Mask;
229 ULONG Kd_LDR_Mask;
230 ULONG Kd_TCPIP6_Mask;
231 ULONG Kd_ISAPNP_Mask;
232 ULONG Kd_SHPC_Mask;
233 ULONG Kd_STORPORT_Mask;
234 ULONG Kd_STORMINIPORT_Mask;
235 ULONG Kd_PRINTSPOOLER_Mask;
236 ULONG Kd_VSSDYNDISK_Mask;
237 ULONG Kd_VERIFIER_Mask;
238 ULONG Kd_VDS_Mask;
239 ULONG Kd_VDSBAS_Mask;
240 ULONG Kd_VDSDYNDR_Mask;
241 ULONG Kd_VDSUTIL_Mask;
242 ULONG Kd_DFRGIFC_Mask;
243 ULONG Kd_DEFAULT_Mask;
244 ULONG Kd_MM_Mask;
245 ULONG Kd_DFSC_Mask;
246 ULONG Kd_WOW64_Mask;
247 ULONG Kd_ENDOFTABLE_Mask;
248
249 //
250 // Debug Filter Component Table
251 //
252 PULONG KdComponentTable[104] =
253 {
254 &Kd_SYSTEM_Mask,
255 &Kd_SMSS_Mask,
256 &Kd_SETUP_Mask,
257 &Kd_NTFS_Mask,
258 &Kd_FSTUB_Mask,
259 &Kd_CRASHDUMP_Mask,
260 &Kd_CDAUDIO_Mask,
261 &Kd_CDROM_Mask,
262 &Kd_CLASSPNP_Mask,
263 &Kd_DISK_Mask,
264 &Kd_REDBOOK_Mask,
265 &Kd_STORPROP_Mask,
266 &Kd_SCSIPORT_Mask,
267 &Kd_SCSIMINIPORT_Mask,
268 &Kd_CONFIG_Mask,
269 &Kd_I8042PRT_Mask,
270 &Kd_SERMOUSE_Mask,
271 &Kd_LSERMOUS_Mask,
272 &Kd_KBDHID_Mask,
273 &Kd_MOUHID_Mask,
274 &Kd_KBDCLASS_Mask,
275 &Kd_MOUCLASS_Mask,
276 &Kd_TWOTRACK_Mask,
277 &Kd_WMILIB_Mask,
278 &Kd_ACPI_Mask,
279 &Kd_AMLI_Mask,
280 &Kd_HALIA64_Mask,
281 &Kd_VIDEO_Mask,
282 &Kd_SVCHOST_Mask,
283 &Kd_VIDEOPRT_Mask,
284 &Kd_TCPIP_Mask,
285 &Kd_DMSYNTH_Mask,
286 &Kd_NTOSPNP_Mask,
287 &Kd_FASTFAT_Mask,
288 &Kd_SAMSS_Mask,
289 &Kd_PNPMGR_Mask,
290 &Kd_NETAPI_Mask,
291 &Kd_SCSERVER_Mask,
292 &Kd_SCCLIENT_Mask,
293 &Kd_SERIAL_Mask,
294 &Kd_SERENUM_Mask,
295 &Kd_UHCD_Mask,
296 &Kd_RPCPROXY_Mask,
297 &Kd_AUTOCHK_Mask,
298 &Kd_DCOMSS_Mask,
299 &Kd_UNIMODEM_Mask,
300 &Kd_SIS_Mask,
301 &Kd_FLTMGR_Mask,
302 &Kd_WMICORE_Mask,
303 &Kd_BURNENG_Mask,
304 &Kd_IMAPI_Mask,
305 &Kd_SXS_Mask,
306 &Kd_FUSION_Mask,
307 &Kd_IDLETASK_Mask,
308 &Kd_SOFTPCI_Mask,
309 &Kd_TAPE_Mask,
310 &Kd_MCHGR_Mask,
311 &Kd_IDEP_Mask,
312 &Kd_PCIIDE_Mask,
313 &Kd_FLOPPY_Mask,
314 &Kd_FDC_Mask,
315 &Kd_TERMSRV_Mask,
316 &Kd_W32TIME_Mask,
317 &Kd_PREFETCHER_Mask,
318 &Kd_RSFILTER_Mask,
319 &Kd_FCPORT_Mask,
320 &Kd_PCI_Mask,
321 &Kd_DMIO_Mask,
322 &Kd_DMCONFIG_Mask,
323 &Kd_DMADMIN_Mask,
324 &Kd_WSOCKTRANSPORT_Mask,
325 &Kd_VSS_Mask,
326 &Kd_PNPMEM_Mask,
327 &Kd_PROCESSOR_Mask,
328 &Kd_DMSERVER_Mask,
329 &Kd_SR_Mask,
330 &Kd_INFINIBAND_Mask,
331 &Kd_IHVDRIVER_Mask,
332 &Kd_IHVVIDEO_Mask,
333 &Kd_IHVAUDIO_Mask,
334 &Kd_IHVNETWORK_Mask,
335 &Kd_IHVSTREAMING_Mask,
336 &Kd_IHVBUS_Mask,
337 &Kd_HPS_Mask,
338 &Kd_RTLTHREADPOOL_Mask,
339 &Kd_LDR_Mask,
340 &Kd_TCPIP6_Mask,
341 &Kd_ISAPNP_Mask,
342 &Kd_SHPC_Mask,
343 &Kd_STORPORT_Mask,
344 &Kd_STORMINIPORT_Mask,
345 &Kd_PRINTSPOOLER_Mask,
346 &Kd_VSSDYNDISK_Mask,
347 &Kd_VERIFIER_Mask,
348 &Kd_VDS_Mask,
349 &Kd_VDSBAS_Mask,
350 &Kd_VDSDYNDR_Mask,
351 &Kd_VDSUTIL_Mask,
352 &Kd_DFRGIFC_Mask,
353 &Kd_DEFAULT_Mask,
354 &Kd_MM_Mask,
355 &Kd_DFSC_Mask,
356 &Kd_WOW64_Mask,
357 &Kd_ENDOFTABLE_Mask,
358 };
359
360 ULONG KdComponentTableSize = sizeof(KdComponentTable) / sizeof(KdComponentTable[0]);
361
362 //
363 // Debugger Data
364 //
365 LIST_ENTRY KdpDebuggerDataListHead;
366 KSPIN_LOCK KdpDataSpinLock;
367
368 //
369 // Debugger Version and Data Block
370 //
371 DBGKD_GET_VERSION64 KdVersionBlock =
372 {
373 0,
374 0,
375 DBGKD_64BIT_PROTOCOL_VERSION2,
376 CURRENT_KD_SECONDARY_VERSION,
377 #if defined(_WIN64)
378 DBGKD_VERS_FLAG_DATA | DBGKD_VERS_FLAG_PTR64,
379 #else
380 DBGKD_VERS_FLAG_DATA,
381 #endif
382 IMAGE_FILE_MACHINE_NATIVE,
383 PACKET_TYPE_MAX,
384 0,
385 0,
386 DBGKD_SIMULATION_NONE,
387 {0},
388 0,
389 0,
390 0
391 };
392 KDDEBUGGER_DATA64 KdDebuggerDataBlock =
393 {
394 {{0}},
395 0,
396 {(ULONG_PTR)RtlpBreakWithStatusInstruction},
397 0,
398 FIELD_OFFSET(KTHREAD, CallbackStack),
399 FIELD_OFFSET(KCALLOUT_FRAME, CallbackStack),
400 FIELD_OFFSET(KCALLOUT_FRAME, CBSTACK_FRAME_POINTER),
401 FALSE,
402 {(ULONG_PTR)KiCallUserMode},
403 0,
404 {(ULONG_PTR)&PsLoadedModuleList},
405 {(ULONG_PTR)&PsActiveProcessHead},
406 {(ULONG_PTR)&PspCidTable},
407 {(ULONG_PTR)&ExpSystemResourcesList},
408 {(ULONG_PTR)ExpPagedPoolDescriptor},
409 {(ULONG_PTR)&ExpNumberOfPagedPools},
410 {(ULONG_PTR)&KeTimeIncrement},
411 {(ULONG_PTR)&KeBugcheckCallbackListHead},
412 {(ULONG_PTR)KiBugCheckData},
413 {(ULONG_PTR)&IopErrorLogListHead},
414 {(ULONG_PTR)&ObpRootDirectoryObject},
415 {(ULONG_PTR)&ObpTypeObjectType},
416 {(ULONG_PTR)&MmSystemCacheStart},
417 {(ULONG_PTR)&MmSystemCacheEnd},
418 {(ULONG_PTR)&MmSystemCacheWs},
419 {(ULONG_PTR)&MmPfnDatabase},
420 {(ULONG_PTR)MmSystemPtesStart},
421 {(ULONG_PTR)MmSystemPtesEnd},
422 {(ULONG_PTR)&MmSubsectionBase},
423 {(ULONG_PTR)&MmNumberOfPagingFiles},
424 {(ULONG_PTR)&MmLowestPhysicalPage},
425 {(ULONG_PTR)&MmHighestPhysicalPage},
426 {(ULONG_PTR)&MmNumberOfPhysicalPages},
427 {(ULONG_PTR)&MmMaximumNonPagedPoolInBytes},
428 {(ULONG_PTR)&MmNonPagedSystemStart},
429 {(ULONG_PTR)&MmNonPagedPoolStart},
430 {(ULONG_PTR)&MmNonPagedPoolEnd},
431 {(ULONG_PTR)&MmPagedPoolStart},
432 {(ULONG_PTR)&MmPagedPoolEnd},
433 {(ULONG_PTR)&MmPagedPoolInfo},
434 PAGE_SIZE,
435 {(ULONG_PTR)&MmSizeOfPagedPoolInBytes},
436 {(ULONG_PTR)&MmTotalCommitLimit},
437 {(ULONG_PTR)&MmTotalCommittedPages},
438 {(ULONG_PTR)&MmSharedCommit},
439 {(ULONG_PTR)&MmDriverCommit},
440 {(ULONG_PTR)&MmProcessCommit},
441 {(ULONG_PTR)&MmPagedPoolCommit},
442 {0},
443 {(ULONG_PTR)&MmZeroedPageListHead},
444 {(ULONG_PTR)&MmFreePageListHead},
445 {(ULONG_PTR)&MmStandbyPageListHead},
446 {(ULONG_PTR)&MmModifiedPageListHead},
447 {(ULONG_PTR)&MmModifiedNoWritePageListHead},
448 {(ULONG_PTR)&MmAvailablePages},
449 {(ULONG_PTR)&MmResidentAvailablePages},
450 {(ULONG_PTR)&PoolTrackTable},
451 {(ULONG_PTR)&NonPagedPoolDescriptor},
452 {(ULONG_PTR)&MmHighestUserAddress},
453 {(ULONG_PTR)&MmSystemRangeStart},
454 {(ULONG_PTR)&MmUserProbeAddress},
455 {(ULONG_PTR)KdPrintDefaultCircularBuffer},
456 {(ULONG_PTR)KdPrintDefaultCircularBuffer + 1},
457 {(ULONG_PTR)&KdPrintWritePointer},
458 {(ULONG_PTR)&KdPrintRolloverCount},
459 {(ULONG_PTR)&MmLoadedUserImageList},
460 {(ULONG_PTR)&NtBuildLab},
461 {0},
462 {(ULONG_PTR)KiProcessorBlock},
463 {(ULONG_PTR)&MmUnloadedDrivers},
464 {(ULONG_PTR)&MmLastUnloadedDrivers},
465 {(ULONG_PTR)&MmTriageActionTaken},
466 {(ULONG_PTR)&MmSpecialPoolTag},
467 {(ULONG_PTR)&KernelVerifier},
468 {(ULONG_PTR)&MmVerifierData},
469 {(ULONG_PTR)&MmAllocatedNonPagedPool},
470 {(ULONG_PTR)&MmPeakCommitment},
471 {(ULONG_PTR)&MmtotalCommitLimitMaximum},
472 {(ULONG_PTR)&CmNtCSDVersion},
473 {(ULONG_PTR)&MmPhysicalMemoryBlock},
474 {(ULONG_PTR)&MmSessionBase},
475 {(ULONG_PTR)&MmSessionSize},
476 {0},
477 {0},
478 FIELD_OFFSET(KTHREAD, NextProcessor),
479 FIELD_OFFSET(KTHREAD, Teb),
480 FIELD_OFFSET(KTHREAD, KernelStack),
481 FIELD_OFFSET(KTHREAD, InitialStack),
482 FIELD_OFFSET(KTHREAD, ApcState.Process),
483 FIELD_OFFSET(KTHREAD, State),
484 0,
485 0,
486 sizeof(EPROCESS),
487 FIELD_OFFSET(EPROCESS, Peb),
488 FIELD_OFFSET(EPROCESS, InheritedFromUniqueProcessId),
489 FIELD_OFFSET(EPROCESS, Pcb.DirectoryTableBase),
490 sizeof(KPRCB),
491 FIELD_OFFSET(KPRCB, DpcRoutineActive),
492 FIELD_OFFSET(KPRCB, CurrentThread),
493 FIELD_OFFSET(KPRCB, MHz),
494 FIELD_OFFSET(KPRCB, CpuType),
495 FIELD_OFFSET(KPRCB, VendorString),
496 FIELD_OFFSET(KPRCB, ProcessorState.ContextFrame),
497 FIELD_OFFSET(KPRCB, Number),
498 sizeof(ETHREAD),
499 {(ULONG_PTR)KdPrintDefaultCircularBuffer},
500 {(ULONG_PTR)&KdPrintBufferSize},
501 {(ULONG_PTR)&KeLoaderBlock},
502 sizeof(KPCR),
503 KPCR_SELF_PCR_OFFSET,
504 KPCR_CURRENT_PRCB_OFFSET,
505 KPCR_CONTAINED_PRCB_OFFSET,
506 0,
507 0,
508 KPCR_INITIAL_STACK_OFFSET,
509 KPCR_STACK_LIMIT_OFFSET,
510 KPRCB_PCR_PAGE_OFFSET,
511 FIELD_OFFSET(KPRCB, ProcessorState.SpecialRegisters),
512 #if defined(_X86_)
513 //
514 // x86 GDT/LDT/TSS constants
515 //
516 KGDT_R0_CODE,
517 KGDT_R0_DATA,
518 KGDT_R0_PCR,
519 KGDT_R3_CODE,
520 KGDT_R3_DATA,
521 KGDT_R3_TEB,
522 KGDT_LDT,
523 KGDT_TSS,
524 0,
525 0,
526 #elif defined(_AMD64_)
527 //
528 // AMD64 GDT/LDT/TSS constants
529 //
530 KGDT64_R0_CODE,
531 KGDT64_R3_DATA,
532 KGDT64_R3_DATA,
533 KGDT64_R3_CODE,
534 KGDT64_R3_DATA,
535 KGDT64_R3_DATA,
536 0,
537 KGDT64_SYS_TSS,
538 0,
539 0,
540 #else
541 //
542 // No GDT/LDT/TSS on other architectures
543 //
544 0,
545 0,
546 0,
547 0,
548 0,
549 0,
550 0,
551 0,
552 0,
553 0,
554 #endif
555 {(ULONG_PTR)&IopNumTriageDumpDataBlocks},
556 {(ULONG_PTR)IopTriageDumpDataBlocks},
557 };