Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1839 lines
40 KiB

  1. #include "kxia64.h"
  2. #include "regia64.h"
  3. //
  4. // Pointer size in bytes
  5. //
  6. #define SizeofPointer 0x8
  7. //
  8. // Process State Enumerated Type Values
  9. //
  10. #define ProcessInMemory 0x0
  11. #define ProcessOutOfMemory 0x1
  12. #define ProcessInTransition 0x2
  13. //
  14. // Thread State Enumerated Type Values
  15. //
  16. #define Initialized 0x0
  17. #define Ready 0x1
  18. #define Running 0x2
  19. #define Standby 0x3
  20. #define Terminated 0x4
  21. #define Waiting 0x5
  22. //
  23. // Wait Reason and Wait Type Enumerated Type Values
  24. //
  25. #define WrExecutive 0x0
  26. #define WrEventPair 0xe
  27. #define WaitAny 0x1
  28. #define WaitAll 0x0
  29. //
  30. // Apc State Structure Offset Definitions
  31. //
  32. #define AsApcListHead 0x0
  33. #define AsProcess 0x20
  34. #define AsKernelApcInProgress 0x28
  35. #define AsKernelApcPending 0x29
  36. #define AsUserApcPending 0x2a
  37. //
  38. // Bug Check Code Definitions
  39. //
  40. #define APC_INDEX_MISMATCH 0x1
  41. #define ATTEMPTED_SWITCH_FROM_DPC 0xb8
  42. #define DATA_BUS_ERROR 0x2e
  43. #define DATA_COHERENCY_EXCEPTION 0x55
  44. #define HAL1_INITIALIZATION_FAILED 0x61
  45. #define INSTRUCTION_BUS_ERROR 0x2f
  46. #define INSTRUCTION_COHERENCY_EXCEPTION 0x56
  47. #define INTERRUPT_EXCEPTION_NOT_HANDLED 0x3d
  48. #define INTERRUPT_UNWIND_ATTEMPTED 0x3c
  49. #define INVALID_AFFINITY_SET 0x3
  50. #define INVALID_DATA_ACCESS_TRAP 0x4
  51. #define IRQL_GT_ZERO_AT_SYSTEM_SERVICE 0x4a
  52. #define IRQL_NOT_LESS_OR_EQUAL 0xa
  53. #define KMODE_EXCEPTION_NOT_HANDLED 0x1e
  54. #define NMI_HARDWARE_FAILURE 0x80
  55. #define NO_USER_MODE_CONTEXT 0xe
  56. #define PAGE_FAULT_WITH_INTERRUPTS_OFF 0x49
  57. #define PANIC_STACK_SWITCH 0x2b
  58. #define SPIN_LOCK_INIT_FAILURE 0x81
  59. #define SYSTEM_EXIT_OWNED_MUTEX 0x39
  60. #define SYSTEM_SERVICE_EXCEPTION 0x3b
  61. #define SYSTEM_UNWIND_PREVIOUS_USER 0x3a
  62. #define TRAP_CAUSE_UNKNOWN 0x12
  63. #define UNEXPECTED_KERNEL_MODE_TRAP 0x7f
  64. #define HARDWARE_INTERRUPT_STORM 0xf2
  65. //
  66. // Breakpoint type definitions
  67. //
  68. #define DBG_STATUS_CONTROL_C 0x1
  69. //
  70. // Client Id Structure Offset Definitions
  71. //
  72. #define CidUniqueProcess 0x0
  73. #define CidUniqueThread 0x8
  74. //
  75. // Critical Section Structure Offset Definitions
  76. //
  77. #define CsDebugInfo 0x0
  78. #define CsLockCount 0x8
  79. #define CsRecursionCount 0xc
  80. #define CsOwningThread 0x10
  81. #define CsLockSemaphore 0x18
  82. #define CsSpinCount 0x20
  83. //
  84. // Critical Section Debug Information Structure Offset Definitions
  85. //
  86. #define CsType 0x0
  87. #define CsCreatorBackTraceIndex 0x2
  88. #define CsCriticalSection 0x8
  89. #define CsProcessLocksList 0x10
  90. #define CsEntryCount 0x20
  91. #define CsContentionCount 0x24
  92. //
  93. // Exception Record Offset, Flag, and Enumerated Type Definitions
  94. //
  95. #define EXCEPTION_NONCONTINUABLE 0x1
  96. #define EXCEPTION_UNWINDING 0x2
  97. #define EXCEPTION_EXIT_UNWIND 0x4
  98. #define EXCEPTION_STACK_INVALID 0x8
  99. #define EXCEPTION_NESTED_CALL 0x10
  100. #define EXCEPTION_TARGET_UNWIND 0x20
  101. #define EXCEPTION_COLLIDED_UNWIND 0x40
  102. #define EXCEPTION_UNWIND 0x66
  103. #define EXCEPTION_EXECUTE_HANDLER 0x1
  104. #define EXCEPTION_CONTINUE_SEARCH 0x0
  105. #define EXCEPTION_CONTINUE_EXECUTION 0xffffffff
  106. #define ExceptionContinueExecution 0x0
  107. #define ExceptionContinueSearch 0x1
  108. #define ExceptionNestedException 0x2
  109. #define ExceptionCollidedUnwind 0x3
  110. #define ErExceptionCode 0x0
  111. #define ErExceptionFlags 0x4
  112. #define ErExceptionRecord 0x8
  113. #define ErExceptionAddress 0x10
  114. #define ErNumberParameters 0x18
  115. #define ErExceptionInformation 0x20
  116. #define ExceptionRecordLength 0xa0
  117. //
  118. // Fast Mutex Structure Offset Definitions
  119. //
  120. #define FmCount 0x0
  121. #define FmOwner 0x8
  122. #define FmContention 0x10
  123. #define FmEvent 0x18
  124. #define FmOldIrql 0x30
  125. //
  126. // Interrupt Priority Request Level Definitions
  127. //
  128. #define PASSIVE_LEVEL 0x0
  129. #define APC_LEVEL 0x1
  130. #define DISPATCH_LEVEL 0x2
  131. #define IPI_LEVEL 0xe
  132. #define POWER_LEVEL 0xf
  133. #define PROFILE_LEVEL 0xf
  134. #define HIGH_LEVEL 0xf
  135. #ifdef NT_UP
  136. #define SYNCH_LEVEL 0x2
  137. #else
  138. #define SYNCH_LEVEL 0xd
  139. #endif
  140. //
  141. // Large Integer Structure Offset Definitions
  142. //
  143. #define LiLowPart 0x0
  144. #define LiHighPart 0x4
  145. //
  146. // List Entry Structure Offset Definitions
  147. //
  148. #define LsFlink 0x0
  149. #define LsBlink 0x8
  150. //
  151. // String Structure Offset Definitions
  152. //
  153. #define StrLength 0x0
  154. #define StrMaximumLength 0x2
  155. #define StrBuffer 0x8
  156. //
  157. // Time Structure Offset Definitions
  158. //
  159. #define TmLowTime 0x0
  160. #define TmHighTime 0x4
  161. //
  162. // Thread Switch Counter Offset Definitions
  163. //
  164. #define TwFindAny 0x0
  165. #define TwFindIdeal 0x4
  166. #define TwFindLast 0x8
  167. #define TwIdleAny 0xc
  168. #define TwIdleCurrent 0x10
  169. #define TwIdleIdeal 0x14
  170. #define TwIdleLast 0x18
  171. #define TwPreemptAny 0x1c
  172. #define TwPreemptCurrent 0x20
  173. #define TwPreemptLast 0x24
  174. #define TwSwitchToIdle 0x28
  175. //
  176. // Status Code Definitions
  177. //
  178. #define STATUS_IA64_INVALID_STACK 0xc0000028
  179. #define STATUS_ACCESS_VIOLATION 0xc0000005
  180. #define STATUS_ARRAY_BOUNDS_EXCEEDED 0xc000008c
  181. #define STATUS_BAD_COMPRESSION_BUFFER 0xc0000242
  182. #define STATUS_BREAKPOINT 0x80000003
  183. #define STATUS_DATATYPE_MISALIGNMENT 0x80000002
  184. #define STATUS_FLOAT_DENORMAL_OPERAND 0xc000008d
  185. #define STATUS_FLOAT_DIVIDE_BY_ZERO 0xc000008e
  186. #define STATUS_FLOAT_INEXACT_RESULT 0xc000008f
  187. #define STATUS_FLOAT_INVALID_OPERATION 0xc0000090
  188. #define STATUS_FLOAT_OVERFLOW 0xc0000091
  189. #define STATUS_FLOAT_STACK_CHECK 0xc0000092
  190. #define STATUS_FLOAT_UNDERFLOW 0xc0000093
  191. #define STATUS_FLOAT_MULTIPLE_FAULTS 0xc00002b4
  192. #define STATUS_FLOAT_MULTIPLE_TRAPS 0xc00002b5
  193. #define STATUS_GUARD_PAGE_VIOLATION 0x80000001
  194. #define STATUS_ILLEGAL_FLOAT_CONTEXT 0xc000014a
  195. #define STATUS_ILLEGAL_INSTRUCTION 0xc000001d
  196. #define STATUS_INSTRUCTION_MISALIGNMENT 0xc00000aa
  197. #define STATUS_INVALID_HANDLE 0xc0000008
  198. #define STATUS_INVALID_LOCK_SEQUENCE 0xc000001e
  199. #define STATUS_INVALID_OWNER 0xc000005a
  200. #define STATUS_INVALID_PARAMETER_1 0xc00000ef
  201. #define STATUS_INVALID_SYSTEM_SERVICE 0xc000001c
  202. #define STATUS_INTEGER_DIVIDE_BY_ZERO 0xc0000094
  203. #define STATUS_INTEGER_OVERFLOW 0xc0000095
  204. #define STATUS_IN_PAGE_ERROR 0xc0000006
  205. #define STATUS_KERNEL_APC 0x100
  206. #define STATUS_LONGJUMP 0x80000026
  207. #define STATUS_NO_CALLBACK_ACTIVE 0xc0000258
  208. #define STATUS_NO_EVENT_PAIR 0xc000014e
  209. #define STATUS_PRIVILEGED_INSTRUCTION 0xc0000096
  210. #define STATUS_SINGLE_STEP 0x80000004
  211. #define STATUS_STACK_OVERFLOW 0xc00000fd
  212. #define STATUS_SUCCESS 0x0
  213. #define STATUS_THREAD_IS_TERMINATING 0xc000004b
  214. #define STATUS_TIMEOUT 0x102
  215. #define STATUS_UNWIND 0xc0000027
  216. #define STATUS_UNWIND_CONSOLIDATE 0x80000029
  217. #define STATUS_WAKE_SYSTEM_DEBUGGER 0x80000007
  218. //
  219. // APC Object Structure Offset Definitions
  220. //
  221. #define ApType 0x0
  222. #define ApSize 0x2
  223. #define ApThread 0x8
  224. #define ApApcListEntry 0x10
  225. #define ApKernelRoutine 0x20
  226. #define ApRundownRoutine 0x28
  227. #define ApNormalRoutine 0x30
  228. #define ApNormalContext 0x38
  229. #define ApSystemArgument1 0x40
  230. #define ApSystemArgument2 0x48
  231. #define ApApcStateIndex 0x50
  232. #define ApApcMode 0x51
  233. #define ApInserted 0x52
  234. #define ApcObjectLength 0x58
  235. //
  236. // DPC object Structure Offset Definitions
  237. //
  238. #define DpType 0x0
  239. #define DpNumber 0x2
  240. #define DpImportance 0x3
  241. #define DpDpcListEntry 0x8
  242. #define DpDeferredRoutine 0x18
  243. #define DpDeferredContext 0x20
  244. #define DpSystemArgument1 0x28
  245. #define DpSystemArgument2 0x30
  246. #define DpLock 0x38
  247. #define DpcObjectLength 0x40
  248. //
  249. // Device Queue Object Structure Offset Definitions
  250. //
  251. #define DvType 0x0
  252. #define DvSize 0x2
  253. #define DvDeviceListHead 0x8
  254. #define DvSpinLock 0x18
  255. #define DvBusy 0x20
  256. #define DeviceQueueObjectLength 0x28
  257. //
  258. // Device Queue Entry Structure Offset Definitions
  259. //
  260. #define DeDeviceListEntry 0x0
  261. #define DeSortKey 0x10
  262. #define DeInserted 0x14
  263. #define DeviceQueueEntryLength 0x18
  264. //
  265. // Event Object Structure Offset Definitions
  266. //
  267. #define EvType 0x0
  268. #define EvSize 0x2
  269. #define EvSignalState 0x4
  270. #define EvWaitListHead 0x8
  271. #define EventObjectLength 0x18
  272. //
  273. // Event Pair Object Structure Offset Definitions
  274. //
  275. #define EpType 0x0
  276. #define EpSize 0x2
  277. #define EpEventLow 0x8
  278. #define EpEventHigh 0x20
  279. #define SET_LOW_WAIT_HIGH 0xffffffd0
  280. #define SET_HIGH_WAIT_LOW 0xffffffe8
  281. #define SET_EVENT_PAIR_MASK 0x18
  282. //
  283. // Interrupt Object Structure Offset Definitions
  284. //
  285. #define InLevelSensitive 0x0
  286. #define InLatched 0x1
  287. #define InType 0x0
  288. #define InSize 0x2
  289. #define InInterruptListEntry 0x8
  290. #define InServiceRoutine 0x18
  291. #define InServiceContext 0x20
  292. #define InSpinLock 0x28
  293. #define InTickCount 0x30
  294. #define InActualLock 0x38
  295. #define InDispatchAddress 0x40
  296. #define InVector 0x48
  297. #define InIrql 0x4c
  298. #define InSynchronizeIrql 0x4d
  299. #define InFloatingSave 0x4e
  300. #define InConnected 0x4f
  301. #define InNumber 0x50
  302. #define InShareVector 0x51
  303. #define InMode 0x54
  304. #define InServiceCount 0x58
  305. #define InDispatchCount 0x5c
  306. #define InDispatchCode 0x60
  307. #define InterruptObjectLength 0x70
  308. //
  309. // Process Object Structure Offset Definitions
  310. //
  311. #define PrType 0x0
  312. #define PrSize 0x2
  313. #define PrSignalState 0x4
  314. #define PrProfileListHead 0x18
  315. #define PrDirectoryTableBase 0x28
  316. #define PrProcessRegion 0x38
  317. #define PrSessionMapInfo 0x48
  318. #define PrSessionParentBase 0x50
  319. #define PrActiveProcessors 0x58
  320. #define PrKernelTime 0x60
  321. #define PrUserTime 0x64
  322. #define PrReadyListHead 0x68
  323. #define PrSwapListEntry 0x78
  324. #define PrThreadListHead 0x88
  325. #define PrProcessLock 0x98
  326. #define PrAffinity 0xa0
  327. #define PrStackCount 0xa8
  328. #define PrBasePriority 0xaa
  329. #define PrThreadQuantum 0xab
  330. #define PrAutoAlignment 0xac
  331. #define PrState 0xad
  332. #define ProcessObjectLength 0xc0
  333. #define ExtendedProcessObjectLength 0x3d0
  334. //
  335. // Profile Object Structure Offset Definitions
  336. //
  337. #define PfType 0x0
  338. #define PfSize 0x2
  339. #define PfProfileListEntry 0x8
  340. #define PfProcess 0x18
  341. #define PfRangeBase 0x20
  342. #define PfRangeLimit 0x28
  343. #define PfBucketShift 0x30
  344. #define PfBuffer 0x38
  345. #define PfSegment 0x40
  346. #define PfAffinity 0x48
  347. #define PfSource 0x50
  348. #define PfStarted 0x52
  349. #define ProfileObjectLength 0x58
  350. //
  351. // Queue Object Structure Offset Definitions
  352. //
  353. #define QuType 0x0
  354. #define QuSize 0x2
  355. #define QuSignalState 0x4
  356. #define QuEntryListHead 0x18
  357. #define QuCurrentCount 0x28
  358. #define QuMaximumCount 0x2c
  359. #define QuThreadListHead 0x30
  360. #define QueueObjectLength 0x40
  361. //
  362. // Thread Object Structure Offset Definitions
  363. //
  364. #define EeKernelEventPair 0x0
  365. #define EtCid 0x3a0
  366. #define EtEthreadLength 0x460
  367. #define ThType 0x0
  368. #define ThSize 0x2
  369. #define ThSignalState 0x4
  370. #define ThMutantListHead 0x18
  371. #define ThInitialStack 0x28
  372. #define ThStackLimit 0x30
  373. #define ThTeb 0x50
  374. #define ThTlsArray 0x58
  375. #define ThKernelStack 0x60
  376. #define ThDebugActive 0x70
  377. #define ThState 0x71
  378. #define ThAlerted 0x72
  379. #define ThIopl 0x74
  380. #define ThNpxState 0x75
  381. #define ThSaturation 0x76
  382. #define ThPriority 0x77
  383. #define ThApcState 0x78
  384. #define ThIdleSwapBlock 0xac
  385. #define ThContextSwitches 0xa8
  386. #define ThWaitStatus 0xb0
  387. #define ThWaitIrql 0xb8
  388. #define ThWaitMode 0xb9
  389. #define ThWaitNext 0xba
  390. #define ThWaitReason 0xbb
  391. #define ThWaitBlockList 0xc0
  392. #define ThWaitListEntry 0xc8
  393. #define ThWaitTime 0xd8
  394. #define ThBasePriority 0xdc
  395. #define ThDecrementCount 0xdd
  396. #define ThPriorityDecrement 0xde
  397. #define ThQuantum 0xdf
  398. #define ThWaitBlock 0xe0
  399. #define ThKernelApcDisable 0x1a8
  400. #define ThUserAffinity 0x1b0
  401. #define ThSystemAffinityActive 0x1b8
  402. #define ThServiceTable 0x1c0
  403. #define ThQueue 0x1c8
  404. #define ThApcQueueLock 0x1d0
  405. #define ThTimer 0x1d8
  406. #define ThQueueListEntry 0x218
  407. #define ThAffinity 0x230
  408. #define ThPreempted 0x238
  409. #define ThProcessReadyQueue 0x239
  410. #define ThKernelStackResident 0x23a
  411. #define ThNextProcessor 0x23b
  412. #define ThCallbackStack 0x240
  413. #define ThWin32Thread 0x250
  414. #define ThTrapFrame 0x258
  415. #define ThApcStatePointer 0x260
  416. #define ThPreviousMode 0x270
  417. #define ThEnableStackSwap 0x271
  418. #define ThLargeStack 0x272
  419. #define ThKernelTime 0x274
  420. #define ThUserTime 0x278
  421. #define ThSavedApcState 0x280
  422. #define ThAlertable 0x2b0
  423. #define ThApcStateIndex 0x2b1
  424. #define ThApcQueueable 0x2b2
  425. #define ThAutoAlignment 0x2b3
  426. #define ThStackBase 0x2b8
  427. #define ThSuspendApc 0x2c0
  428. #define ThSuspendSemaphore 0x318
  429. #define ThThreadListEntry 0x338
  430. #define ThFreezeCount 0x348
  431. #define ThSuspendCount 0x349
  432. #define ThIdealProcessor 0x34a
  433. #define ThDisableBoost 0x34b
  434. #define ThSoftAffinity 0x228
  435. #define ThInitialBStore 0x38
  436. #define ThBStoreLimit 0x40
  437. #define ThNumber 0x48
  438. #define ThKernelBStore 0x68
  439. #define ThCallbackBStore 0x248
  440. #define ThreadObjectLength 0x350
  441. #define ExtendedThreadObjectLength 0x460
  442. #define EVENT_WAIT_BLOCK_OFFSET 0x140
  443. //
  444. // Timer object Structure Offset Definitions
  445. //
  446. #define TiType 0x0
  447. #define TiSize 0x2
  448. #define TiInserted 0x3
  449. #define TiSignalState 0x4
  450. #define TiDueTime 0x18
  451. #define TiTimerListEntry 0x20
  452. #define TiDpc 0x30
  453. #define TiPeriod 0x38
  454. #define TimerObjectLength 0x40
  455. #define TIMER_TABLE_SIZE 0x100
  456. //
  457. // Wait Block Structure Offset Definitions
  458. //
  459. #define WbWaitListEntry 0x0
  460. #define WbThread 0x10
  461. #define WbObject 0x18
  462. #define WbNextWaitBlock 0x20
  463. #define WbWaitKey 0x28
  464. #define WbWaitType 0x2a
  465. //
  466. // Fiber Structure Offset Definitions
  467. //
  468. #define FbFiberData 0x0
  469. #define FbExceptionList 0x8
  470. #define FbStackBase 0x10
  471. #define FbStackLimit 0x18
  472. #define FbDeallocationStack 0x20
  473. #define FbFiberContext 0x30
  474. #define FbWx86Tib 0xaa0
  475. #define FbDeallocationBStore 0xaa8
  476. #define FbBStoreLimit 0xab0
  477. //
  478. // Process Environment Block Structure Offset Definitions
  479. //
  480. #define PeKernelCallbackTable 0x58
  481. //
  482. // System Service Descriptor Table Structure Definitions
  483. //
  484. #define NUMBER_SERVICE_TABLES 0x4
  485. #define SERVICE_NUMBER_MASK 0xfff
  486. #define SERVICE_TABLE_SHIFT 0x7
  487. #define SERVICE_TABLE_MASK 0x60
  488. #define SERVICE_TABLE_TEST 0x20
  489. #define SdBase 0x0
  490. #define SdCount 0x8
  491. #define SdLimit 0x10
  492. #define SdTableBaseGpOffset 0x14
  493. #define SdNumber 0x18
  494. //
  495. // Thread Environment Block Structure Offset Definitions
  496. //
  497. #define TeCmTeb 0x0
  498. #define TeStackBase 0x8
  499. #define TeStackLimit 0x10
  500. #define TeFiberData 0x20
  501. #define TeSelf 0x30
  502. #define TeEnvironmentPointer 0x38
  503. #define TeClientId 0x40
  504. #define TeActiveRpcHandle 0x50
  505. #define TeThreadLocalStoragePointer 0x58
  506. #define TeCountOfOwnedCriticalSections 0x6c
  507. #define TePeb 0x60
  508. #define TeCsrClientThread 0x70
  509. #define TeWOW32Reserved 0x100
  510. #define TeSoftFpcr 0x10c
  511. #define TeExceptionCode 0x2c0
  512. #define TeGdiClientPID 0x7f0
  513. #define TeGdiClientTID 0x7f4
  514. #define TeGdiThreadLocalInfo 0x7f8
  515. #define TeglDispatchTable 0x9f0
  516. #define TeglReserved1 0x1138
  517. #define TeglReserved2 0x1220
  518. #define TeglSectionInfo 0x1228
  519. #define TeglSection 0x1230
  520. #define TeglTable 0x1238
  521. #define TeglCurrentRC 0x1240
  522. #define TeglContext 0x1248
  523. #define TeDeallocationStack 0x1478
  524. #define TeTlsSlots 0x1480
  525. #define TeVdm 0x1690
  526. #define TeGdiBatchCount 0x1740
  527. #define TeInstrumentation 0x16b8
  528. #define TeExceptionList 0x0
  529. #define TeDeallocationBStore 0x1788
  530. #define TeBStoreLimit 0x1790
  531. #define TeDbgSsReserved 0x16a0
  532. #define ThreadEnvironmentBlockLength 0x17c8
  533. #define CmThreadEnvironmentBlockOffset 0x2000
  534. //
  535. // Lock Queue Structure Offset Definitions
  536. //
  537. #define LOCK_QUEUE_WAIT 0x1
  538. #define LOCK_QUEUE_OWNER 0x2
  539. #define LOCK_QUEUE_HEADER_SIZE 0x10
  540. #define LockQueueDispatcherLock 0x0
  541. #define LockQueueContextSwapLock 0x1
  542. #define LqNext 0x0
  543. #define LqLock 0x8
  544. #define LqhNext 0x0
  545. #define LqhLock 0x8
  546. #define LqhOldIrql 0x10
  547. //
  548. // Performance Definitions
  549. //
  550. #define PERF_CONTEXTSWAP_OFFSET 0x4
  551. #define PERF_CONTEXTSWAP_FLAG 0x4
  552. #define PERF_DPC_OFFSET 0x4
  553. #define PERF_DPC_FLAG 0x80
  554. #define PERF_INTERRUPT_OFFSET 0x4
  555. #define PERF_INTERRUPT_FLAG 0x4000
  556. //
  557. // EPROCESS offset used for debugging.
  558. //
  559. #define PrWow64Process 0x2e8
  560. //
  561. // Processor OS_MCA HandOff Structure Offset Definitions
  562. //
  563. #define SalHandOffPalProcEntryPoint 0x0
  564. #define SalHandOffSalProcEntryPoint 0x8
  565. #define SalHandOffSalGlobalPointer 0x10
  566. #define SalHandOffRendezVousResult 0x18
  567. #define SalHandOffSalReturnAddress 0x20
  568. #define SalHandOffMinStateSavePtr 0x28
  569. //
  570. // Processor OS_INIT HandOff Structure Offset Definitions
  571. //
  572. #define OsHandOffResult 0x0
  573. #define OsHandOffSalGlobalPointer 0x8
  574. #define OsHandOffMinStateSavePtr 0x10
  575. #define OsHandOffSalReturnAddress 0x18
  576. #define OsHandOffNewContextFlag 0x20
  577. //
  578. // SAL Event Resouces Structure Offset Definitions
  579. //
  580. #define SerSalToOsHandOff 0x0
  581. #define SerOsToSalHandOff 0x30
  582. #define SerStateDumpPhysical 0x60
  583. #define SerBackStore 0x68
  584. #define SerBackStoreLimit 0x70
  585. #define SerStack 0x78
  586. #define SerStackLimit 0x80
  587. #define SerPTOM 0x88
  588. #define SerStackFrame 0x90
  589. #define SerEventPool 0xd0
  590. #define SerEventPoolSize 0xd8
  591. #define SER_EVENT_STACK_FRAME_ENTRIES 0x8
  592. //
  593. // PAL mini-save area Structure Offset Definitions
  594. //
  595. #define PmsIntNats 0x0
  596. #define PmsIntGp 0x8
  597. #define PmsIntT0 0x10
  598. #define PmsIntT1 0x18
  599. #define PmsIntS0 0x20
  600. #define PmsIntS1 0x28
  601. #define PmsIntS2 0x30
  602. #define PmsIntS3 0x38
  603. #define PmsIntV0 0x40
  604. #define PmsIntT2 0x48
  605. #define PmsIntT3 0x50
  606. #define PmsIntT4 0x58
  607. #define PmsIntSp 0x60
  608. #define PmsIntTeb 0x68
  609. #define PmsIntT5 0x70
  610. #define PmsIntT6 0x78
  611. #define PmsB0R16 0x80
  612. #define PmsIntT7 0x100
  613. #define PmsIntT8 0x108
  614. #define PmsIntT9 0x110
  615. #define PmsIntT10 0x118
  616. #define PmsIntT11 0x120
  617. #define PmsIntT12 0x128
  618. #define PmsIntT13 0x130
  619. #define PmsIntT14 0x138
  620. #define PmsIntT15 0x140
  621. #define PmsIntT16 0x148
  622. #define PmsIntT17 0x150
  623. #define PmsIntT18 0x158
  624. #define PmsIntT19 0x160
  625. #define PmsIntT20 0x168
  626. #define PmsIntT21 0x170
  627. #define PmsIntT22 0x178
  628. #define PmsPreds 0x180
  629. #define PmsBrRp 0x188
  630. #define PmsRsRSC 0x190
  631. #define PmsStIIP 0x198
  632. #define PmsStIPSR 0x1a0
  633. #define PmsStIFS 0x1a8
  634. #define PmsXIP 0x1b0
  635. #define PmsXPSR 0x1b8
  636. #define PmsXFS 0x1c0
  637. #define PalMiniSaveLength 0x1d0
  638. //
  639. // Processor Control Registers Structure Offset Definitions
  640. //
  641. #define PCR_MINOR_VERSION 0x1
  642. #define PCR_MAJOR_VERSION 0x1
  643. #define PcMinorVersion 0x0
  644. #define PcMajorVersion 0x4
  645. #define PcInterruptRoutine 0x300
  646. #define PcFirstLevelDcacheSize 0x8
  647. #define PcFirstLevelDcacheFillSize 0xc
  648. #define PcFirstLevelIcacheSize 0x10
  649. #define PcFirstLevelIcacheFillSize 0x14
  650. #define PcSecondLevelDcacheSize 0x18
  651. #define PcSecondLevelDcacheFillSize 0x1c
  652. #define PcSecondLevelIcacheSize 0x20
  653. #define PcSecondLevelIcacheFillSize 0x24
  654. #define PcPrcb 0xb18
  655. #define PcDcacheAlignment 0x28
  656. #define PcDcacheFillSize 0x2c
  657. #define PcIcacheAlignment 0x30
  658. #define PcIcacheFillSize 0x34
  659. #define PcProcessorId 0x38
  660. #define PcProfileInterval 0x3c
  661. #define PcProfileCount 0x40
  662. #define PcStallExecutionCount 0x44
  663. #define PcStallScaleFactor 0x48
  664. #define PcNumber 0xb28
  665. #define PcDebugActive 0xb29
  666. #define PcKernelDebugActive 0xb2a
  667. #define PcCurrentIrql 0xb2b
  668. #define PcSoftwareInterruptPending 0xb2c
  669. #define PcApcInterrupt 0xb2c
  670. #define PcDispatchInterrupt 0xb2d
  671. #define PcIrqlMask 0x280
  672. #define PcIrqlTable 0x2c0
  673. #define PcSetMember 0xb08
  674. #define PcCurrentThread 0xb20
  675. #define PcNotMember 0xb10
  676. #define PcSystemReserved 0x50
  677. #define PcHalReserved 0x80
  678. #define PcKernelGP 0xb58
  679. #define PcInitialStack 0xb60
  680. #define PcInitialBStore 0xb68
  681. #define PcStackLimit 0xb70
  682. #define PcBStoreLimit 0xb78
  683. #define PcPanicStack 0xb80
  684. #define PcSavedIIM 0xb88
  685. #define PcSavedIFA 0xb90
  686. #define PcForwardProgressBuffer 0xb98
  687. #define PcEOITable 0xb30
  688. #define PcInOsMca 0xb38
  689. #define PcInOsInit 0xb39
  690. #define PcInOsCmc 0xb3a
  691. #define PcInOsCpe 0xb3b
  692. #define PcOsMcaResourcePtr 0xb40
  693. #define PcHighFpOwner 0xb50
  694. #define PcInterruptionCount 0x4c
  695. #define PcPteUbase 0xc20
  696. #define PcPteKbase 0xc28
  697. #define PcPteSbase 0xc30
  698. #define PcPdeUbase 0xc38
  699. #define PcPdeKbase 0xc40
  700. #define PcPdeSbase 0xc48
  701. #define PcPdeUtbase 0xc50
  702. #define PcPdeKtbase 0xc58
  703. #define PcPdeStbase 0xc60
  704. #define MAX_NUMBER_OF_IHISTORY_RECORDS 0x80
  705. #define ProcessorControlRegisterLength 0xe30
  706. #define UsTickCountLow 0x0
  707. #define UsTickCountMultiplier 0x4
  708. #define UsInterruptTime 0x8
  709. #define UsSystemTime 0x14
  710. //
  711. // Processor Block Structure Offset Definitions
  712. //
  713. #define PRCB_MINOR_VERSION 0x1
  714. #define PRCB_MAJOR_VERSION 0x1
  715. #define PbMinorVersion 0x0
  716. #define PbMajorVersion 0x2
  717. #define PbCurrentThread 0x8
  718. #define PbNextThread 0x10
  719. #define PbIdleThread 0x18
  720. #define PbNumber 0x20
  721. #define PbBuildType 0x22
  722. #define PbSetMember 0x28
  723. #define PbRestartBlock 0x30
  724. #define PbPcrPage 0x38
  725. #define PbProcessorModel 0x50
  726. #define PbProcessorRevision 0x54
  727. #define PbProcessorFamily 0x58
  728. #define PbProcessorSerialNumber 0x60
  729. #define PbProcessorFeatureBits 0x68
  730. #define PbProcessorVendorString 0x70
  731. #define PbSystemReserved 0x80
  732. #define PbHalReserved 0xc0
  733. #define PbWakeIdle 0x21
  734. #define PbDpcTime 0x140
  735. #define PbInterruptTime 0x144
  736. #define PbKernelTime 0x148
  737. #define PbUserTime 0x14c
  738. #define PbAdjustDpcThreshold 0x1888
  739. #define PbInterruptCount 0x150
  740. #define PbDispatchInterruptCount 0x154
  741. #define PbIpiFrozen 0x188
  742. #define PbProcessorState 0x190
  743. #define PbCcFastReadNoWait 0x1050
  744. #define PbCcFastReadWait 0x1054
  745. #define PbCcFastReadNotPossible 0x1058
  746. #define PbCcCopyReadNoWait 0x105c
  747. #define PbCcCopyReadWait 0x1060
  748. #define PbCcCopyReadNoWaitMiss 0x1064
  749. #define PbAlignmentFixupCount 0x1068
  750. #define PbContextSwitches 0x106c
  751. #define PbDcacheFlushCount 0x1070
  752. #define PbExceptionDispatchCount 0x1074
  753. #define PbFirstLevelTbFills 0x1078
  754. #define PbFloatingEmulationCount 0x107c
  755. #define PbIcacheFlushCount 0x1080
  756. #define PbSecondLevelTbFills 0x1084
  757. #define PbSystemCalls 0x1088
  758. #define PbLockQueue 0x15e8
  759. #define PbReservedCounter 0x108c
  760. #define PbPacketBarrier 0x16fc
  761. #define PbCurrentPacket 0x1700
  762. #define PbTargetSet 0x1718
  763. #define PbWorkerRoutine 0x1720
  764. #define PbCachePad1 0x1730
  765. #define PbRequestSummary 0x1780
  766. #define PbSignalDone 0x1788
  767. #define PbDpcInterruptRequested 0x1800
  768. #define PbMaximumDpcQueueDepth 0x1880
  769. #define PbMinimumDpcRate 0x1884
  770. #define PbIpiCounts 0x18c8
  771. #define PbStartCount 0x1890
  772. #define PbDpcLock 0x18a8
  773. #define PbDpcListHead 0x1898
  774. #define PbDpcQueueDepth 0x18c0
  775. #define PbDpcCount 0x18b0
  776. #define PbDpcLastCount 0x18b4
  777. #define PbDpcRequestRate 0x188c
  778. #define PbDpcRoutineActive 0x18bc
  779. #define PbQuantumEnd 0x18b8
  780. #define PbSkipTick 0x18c4
  781. #define ProcessorBlockLength 0x1a40
  782. //
  783. // Immediate Interprocessor Command Definitions
  784. //
  785. #define IPI_APC 0x1
  786. #define IPI_DPC 0x2
  787. #define IPI_FREEZE 0x4
  788. #define IPI_PACKET_READY 0x8
  789. //
  790. // Interprocessor Interrupt Count Structure Offset Definitions
  791. //
  792. #define IcFreeze 0x0
  793. #define IcPacket 0x4
  794. #define IcDPC 0x8
  795. #define IcAPC 0xc
  796. #define IcFlushSingleTb 0x10
  797. #define IcFlushMultipleTb 0x14
  798. #define IcFlushEntireTb 0x18
  799. #define IcGenericCall 0x1c
  800. #define IcChangeColor 0x20
  801. #define IcSweepDcache 0x24
  802. #define IcSweepIcache 0x28
  803. #define IcSweepIcacheRange 0x2c
  804. #define IcFlushIoBuffers 0x30
  805. #define IcGratuitousDPC 0x34
  806. //
  807. // Context Frame Offset and Flag Definitions
  808. //
  809. #define CONTEXT_FULL 0x8002f
  810. #define CONTEXT_CONTROL 0x80001
  811. #define CONTEXT_INTEGER 0x80008
  812. #define CONTEXT_LOWER_FLOATING_POINT 0x80002
  813. #define CONTEXT_HIGHER_FLOATING_POINT 0x80004
  814. #define CONTEXT_FLOATING_POINT 0x80006
  815. #define CONTEXT_DEBUG 0x80010
  816. #define CONTEXT_IA32_CONTROL 0x80020
  817. #define CxContextFlags 0x0
  818. #define CxDbI0 0x10
  819. #define CxDbI1 0x18
  820. #define CxDbI2 0x20
  821. #define CxDbI3 0x28
  822. #define CxDbI4 0x30
  823. #define CxDbI5 0x38
  824. #define CxDbI6 0x40
  825. #define CxDbI7 0x48
  826. #define CxDbD0 0x50
  827. #define CxDbD1 0x58
  828. #define CxDbD2 0x60
  829. #define CxDbD3 0x68
  830. #define CxDbD4 0x70
  831. #define CxDbD5 0x78
  832. #define CxDbD6 0x80
  833. #define CxDbD7 0x88
  834. #define CxFltS0 0x90
  835. #define CxFltS1 0xa0
  836. #define CxFltS2 0xb0
  837. #define CxFltS3 0xc0
  838. #define CxFltT0 0xd0
  839. #define CxFltT1 0xe0
  840. #define CxFltT2 0xf0
  841. #define CxFltT3 0x100
  842. #define CxFltT4 0x110
  843. #define CxFltT5 0x120
  844. #define CxFltT6 0x130
  845. #define CxFltT7 0x140
  846. #define CxFltT8 0x150
  847. #define CxFltT9 0x160
  848. #define CxFltS4 0x170
  849. #define CxFltS5 0x180
  850. #define CxFltS6 0x190
  851. #define CxFltS7 0x1a0
  852. #define CxFltS8 0x1b0
  853. #define CxFltS9 0x1c0
  854. #define CxFltS10 0x1d0
  855. #define CxFltS11 0x1e0
  856. #define CxFltS12 0x1f0
  857. #define CxFltS13 0x200
  858. #define CxFltS14 0x210
  859. #define CxFltS15 0x220
  860. #define CxFltS16 0x230
  861. #define CxFltS17 0x240
  862. #define CxFltS18 0x250
  863. #define CxFltS19 0x260
  864. #define CxFltF32 0x270
  865. #define CxFltF33 0x280
  866. #define CxFltF34 0x290
  867. #define CxFltF35 0x2a0
  868. #define CxFltF36 0x2b0
  869. #define CxFltF37 0x2c0
  870. #define CxFltF38 0x2d0
  871. #define CxFltF39 0x2e0
  872. #define CxFltF40 0x2f0
  873. #define CxFltF41 0x300
  874. #define CxFltF42 0x310
  875. #define CxFltF43 0x320
  876. #define CxFltF44 0x330
  877. #define CxFltF45 0x340
  878. #define CxFltF46 0x350
  879. #define CxFltF47 0x360
  880. #define CxFltF48 0x370
  881. #define CxFltF49 0x380
  882. #define CxFltF50 0x390
  883. #define CxFltF51 0x3a0
  884. #define CxFltF52 0x3b0
  885. #define CxFltF53 0x3c0
  886. #define CxFltF54 0x3d0
  887. #define CxFltF55 0x3e0
  888. #define CxFltF56 0x3f0
  889. #define CxFltF57 0x400
  890. #define CxFltF58 0x410
  891. #define CxFltF59 0x420
  892. #define CxFltF60 0x430
  893. #define CxFltF61 0x440
  894. #define CxFltF62 0x450
  895. #define CxFltF63 0x460
  896. #define CxFltF64 0x470
  897. #define CxFltF65 0x480
  898. #define CxFltF66 0x490
  899. #define CxFltF67 0x4a0
  900. #define CxFltF68 0x4b0
  901. #define CxFltF69 0x4c0
  902. #define CxFltF70 0x4d0
  903. #define CxFltF71 0x4e0
  904. #define CxFltF72 0x4f0
  905. #define CxFltF73 0x500
  906. #define CxFltF74 0x510
  907. #define CxFltF75 0x520
  908. #define CxFltF76 0x530
  909. #define CxFltF77 0x540
  910. #define CxFltF78 0x550
  911. #define CxFltF79 0x560
  912. #define CxFltF80 0x570
  913. #define CxFltF81 0x580
  914. #define CxFltF82 0x590
  915. #define CxFltF83 0x5a0
  916. #define CxFltF84 0x5b0
  917. #define CxFltF85 0x5c0
  918. #define CxFltF86 0x5d0
  919. #define CxFltF87 0x5e0
  920. #define CxFltF88 0x5f0
  921. #define CxFltF89 0x600
  922. #define CxFltF90 0x610
  923. #define CxFltF91 0x620
  924. #define CxFltF92 0x630
  925. #define CxFltF93 0x640
  926. #define CxFltF94 0x650
  927. #define CxFltF95 0x660
  928. #define CxFltF96 0x670
  929. #define CxFltF97 0x680
  930. #define CxFltF98 0x690
  931. #define CxFltF99 0x6a0
  932. #define CxFltF100 0x6b0
  933. #define CxFltF101 0x6c0
  934. #define CxFltF102 0x6d0
  935. #define CxFltF103 0x6e0
  936. #define CxFltF104 0x6f0
  937. #define CxFltF105 0x700
  938. #define CxFltF106 0x710
  939. #define CxFltF107 0x720
  940. #define CxFltF108 0x730
  941. #define CxFltF109 0x740
  942. #define CxFltF110 0x750
  943. #define CxFltF111 0x760
  944. #define CxFltF112 0x770
  945. #define CxFltF113 0x780
  946. #define CxFltF114 0x790
  947. #define CxFltF115 0x7a0
  948. #define CxFltF116 0x7b0
  949. #define CxFltF117 0x7c0
  950. #define CxFltF118 0x7d0
  951. #define CxFltF119 0x7e0
  952. #define CxFltF120 0x7f0
  953. #define CxFltF121 0x800
  954. #define CxFltF122 0x810
  955. #define CxFltF123 0x820
  956. #define CxFltF124 0x830
  957. #define CxFltF125 0x840
  958. #define CxFltF126 0x850
  959. #define CxFltF127 0x860
  960. #define CxStFPSR 0x870
  961. #define CxIntGp 0x878
  962. #define CxIntT0 0x880
  963. #define CxIntT1 0x888
  964. #define CxIntS0 0x890
  965. #define CxIntS1 0x898
  966. #define CxIntS2 0x8a0
  967. #define CxIntS3 0x8a8
  968. #define CxIntV0 0x8b0
  969. #define CxIntT2 0x8b8
  970. #define CxIntT3 0x8c0
  971. #define CxIntT4 0x8c8
  972. #define CxIntSp 0x8d0
  973. #define CxIntTeb 0x8d8
  974. #define CxIntT5 0x8e0
  975. #define CxIntT6 0x8e8
  976. #define CxIntT7 0x8f0
  977. #define CxIntT8 0x8f8
  978. #define CxIntT9 0x900
  979. #define CxIntT10 0x908
  980. #define CxIntT11 0x910
  981. #define CxIntT12 0x918
  982. #define CxIntT13 0x920
  983. #define CxIntT14 0x928
  984. #define CxIntT15 0x930
  985. #define CxIntT16 0x938
  986. #define CxIntT17 0x940
  987. #define CxIntT18 0x948
  988. #define CxIntT19 0x950
  989. #define CxIntT20 0x958
  990. #define CxIntT21 0x960
  991. #define CxIntT22 0x968
  992. #define CxIntNats 0x970
  993. #define CxPreds 0x978
  994. #define CxBrRp 0x980
  995. #define CxBrS0 0x988
  996. #define CxBrS1 0x990
  997. #define CxBrS2 0x998
  998. #define CxBrS3 0x9a0
  999. #define CxBrS4 0x9a8
  1000. #define CxBrT0 0x9b0
  1001. #define CxBrT1 0x9b8
  1002. #define CxApUNAT 0x9c0
  1003. #define CxApLC 0x9c8
  1004. #define CxApEC 0x9d0
  1005. #define CxApCCV 0x9d8
  1006. #define CxApDCR 0x9e0
  1007. #define CxRsPFS 0x9e8
  1008. #define CxRsBSP 0x9f0
  1009. #define CxRsBSPSTORE 0x9f8
  1010. #define CxRsRSC 0xa00
  1011. #define CxRsRNAT 0xa08
  1012. #define CxStIPSR 0xa10
  1013. #define CxStIIP 0xa18
  1014. #define CxStIFS 0xa20
  1015. #define CxStFCR 0xa28
  1016. #define CxEflag 0xa30
  1017. #define CxSegCSD 0xa38
  1018. #define CxSegSSD 0xa40
  1019. #define CxCflag 0xa48
  1020. #define CxStFSR 0xa50
  1021. #define CxStFIR 0xa58
  1022. #define CxStFDR 0xa60
  1023. #define ContextFrameLength 0xa70
  1024. //
  1025. // Dispatcher Context Structure Offset Definitions
  1026. //
  1027. #define DcControlPc 0x10
  1028. #define DcFunctionEntry 0x20
  1029. #define DcEstablisherFrame 0x0
  1030. #define DcContextRecord 0x28
  1031. //
  1032. // Debug Register Offset Definitions and Length
  1033. //
  1034. #define TsAr21 0x0
  1035. #define TsAr24 0x8
  1036. #define TsAr25 0x10
  1037. #define TsAr26 0x18
  1038. #define TsAr27 0x20
  1039. #define TsAr28 0x28
  1040. #define TsAr29 0x30
  1041. #define TsAr30 0x38
  1042. //
  1043. // Higher FP Volatile Offset Definitions and Length
  1044. //
  1045. #define HiFltF32 0x0
  1046. #define HiFltF33 0x10
  1047. #define HiFltF34 0x20
  1048. #define HiFltF35 0x30
  1049. #define HiFltF36 0x40
  1050. #define HiFltF37 0x50
  1051. #define HiFltF38 0x60
  1052. #define HiFltF39 0x70
  1053. #define HiFltF40 0x80
  1054. #define HiFltF41 0x90
  1055. #define HiFltF42 0xa0
  1056. #define HiFltF43 0xb0
  1057. #define HiFltF44 0xc0
  1058. #define HiFltF45 0xd0
  1059. #define HiFltF46 0xe0
  1060. #define HiFltF47 0xf0
  1061. #define HiFltF48 0x100
  1062. #define HiFltF49 0x110
  1063. #define HiFltF50 0x120
  1064. #define HiFltF51 0x130
  1065. #define HiFltF52 0x140
  1066. #define HiFltF53 0x150
  1067. #define HiFltF54 0x160
  1068. #define HiFltF55 0x170
  1069. #define HiFltF56 0x180
  1070. #define HiFltF57 0x190
  1071. #define HiFltF58 0x1a0
  1072. #define HiFltF59 0x1b0
  1073. #define HiFltF60 0x1c0
  1074. #define HiFltF61 0x1d0
  1075. #define HiFltF62 0x1e0
  1076. #define HiFltF63 0x1f0
  1077. #define HiFltF64 0x200
  1078. #define HiFltF65 0x210
  1079. #define HiFltF66 0x220
  1080. #define HiFltF67 0x230
  1081. #define HiFltF68 0x240
  1082. #define HiFltF69 0x250
  1083. #define HiFltF70 0x260
  1084. #define HiFltF71 0x270
  1085. #define HiFltF72 0x280
  1086. #define HiFltF73 0x290
  1087. #define HiFltF74 0x2a0
  1088. #define HiFltF75 0x2b0
  1089. #define HiFltF76 0x2c0
  1090. #define HiFltF77 0x2d0
  1091. #define HiFltF78 0x2e0
  1092. #define HiFltF79 0x2f0
  1093. #define HiFltF80 0x300
  1094. #define HiFltF81 0x310
  1095. #define HiFltF82 0x320
  1096. #define HiFltF83 0x330
  1097. #define HiFltF84 0x340
  1098. #define HiFltF85 0x350
  1099. #define HiFltF86 0x360
  1100. #define HiFltF87 0x370
  1101. #define HiFltF88 0x380
  1102. #define HiFltF89 0x390
  1103. #define HiFltF90 0x3a0
  1104. #define HiFltF91 0x3b0
  1105. #define HiFltF92 0x3c0
  1106. #define HiFltF93 0x3d0
  1107. #define HiFltF94 0x3e0
  1108. #define HiFltF95 0x3f0
  1109. #define HiFltF96 0x400
  1110. #define HiFltF97 0x410
  1111. #define HiFltF98 0x420
  1112. #define HiFltF99 0x430
  1113. #define HiFltF100 0x440
  1114. #define HiFltF101 0x450
  1115. #define HiFltF102 0x460
  1116. #define HiFltF103 0x470
  1117. #define HiFltF104 0x480
  1118. #define HiFltF105 0x490
  1119. #define HiFltF106 0x4a0
  1120. #define HiFltF107 0x4b0
  1121. #define HiFltF108 0x4c0
  1122. #define HiFltF109 0x4d0
  1123. #define HiFltF110 0x4e0
  1124. #define HiFltF111 0x4f0
  1125. #define HiFltF112 0x500
  1126. #define HiFltF113 0x510
  1127. #define HiFltF114 0x520
  1128. #define HiFltF115 0x530
  1129. #define HiFltF116 0x540
  1130. #define HiFltF117 0x550
  1131. #define HiFltF118 0x560
  1132. #define HiFltF119 0x570
  1133. #define HiFltF120 0x580
  1134. #define HiFltF121 0x590
  1135. #define HiFltF122 0x5a0
  1136. #define HiFltF123 0x5b0
  1137. #define HiFltF124 0x5c0
  1138. #define HiFltF125 0x5d0
  1139. #define HiFltF126 0x5e0
  1140. #define HiFltF127 0x5f0
  1141. //
  1142. // Debug Register Offset Definitions and Length
  1143. //
  1144. #define DrDbI0 0x0
  1145. #define DrDbI1 0x8
  1146. #define DrDbI2 0x10
  1147. #define DrDbI3 0x18
  1148. #define DrDbI4 0x20
  1149. #define DrDbI5 0x28
  1150. #define DrDbI6 0x30
  1151. #define DrDbI7 0x38
  1152. #define DrDbD0 0x40
  1153. #define DrDbD1 0x48
  1154. #define DrDbD2 0x50
  1155. #define DrDbD3 0x58
  1156. #define DrDbD4 0x60
  1157. #define DrDbD5 0x68
  1158. #define DrDbD6 0x70
  1159. #define DrDbD7 0x78
  1160. #define TsAppRegisters 0x0
  1161. #define TsPerfRegisters 0x40
  1162. #define TsHigherFPVolatile 0x80
  1163. #define TsDebugRegisters 0x680
  1164. #define ThreadStateSaveAreaLength 0x700
  1165. //
  1166. // Exception Frame Offset Definitions and Length
  1167. //
  1168. #define ExFltS0 0x60
  1169. #define ExFltS1 0x70
  1170. #define ExFltS2 0x80
  1171. #define ExFltS3 0x90
  1172. #define ExFltS4 0xa0
  1173. #define ExFltS5 0xb0
  1174. #define ExFltS6 0xc0
  1175. #define ExFltS7 0xd0
  1176. #define ExFltS8 0xe0
  1177. #define ExFltS9 0xf0
  1178. #define ExFltS10 0x100
  1179. #define ExFltS11 0x110
  1180. #define ExFltS12 0x120
  1181. #define ExFltS13 0x130
  1182. #define ExFltS14 0x140
  1183. #define ExFltS15 0x150
  1184. #define ExFltS16 0x160
  1185. #define ExFltS17 0x170
  1186. #define ExFltS18 0x180
  1187. #define ExFltS19 0x190
  1188. #define ExIntS0 0x18
  1189. #define ExIntS1 0x20
  1190. #define ExIntS2 0x28
  1191. #define ExIntS3 0x30
  1192. #define ExIntNats 0x10
  1193. #define ExBrS0 0x38
  1194. #define ExBrS1 0x40
  1195. #define ExBrS2 0x48
  1196. #define ExBrS3 0x50
  1197. #define ExBrS4 0x58
  1198. #define ExApEC 0x0
  1199. #define ExApLC 0x8
  1200. #define ExceptionFrameLength 0x1a0
  1201. //
  1202. // Switch Frame Offset Definitions and Length
  1203. //
  1204. #define SwExFrame 0x30
  1205. #define SwPreds 0x0
  1206. #define SwRp 0x8
  1207. #define SwPFS 0x10
  1208. #define SwFPSR 0x18
  1209. #define SwBsp 0x20
  1210. #define SwRnat 0x28
  1211. #define SwitchFrameLength 0x1d0
  1212. //
  1213. // Plabel structure offset definitions
  1214. //
  1215. #define PlEntryPoint 0x0
  1216. #define PlGlobalPointer 0x8
  1217. //
  1218. // Jump Offset Definitions and Length
  1219. //
  1220. #define JbRegistration 0x18
  1221. #define JbTryLevel 0x1c
  1222. #define JbCookie 0x20
  1223. #define JbUnwindFunc 0x24
  1224. #define JbUnwindData 0x28
  1225. #define JbFPSR 0x180
  1226. #define JbFltS0 0x40
  1227. #define JbFltS1 0x50
  1228. #define JbFltS2 0x60
  1229. #define JbFltS3 0x70
  1230. #define JbFltS4 0x80
  1231. #define JbFltS5 0x90
  1232. #define JbFltS6 0xa0
  1233. #define JbFltS7 0xb0
  1234. #define JbFltS8 0xc0
  1235. #define JbFltS9 0xd0
  1236. #define JbFltS10 0xe0
  1237. #define JbFltS11 0xf0
  1238. #define JbFltS12 0x100
  1239. #define JbFltS13 0x110
  1240. #define JbFltS14 0x120
  1241. #define JbFltS15 0x130
  1242. #define JbFltS16 0x140
  1243. #define JbFltS17 0x150
  1244. #define JbFltS18 0x160
  1245. #define JbFltS19 0x170
  1246. #define JbStIIP 0x188
  1247. #define JbBrS0 0x190
  1248. #define JbBrS1 0x198
  1249. #define JbBrS2 0x1a0
  1250. #define JbBrS3 0x1a8
  1251. #define JbBrS4 0x1b0
  1252. #define JbRsBSP 0x1d8
  1253. #define JbRsPFS 0x1e0
  1254. #define JbApUNAT 0x1e8
  1255. #define JbApLC 0x1f0
  1256. #define JbIntS0 0x1b8
  1257. #define JbIntS1 0x1c0
  1258. #define JbIntS2 0x1c8
  1259. #define JbIntS3 0x1d0
  1260. #define JbIntSp 0x1f8
  1261. #define JbIntNats 0x200
  1262. #define JbPreds 0x208
  1263. #define JumpBufferLength 0x210
  1264. //
  1265. // Trap Frame Offset Definitions and Length
  1266. //
  1267. #define TrFltT0 0x50
  1268. #define TrFltT1 0x60
  1269. #define TrFltT2 0x70
  1270. #define TrFltT3 0x80
  1271. #define TrFltT4 0x90
  1272. #define TrFltT5 0xa0
  1273. #define TrFltT6 0xb0
  1274. #define TrFltT7 0xc0
  1275. #define TrFltT8 0xd0
  1276. #define TrFltT9 0xe0
  1277. #define TrIntGp 0xf0
  1278. #define TrIntT0 0xf8
  1279. #define TrIntT1 0x100
  1280. #define TrApUNAT 0x108
  1281. #define TrApCCV 0x110
  1282. #define TrApDCR 0x118
  1283. #define TrPreds 0x120
  1284. #define TrIntV0 0x128
  1285. #define TrIntT2 0x130
  1286. #define TrIntT3 0x138
  1287. #define TrIntT4 0x140
  1288. #define TrIntSp 0x148
  1289. #define TrIntTeb 0x150
  1290. #define TrIntT5 0x158
  1291. #define TrIntT6 0x160
  1292. #define TrIntT7 0x168
  1293. #define TrIntT8 0x170
  1294. #define TrIntT9 0x178
  1295. #define TrIntT10 0x180
  1296. #define TrIntT11 0x188
  1297. #define TrIntT12 0x190
  1298. #define TrIntT13 0x198
  1299. #define TrIntT14 0x1a0
  1300. #define TrIntT15 0x1a8
  1301. #define TrIntT16 0x1b0
  1302. #define TrIntT17 0x1b8
  1303. #define TrIntT18 0x1c0
  1304. #define TrIntT19 0x1c8
  1305. #define TrIntT20 0x1d0
  1306. #define TrIntT21 0x1d8
  1307. #define TrIntT22 0x1e0
  1308. #define TrIntNats 0x1e8
  1309. #define TrBrRp 0x1f0
  1310. #define TrBrT0 0x1f8
  1311. #define TrBrT1 0x200
  1312. #define TrRsPFS 0x228
  1313. #define TrRsBSP 0x210
  1314. #define TrRsRSC 0x208
  1315. #define TrRsRNAT 0x220
  1316. #define TrRsBSPSTORE 0x218
  1317. #define TrStIPSR 0x230
  1318. #define TrStISR 0x250
  1319. #define TrStIFA 0x258
  1320. #define TrStIIP 0x238
  1321. #define TrStIIPA 0x260
  1322. #define TrStIFS 0x240
  1323. #define TrStIIM 0x268
  1324. #define TrStIHA 0x270
  1325. #define TrStFPSR 0x248
  1326. #define TrOldIrql 0x278
  1327. #define TrPreviousMode 0x27c
  1328. #define TrTrapFrame 0x280
  1329. #define TrHandler 0x328
  1330. #define TrEOFMarker 0x330
  1331. #define TrExceptionRecord 0x288
  1332. #define TrapFrameLength 0x340
  1333. #define TrapFrameArguments 0x40
  1334. #define KTRAP_FRAME_EOF 0xe0f0e0f0e0f0e000
  1335. //
  1336. // Usermode callout kernel frame definitions
  1337. //
  1338. #define CuBrRp 0x0
  1339. #define CuRsPFS 0x8
  1340. #define CuPreds 0x10
  1341. #define CuApUNAT 0x18
  1342. #define CuApLC 0x20
  1343. #define CuIntS0 0x38
  1344. #define CuIntS1 0x40
  1345. #define CuIntS2 0x48
  1346. #define CuIntS3 0x50
  1347. #define CuBrS0 0x58
  1348. #define CuBrS1 0x60
  1349. #define CuBrS2 0x68
  1350. #define CuBrS3 0x70
  1351. #define CuBrS4 0x78
  1352. #define CuRsRNAT 0x28
  1353. #define CuIntNats 0x30
  1354. #define CuFltS0 0x80
  1355. #define CuFltS1 0x90
  1356. #define CuFltS2 0xa0
  1357. #define CuFltS3 0xb0
  1358. #define CuFltS4 0xc0
  1359. #define CuFltS5 0xd0
  1360. #define CuFltS6 0xe0
  1361. #define CuFltS7 0xf0
  1362. #define CuFltS8 0x100
  1363. #define CuFltS9 0x110
  1364. #define CuFltS10 0x120
  1365. #define CuFltS11 0x130
  1366. #define CuFltS12 0x140
  1367. #define CuFltS13 0x150
  1368. #define CuFltS14 0x160
  1369. #define CuFltS15 0x170
  1370. #define CuFltS16 0x180
  1371. #define CuFltS17 0x190
  1372. #define CuFltS18 0x1a0
  1373. #define CuFltS19 0x1b0
  1374. #define CuA0 0x1c0
  1375. #define CuA1 0x1c8
  1376. #define CuCbStk 0x1d0
  1377. #define CuInStack 0x1d8
  1378. #define CuCbBStore 0x1e0
  1379. #define CuInBStore 0x1e8
  1380. #define CuTrFrame 0x1f0
  1381. #define CuTrStIIP 0x1f8
  1382. #define CuFrameLength 0x200
  1383. //
  1384. // Usermode callout user frame definitions
  1385. //
  1386. #define CkBuffer 0x0
  1387. #define CkLength 0x8
  1388. #define CkApiNumber 0xc
  1389. #define CkIntSp 0x10
  1390. #define CkRsPFS 0x18
  1391. #define CkBrRp 0x20
  1392. //
  1393. // Loader Parameter Block Offset Definitions
  1394. //
  1395. #define LpbLoadOrderListHead 0x0
  1396. #define LpbMemoryDescriptorListHead 0x10
  1397. #define LpbKernelStack 0x30
  1398. #define LpbPrcb 0x38
  1399. #define LpbProcess 0x40
  1400. #define LpbThread 0x48
  1401. #define LpbAcpiRsdt 0x108
  1402. #define LpbKernelPhysicalBase 0xc0
  1403. #define LpbKernelVirtualBase 0xc8
  1404. #define LpbInterruptStack 0xd0
  1405. #define LpbPanicStack 0xd8
  1406. #define LpbPcrPage 0xe0
  1407. #define LpbPdrPage 0xe8
  1408. #define LpbPcrPage2 0xf0
  1409. #define LpbMachineType 0xb8
  1410. //
  1411. // Address Space Layout Definitions
  1412. //
  1413. #define UREGION_INDEX 0x0
  1414. #define KSEG0_BASE 0xe000000080000000
  1415. #define KSEG2_BASE 0xe0000000a0000000
  1416. #define KADDRESS_BASE 0xe000000000000000
  1417. #define UADDRESS_BASE 0x0
  1418. #define SADDRESS_BASE 0x2000000000000000
  1419. #define SYSTEM_BASE 0xe0000000c3000000
  1420. #define KSEG3_BASE 0x8000000000000000
  1421. #define KSEG3_LIMIT 0x8000100000000000
  1422. //
  1423. // Page Table and Directory Entry Definitions
  1424. //
  1425. #define PAGE_SIZE 0x2000
  1426. #define PAGE_SHIFT 0xd
  1427. #define PDI_SHIFT 0x17
  1428. #define PTI_SHIFT 0xd
  1429. #define PTE_SHIFT 0x3
  1430. #define VHPT_PDE_BITS 0x28
  1431. //
  1432. // Breakpoint Definitions
  1433. //
  1434. #define USER_BREAKPOINT 0x80002
  1435. #define KERNEL_BREAKPOINT 0x80001
  1436. #define BREAKPOINT_BREAKIN 0x80019
  1437. #define UNKNOWN_ERROR_BREAK 0x0
  1438. #define INTEGER_DIVIDE_BY_ZERO_BREAK 0x1
  1439. #define INTEGER_OVERFLOW_BREAK 0x2
  1440. #define RANGE_CHECK_BREAK 0x3
  1441. #define NULL_POINTER_DEFERENCE_BREAK 0x4
  1442. #define MISALIGNED_DATA_BREAK 0x5
  1443. #define DECIMAL_OVERFLOW_BREAK 0x6
  1444. #define DECIMAL_DIVIDE_BY_ZERO_BREAK 0x7
  1445. #define PACKED_DECIMAL_ERROR_BREAK 0x8
  1446. #define INVALID_ASCII_DIGIT_BREAK 0x9
  1447. #define INVALID_DECIMAL_DIGIT_BREAK 0xa
  1448. #define PARAGRAPH_STACK_OVERFLOW_BREAK 0xb
  1449. #define BREAKPOINT_PRINT 0x80014
  1450. #define BREAKPOINT_PROMPT 0x80015
  1451. #define BREAKPOINT_STOP 0x80016
  1452. #define BREAKPOINT_LOAD_SYMBOLS 0x80017
  1453. #define BREAKPOINT_UNLOAD_SYMBOLS 0x80018
  1454. #define BREAKPOINT_COMMAND_STRING 0x8001a
  1455. //
  1456. // IA64 Specific Definitions
  1457. //
  1458. #define BREAK_APP_BASE 0x40000
  1459. #define BREAK_DEBUG_BASE 0x80000
  1460. #define BREAK_SYSCALL_BASE 0x180000
  1461. #define BREAK_SYSCALL 0x180000
  1462. #define BREAK_FASTSYS_BASE 0x1c0000
  1463. #define BREAK_SET_LOW_WAIT_HIGH 0x1c0020
  1464. #define BREAK_SET_HIGH_WAIT_LOW 0x1c0010
  1465. #define SYSCALL_FRAME 0x0
  1466. #define INTERRUPT_FRAME 0x1
  1467. #define EXCEPTION_FRAME 0x2
  1468. #define CONTEXT_FRAME 0xa
  1469. //
  1470. // Miscellaneous Definitions
  1471. //
  1472. #define Executive 0x0
  1473. #define KernelMode 0x0
  1474. #define UserMode 0x1
  1475. #define FALSE 0x0
  1476. #define TRUE 0x1
  1477. #define KiPcr 0xe0000000ffff0000
  1478. #define KiPcr2 0xe0000000fffe0000
  1479. #define BASE_PRIORITY_THRESHOLD 0x8
  1480. #define EVENT_PAIR_INCREMENT 0x1
  1481. #define LOW_REALTIME_PRIORITY 0x10
  1482. #define KERNEL_STACK_SIZE 0x8000
  1483. #define KERNEL_BSTORE_SIZE 0x6000
  1484. #define KERNEL_LARGE_STACK_COMMIT 0x8000
  1485. #define KERNEL_LARGE_BSTORE_COMMIT 0x6000
  1486. #define MI_USER_PROBE_ADDRESS 0x000006fbffff0000
  1487. #define MM_EPC_VA 0xe0000000ffa00000
  1488. #define THREAD_QUANTUM 0x6
  1489. #define CLOCK_QUANTUM_DECREMENT 0x3
  1490. #define WAIT_QUANTUM_DECREMENT 0x1
  1491. #define READY_SKIP_QUANTUM 0x2
  1492. #define ROUND_TRIP_DECREMENT_COUNT 0x10
  1493. //
  1494. // kernel special register frame offset definitions
  1495. //
  1496. #define KpsSpecialRegisters 0xa70
  1497. #define KsKernelDbI0 0x0
  1498. #define KsKernelDbI1 0x8
  1499. #define KsKernelDbI2 0x10
  1500. #define KsKernelDbI3 0x18
  1501. #define KsKernelDbI4 0x20
  1502. #define KsKernelDbI5 0x28
  1503. #define KsKernelDbI6 0x30
  1504. #define KsKernelDbI7 0x38
  1505. #define KsKernelDbD0 0x40
  1506. #define KsKernelDbD1 0x48
  1507. #define KsKernelDbD2 0x50
  1508. #define KsKernelDbD3 0x58
  1509. #define KsKernelDbD4 0x60
  1510. #define KsKernelDbD5 0x68
  1511. #define KsKernelDbD6 0x70
  1512. #define KsKernelDbD7 0x78
  1513. #define KsKernelPfC0 0x80
  1514. #define KsKernelPfC1 0x88
  1515. #define KsKernelPfC2 0x90
  1516. #define KsKernelPfC3 0x98
  1517. #define KsKernelPfC4 0xa0
  1518. #define KsKernelPfC5 0xa8
  1519. #define KsKernelPfC6 0xb0
  1520. #define KsKernelPfC7 0xb8
  1521. #define KsKernelPfD0 0xc0
  1522. #define KsKernelPfD1 0xc8
  1523. #define KsKernelPfD2 0xd0
  1524. #define KsKernelPfD3 0xd8
  1525. #define KsKernelPfD4 0xe0
  1526. #define KsKernelPfD5 0xe8
  1527. #define KsKernelPfD6 0xf0
  1528. #define KsKernelPfD7 0xf8
  1529. #define KsIntH16 0x100
  1530. #define KsIntH17 0x108
  1531. #define KsIntH18 0x110
  1532. #define KsIntH19 0x118
  1533. #define KsIntH20 0x120
  1534. #define KsIntH21 0x128
  1535. #define KsIntH22 0x130
  1536. #define KsIntH23 0x138
  1537. #define KsIntH24 0x140
  1538. #define KsIntH25 0x148
  1539. #define KsIntH26 0x150
  1540. #define KsIntH27 0x158
  1541. #define KsIntH28 0x160
  1542. #define KsIntH29 0x168
  1543. #define KsIntH30 0x170
  1544. #define KsIntH31 0x178
  1545. #define KsApCPUID0 0x180
  1546. #define KsApCPUID1 0x188
  1547. #define KsApCPUID2 0x190
  1548. #define KsApCPUID3 0x198
  1549. #define KsApCPUID4 0x1a0
  1550. #define KsApCPUID5 0x1a8
  1551. #define KsApCPUID6 0x1b0
  1552. #define KsApCPUID7 0x1b8
  1553. #define KsApKR0 0x1c0
  1554. #define KsApKR1 0x1c8
  1555. #define KsApKR2 0x1d0
  1556. #define KsApKR3 0x1d8
  1557. #define KsApKR4 0x1e0
  1558. #define KsApKR5 0x1e8
  1559. #define KsApKR6 0x1f0
  1560. #define KsApKR7 0x1f8
  1561. #define KsApITC 0x200
  1562. #define KsApITM 0x208
  1563. #define KsApIVA 0x210
  1564. #define KsApPTA 0x218
  1565. #define KsApGPTA 0x220
  1566. #define KsStISR 0x228
  1567. #define KsStIFA 0x230
  1568. #define KsStITIR 0x238
  1569. #define KsStIIPA 0x240
  1570. #define KsStIIM 0x248
  1571. #define KsStIHA 0x250
  1572. #define KsSaLID 0x258
  1573. #define KsSaIVR 0x260
  1574. #define KsSaTPR 0x268
  1575. #define KsSaEOI 0x270
  1576. #define KsSaIRR0 0x278
  1577. #define KsSaIRR1 0x280
  1578. #define KsSaIRR2 0x288
  1579. #define KsSaIRR3 0x290
  1580. #define KsSaITV 0x298
  1581. #define KsSaPMV 0x2a0
  1582. #define KsSaCMCV 0x2a8
  1583. #define KsSaLRR0 0x2b0
  1584. #define KsSaLRR1 0x2b8
  1585. #define KsRr0 0x2c0
  1586. #define KsRr1 0x2c8
  1587. #define KsRr2 0x2d0
  1588. #define KsRr3 0x2d8
  1589. #define KsRr4 0x2e0
  1590. #define KsRr5 0x2e8
  1591. #define KsRr6 0x2f0
  1592. #define KsRr7 0x2f8
  1593. #define KsPkr0 0x300
  1594. #define KsPkr1 0x308
  1595. #define KsPkr2 0x310
  1596. #define KsPkr3 0x318
  1597. #define KsPkr4 0x320
  1598. #define KsPkr5 0x328
  1599. #define KsPkr6 0x330
  1600. #define KsPkr7 0x338
  1601. #define KsPkr8 0x340
  1602. #define KsPkr9 0x348
  1603. #define KsPkr10 0x350
  1604. #define KsPkr11 0x358
  1605. #define KsPkr12 0x360
  1606. #define KsPkr13 0x368
  1607. #define KsPkr14 0x370
  1608. #define KsPkr15 0x378
  1609. #define KsTrI0 0x380
  1610. #define KsTrI1 0x388
  1611. #define KsTrI2 0x390
  1612. #define KsTrI3 0x398
  1613. #define KsTrI4 0x3a0
  1614. #define KsTrI5 0x3a8
  1615. #define KsTrI6 0x3b0
  1616. #define KsTrI7 0x3b8
  1617. #define KsTrD0 0x3c0
  1618. #define KsTrD1 0x3c8
  1619. #define KsTrD2 0x3d0
  1620. #define KsTrD3 0x3d8
  1621. #define KsTrD4 0x3e0
  1622. #define KsTrD5 0x3e8
  1623. #define KsTrD6 0x3f0
  1624. #define KsTrD7 0x3f8
  1625. #define KsSrMSR0 0x400
  1626. #define KsSrMSR1 0x408
  1627. #define KsSrMSR2 0x410
  1628. #define KsSrMSR3 0x418
  1629. #define KsSrMSR4 0x420
  1630. #define KsSrMSR5 0x428
  1631. #define KsSrMSR6 0x430
  1632. #define KsSrMSR7 0x438