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(_M_IX86) || defined(_M_AMD64) 23 #define KPCR KIPCR 24 #endif 25 26 #if defined(_M_IX86) 27 28 #define KPCR_SELF_PCR_OFFSET FIELD_OFFSET(KPCR, SelfPcr) 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(_M_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(_M_ARM) 47 48 #define KPCR_SELF_PCR_OFFSET 0 49 #define KPCR_CURRENT_PRCB_OFFSET FIELD_OFFSET(KIPCR, 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(_M_AMD64) || defined(_M_ARM64) 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 #if defined(_M_ARM) || defined(_M_AMD64) 400 0, 401 0, 402 #else 403 FIELD_OFFSET(KCALLOUT_FRAME, CallbackStack), 404 FIELD_OFFSET(KCALLOUT_FRAME, CBSTACK_FRAME_POINTER), 405 #endif 406 FALSE, 407 {(ULONG_PTR)KiCallUserMode}, 408 0, 409 {(ULONG_PTR)&PsLoadedModuleList}, 410 {(ULONG_PTR)&PsActiveProcessHead}, 411 {(ULONG_PTR)&PspCidTable}, 412 {(ULONG_PTR)&ExpSystemResourcesList}, 413 {(ULONG_PTR)ExpPagedPoolDescriptor}, 414 {(ULONG_PTR)&ExpNumberOfPagedPools}, 415 {(ULONG_PTR)&KeTimeIncrement}, 416 {(ULONG_PTR)&KeBugcheckCallbackListHead}, 417 {(ULONG_PTR)KiBugCheckData}, 418 {(ULONG_PTR)&IopErrorLogListHead}, 419 {(ULONG_PTR)&ObpRootDirectoryObject}, 420 {(ULONG_PTR)&ObpTypeObjectType}, 421 {(ULONG_PTR)&MmSystemCacheStart}, 422 {(ULONG_PTR)&MmSystemCacheEnd}, 423 {(ULONG_PTR)&MmSystemCacheWs}, 424 {(ULONG_PTR)&MmPfnDatabase}, 425 {(ULONG_PTR)MmSystemPtesStart}, 426 {(ULONG_PTR)MmSystemPtesEnd}, 427 {(ULONG_PTR)&MmSubsectionBase}, 428 {(ULONG_PTR)&MmNumberOfPagingFiles}, 429 {(ULONG_PTR)&MmLowestPhysicalPage}, 430 {(ULONG_PTR)&MmHighestPhysicalPage}, 431 {(ULONG_PTR)&MmNumberOfPhysicalPages}, 432 {(ULONG_PTR)&MmMaximumNonPagedPoolInBytes}, 433 {(ULONG_PTR)&MmNonPagedSystemStart}, 434 {(ULONG_PTR)&MmNonPagedPoolStart}, 435 {(ULONG_PTR)&MmNonPagedPoolEnd}, 436 {(ULONG_PTR)&MmPagedPoolStart}, 437 {(ULONG_PTR)&MmPagedPoolEnd}, 438 {(ULONG_PTR)&MmPagedPoolInfo}, 439 PAGE_SIZE, 440 {(ULONG_PTR)&MmSizeOfPagedPoolInBytes}, 441 {(ULONG_PTR)&MmTotalCommitLimit}, 442 {(ULONG_PTR)&MmTotalCommittedPages}, 443 {(ULONG_PTR)&MmSharedCommit}, 444 {(ULONG_PTR)&MmDriverCommit}, 445 {(ULONG_PTR)&MmProcessCommit}, 446 {(ULONG_PTR)&MmPagedPoolCommit}, 447 {0}, 448 {(ULONG_PTR)&MmZeroedPageListHead}, 449 {(ULONG_PTR)&MmFreePageListHead}, 450 {(ULONG_PTR)&MmStandbyPageListHead}, 451 {(ULONG_PTR)&MmModifiedPageListHead}, 452 {(ULONG_PTR)&MmModifiedNoWritePageListHead}, 453 {(ULONG_PTR)&MmAvailablePages}, 454 {(ULONG_PTR)&MmResidentAvailablePages}, 455 {(ULONG_PTR)&PoolTrackTable}, 456 {(ULONG_PTR)&NonPagedPoolDescriptor}, 457 {(ULONG_PTR)&MmHighestUserAddress}, 458 {(ULONG_PTR)&MmSystemRangeStart}, 459 {(ULONG_PTR)&MmUserProbeAddress}, 460 {(ULONG_PTR)KdPrintDefaultCircularBuffer}, 461 {(ULONG_PTR)KdPrintDefaultCircularBuffer + 1}, 462 {(ULONG_PTR)&KdPrintWritePointer}, 463 {(ULONG_PTR)&KdPrintRolloverCount}, 464 {(ULONG_PTR)&MmLoadedUserImageList}, 465 {(ULONG_PTR)&NtBuildLab}, 466 {0}, 467 {(ULONG_PTR)KiProcessorBlock}, 468 {(ULONG_PTR)&MmUnloadedDrivers}, 469 {(ULONG_PTR)&MmLastUnloadedDrivers}, 470 {(ULONG_PTR)&MmTriageActionTaken}, 471 {(ULONG_PTR)&MmSpecialPoolTag}, 472 {(ULONG_PTR)&KernelVerifier}, 473 {(ULONG_PTR)&MmVerifierData}, 474 {(ULONG_PTR)&MmAllocatedNonPagedPool}, 475 {(ULONG_PTR)&MmPeakCommitment}, 476 {(ULONG_PTR)&MmtotalCommitLimitMaximum}, 477 {(ULONG_PTR)&CmNtCSDVersion}, 478 {(ULONG_PTR)&MmPhysicalMemoryBlock}, 479 {(ULONG_PTR)&MmSessionBase}, 480 {(ULONG_PTR)&MmSessionSize}, 481 {0}, 482 {0}, 483 FIELD_OFFSET(KTHREAD, NextProcessor), 484 FIELD_OFFSET(KTHREAD, Teb), 485 FIELD_OFFSET(KTHREAD, KernelStack), 486 FIELD_OFFSET(KTHREAD, InitialStack), 487 FIELD_OFFSET(KTHREAD, ApcState.Process), 488 FIELD_OFFSET(KTHREAD, State), 489 0, 490 0, 491 sizeof(EPROCESS), 492 FIELD_OFFSET(EPROCESS, Peb), 493 FIELD_OFFSET(EPROCESS, InheritedFromUniqueProcessId), 494 FIELD_OFFSET(EPROCESS, Pcb.DirectoryTableBase), 495 sizeof(KPRCB), 496 FIELD_OFFSET(KPRCB, DpcRoutineActive), 497 FIELD_OFFSET(KPRCB, CurrentThread), 498 FIELD_OFFSET(KPRCB, MHz), 499 FIELD_OFFSET(KPRCB, CpuType), 500 FIELD_OFFSET(KPRCB, VendorString), 501 FIELD_OFFSET(KPRCB, ProcessorState.ContextFrame), 502 FIELD_OFFSET(KPRCB, Number), 503 sizeof(ETHREAD), 504 {(ULONG_PTR)KdPrintDefaultCircularBuffer}, 505 {(ULONG_PTR)&KdPrintBufferSize}, 506 {(ULONG_PTR)&KeLoaderBlock}, 507 sizeof(KPCR), 508 KPCR_SELF_PCR_OFFSET, 509 KPCR_CURRENT_PRCB_OFFSET, 510 KPCR_CONTAINED_PRCB_OFFSET, 511 0, 512 0, 513 #if defined(_M_ARM) 514 _WARN("KPCR_INITIAL_STACK_OFFSET, KPCR_STACK_LIMIT_OFFSET and KPRCB_PCR_PAGE_OFFSET not properly defined on ARM") 515 0, 516 0, 517 0, 518 #else 519 KPCR_INITIAL_STACK_OFFSET, 520 KPCR_STACK_LIMIT_OFFSET, 521 KPRCB_PCR_PAGE_OFFSET, 522 #endif 523 FIELD_OFFSET(KPRCB, ProcessorState.SpecialRegisters), 524 #if defined(_M_IX86) 525 // 526 // x86 GDT/LDT/TSS constants 527 // 528 KGDT_R0_CODE, 529 KGDT_R0_DATA, 530 KGDT_R0_PCR, 531 KGDT_R3_CODE, 532 KGDT_R3_DATA, 533 KGDT_R3_TEB, 534 KGDT_LDT, 535 KGDT_TSS, 536 0, 537 0, 538 #elif defined(_M_AMD64) 539 // 540 // AMD64 GDT/LDT/TSS constants 541 // 542 KGDT64_R0_CODE, 543 KGDT64_R3_DATA, 544 KGDT64_R3_DATA, 545 KGDT64_R3_CODE, 546 KGDT64_R3_DATA, 547 KGDT64_R3_DATA, 548 0, 549 KGDT64_SYS_TSS, 550 0, 551 0, 552 #else 553 // 554 // No GDT/LDT/TSS on other architectures 555 // 556 0, 557 0, 558 0, 559 0, 560 0, 561 0, 562 0, 563 0, 564 0, 565 0, 566 #endif 567 {(ULONG_PTR)&IopNumTriageDumpDataBlocks}, 568 {(ULONG_PTR)IopTriageDumpDataBlocks}, 569 }; 570