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