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.

1219 lines
25 KiB

  1. ;
  2. ; Pointer size in bytes
  3. ;
  4. SizeofPointer equ 00004H
  5. ;
  6. ; Process State Enumerated Type Values
  7. ;
  8. ProcessInMemory equ 00000H
  9. ProcessOutOfMemory equ 00001H
  10. ProcessInTransition equ 00002H
  11. ;
  12. ; Thread State Enumerated Type Values
  13. ;
  14. Initialized equ 00000H
  15. Ready equ 00001H
  16. Running equ 00002H
  17. Standby equ 00003H
  18. Terminated equ 00004H
  19. Waiting equ 00005H
  20. ;
  21. ; Wait Reason and Wait Type Enumerated Type Values
  22. ;
  23. WrExecutive equ 00000H
  24. WrEventPair equ 0000EH
  25. WaitAny equ 00001H
  26. WaitAll equ 00000H
  27. ;
  28. ; Apc State Structure Offset Definitions
  29. ;
  30. AsApcListHead equ 00000H
  31. AsProcess equ 00010H
  32. AsKernelApcInProgress equ 00014H
  33. AsKernelApcPending equ 00015H
  34. AsUserApcPending equ 00016H
  35. ;
  36. ; Bug Check Code Definitions
  37. ;
  38. APC_INDEX_MISMATCH equ 00001H
  39. ATTEMPTED_SWITCH_FROM_DPC equ 000B8H
  40. DATA_BUS_ERROR equ 0002EH
  41. DATA_COHERENCY_EXCEPTION equ 00055H
  42. HAL1_INITIALIZATION_FAILED equ 00061H
  43. INSTRUCTION_BUS_ERROR equ 0002FH
  44. INSTRUCTION_COHERENCY_EXCEPTION equ 00056H
  45. INTERRUPT_EXCEPTION_NOT_HANDLED equ 0003DH
  46. INTERRUPT_UNWIND_ATTEMPTED equ 0003CH
  47. INVALID_AFFINITY_SET equ 00003H
  48. INVALID_DATA_ACCESS_TRAP equ 00004H
  49. IRQL_GT_ZERO_AT_SYSTEM_SERVICE equ 0004AH
  50. IRQL_NOT_LESS_OR_EQUAL equ 0000AH
  51. KMODE_EXCEPTION_NOT_HANDLED equ 0001EH
  52. NMI_HARDWARE_FAILURE equ 00080H
  53. NO_USER_MODE_CONTEXT equ 0000EH
  54. PAGE_FAULT_WITH_INTERRUPTS_OFF equ 00049H
  55. PANIC_STACK_SWITCH equ 0002BH
  56. SPIN_LOCK_INIT_FAILURE equ 00081H
  57. SYSTEM_EXIT_OWNED_MUTEX equ 00039H
  58. SYSTEM_SERVICE_EXCEPTION equ 0003BH
  59. SYSTEM_UNWIND_PREVIOUS_USER equ 0003AH
  60. TRAP_CAUSE_UNKNOWN equ 00012H
  61. UNEXPECTED_KERNEL_MODE_TRAP equ 0007FH
  62. HARDWARE_INTERRUPT_STORM equ 000F2H
  63. ;
  64. ; Breakpoint type definitions
  65. ;
  66. DBG_STATUS_CONTROL_C equ 00001H
  67. ;
  68. ; Client Id Structure Offset Definitions
  69. ;
  70. CidUniqueProcess equ 00000H
  71. CidUniqueThread equ 00004H
  72. ;
  73. ; Critical Section Structure Offset Definitions
  74. ;
  75. CsDebugInfo equ 00000H
  76. CsLockCount equ 00004H
  77. CsRecursionCount equ 00008H
  78. CsOwningThread equ 0000CH
  79. CsLockSemaphore equ 00010H
  80. CsSpinCount equ 00014H
  81. ;
  82. ; Critical Section Debug Information Structure Offset Definitions
  83. ;
  84. CsType equ 00000H
  85. CsCreatorBackTraceIndex equ 00002H
  86. CsCriticalSection equ 00004H
  87. CsProcessLocksList equ 00008H
  88. CsEntryCount equ 00010H
  89. CsContentionCount equ 00014H
  90. ;
  91. ; Exception Record Offset, Flag, and Enumerated Type Definitions
  92. ;
  93. EXCEPTION_NONCONTINUABLE equ 00001H
  94. EXCEPTION_UNWINDING equ 00002H
  95. EXCEPTION_EXIT_UNWIND equ 00004H
  96. EXCEPTION_STACK_INVALID equ 00008H
  97. EXCEPTION_NESTED_CALL equ 00010H
  98. EXCEPTION_TARGET_UNWIND equ 00020H
  99. EXCEPTION_COLLIDED_UNWIND equ 00040H
  100. EXCEPTION_UNWIND equ 00066H
  101. EXCEPTION_EXECUTE_HANDLER equ 00001H
  102. EXCEPTION_CONTINUE_SEARCH equ 00000H
  103. EXCEPTION_CONTINUE_EXECUTION equ 0FFFFFFFFH
  104. EXCEPTION_CHAIN_END equ 0FFFFFFFFH
  105. FIXED_NTVDMSTATE_LINEAR equ 00714H
  106. ExceptionContinueExecution equ 00000H
  107. ExceptionContinueSearch equ 00001H
  108. ExceptionNestedException equ 00002H
  109. ExceptionCollidedUnwind equ 00003H
  110. ErExceptionCode equ 00000H
  111. ErExceptionFlags equ 00004H
  112. ErExceptionRecord equ 00008H
  113. ErExceptionAddress equ 0000CH
  114. ErNumberParameters equ 00010H
  115. ErExceptionInformation equ 00014H
  116. ExceptionRecordLength equ 00050H
  117. ;
  118. ; Fast Mutex Structure Offset Definitions
  119. ;
  120. FmCount equ 00000H
  121. FmOwner equ 00004H
  122. FmContention equ 00008H
  123. FmEvent equ 0000CH
  124. FmOldIrql equ 0001CH
  125. ;
  126. ; Interrupt Priority Request Level Definitions
  127. ;
  128. PASSIVE_LEVEL equ 00000H
  129. APC_LEVEL equ 00001H
  130. DISPATCH_LEVEL equ 00002H
  131. CLOCK1_LEVEL equ 0001CH
  132. CLOCK2_LEVEL equ 0001CH
  133. IPI_LEVEL equ 0001DH
  134. POWER_LEVEL equ 0001EH
  135. PROFILE_LEVEL equ 0001BH
  136. HIGH_LEVEL equ 0001FH
  137. ifdef NT_UP
  138. SYNCH_LEVEL equ 00002H
  139. else
  140. SYNCH_LEVEL equ 0001CH
  141. endif
  142. ;
  143. ; Large Integer Structure Offset Definitions
  144. ;
  145. LiLowPart equ 00000H
  146. LiHighPart equ 00004H
  147. ;
  148. ; List Entry Structure Offset Definitions
  149. ;
  150. LsFlink equ 00000H
  151. LsBlink equ 00004H
  152. ;
  153. ; String Structure Offset Definitions
  154. ;
  155. StrLength equ 00000H
  156. StrMaximumLength equ 00002H
  157. StrBuffer equ 00004H
  158. ;
  159. ; System Time Structure Offset Definitions
  160. ;
  161. StLowTime equ 00000H
  162. StHigh1Time equ 00004H
  163. StHigh2Time equ 00008H
  164. ;
  165. ; Time Structure Offset Definitions
  166. ;
  167. TmLowTime equ 00000H
  168. TmHighTime equ 00004H
  169. ;
  170. ; Thread Switch Counter Offset Definitions
  171. ;
  172. TwFindAny equ 00000H
  173. TwFindIdeal equ 00004H
  174. TwFindLast equ 00008H
  175. TwIdleAny equ 0000CH
  176. TwIdleCurrent equ 00010H
  177. TwIdleIdeal equ 00014H
  178. TwIdleLast equ 00018H
  179. TwPreemptAny equ 0001CH
  180. TwPreemptCurrent equ 00020H
  181. TwPreemptLast equ 00024H
  182. TwSwitchToIdle equ 00028H
  183. ;
  184. ; Status Code Definitions
  185. ;
  186. STATUS_ACCESS_VIOLATION equ 0C0000005H
  187. STATUS_ARRAY_BOUNDS_EXCEEDED equ 0C000008CH
  188. STATUS_BAD_COMPRESSION_BUFFER equ 0C0000242H
  189. STATUS_BREAKPOINT equ 080000003H
  190. STATUS_DATATYPE_MISALIGNMENT equ 080000002H
  191. STATUS_FLOAT_DENORMAL_OPERAND equ 0C000008DH
  192. STATUS_FLOAT_DIVIDE_BY_ZERO equ 0C000008EH
  193. STATUS_FLOAT_INEXACT_RESULT equ 0C000008FH
  194. STATUS_FLOAT_INVALID_OPERATION equ 0C0000090H
  195. STATUS_FLOAT_OVERFLOW equ 0C0000091H
  196. STATUS_FLOAT_STACK_CHECK equ 0C0000092H
  197. STATUS_FLOAT_UNDERFLOW equ 0C0000093H
  198. STATUS_FLOAT_MULTIPLE_FAULTS equ 0C00002B4H
  199. STATUS_FLOAT_MULTIPLE_TRAPS equ 0C00002B5H
  200. STATUS_GUARD_PAGE_VIOLATION equ 080000001H
  201. STATUS_ILLEGAL_FLOAT_CONTEXT equ 0C000014AH
  202. STATUS_ILLEGAL_INSTRUCTION equ 0C000001DH
  203. STATUS_INSTRUCTION_MISALIGNMENT equ 0C00000AAH
  204. STATUS_INVALID_HANDLE equ 0C0000008H
  205. STATUS_INVALID_LOCK_SEQUENCE equ 0C000001EH
  206. STATUS_INVALID_OWNER equ 0C000005AH
  207. STATUS_INVALID_PARAMETER_1 equ 0C00000EFH
  208. STATUS_INVALID_SYSTEM_SERVICE equ 0C000001CH
  209. STATUS_INTEGER_DIVIDE_BY_ZERO equ 0C0000094H
  210. STATUS_INTEGER_OVERFLOW equ 0C0000095H
  211. STATUS_IN_PAGE_ERROR equ 0C0000006H
  212. STATUS_KERNEL_APC equ 00100H
  213. STATUS_LONGJUMP equ 080000026H
  214. STATUS_NO_CALLBACK_ACTIVE equ 0C0000258H
  215. STATUS_NO_EVENT_PAIR equ 0C000014EH
  216. STATUS_PRIVILEGED_INSTRUCTION equ 0C0000096H
  217. STATUS_SINGLE_STEP equ 080000004H
  218. STATUS_STACK_OVERFLOW equ 0C00000FDH
  219. STATUS_SUCCESS equ 00000H
  220. STATUS_THREAD_IS_TERMINATING equ 0C000004BH
  221. STATUS_TIMEOUT equ 00102H
  222. STATUS_UNWIND equ 0C0000027H
  223. STATUS_UNWIND_CONSOLIDATE equ 080000029H
  224. STATUS_WAKE_SYSTEM_DEBUGGER equ 080000007H
  225. ;
  226. ; APC Object Structure Offset Definitions
  227. ;
  228. ApType equ 00000H
  229. ApSize equ 00002H
  230. ApThread equ 00008H
  231. ApApcListEntry equ 0000CH
  232. ApKernelRoutine equ 00014H
  233. ApRundownRoutine equ 00018H
  234. ApNormalRoutine equ 0001CH
  235. ApNormalContext equ 00020H
  236. ApSystemArgument1 equ 00024H
  237. ApSystemArgument2 equ 00028H
  238. ApApcStateIndex equ 0002CH
  239. ApApcMode equ 0002DH
  240. ApInserted equ 0002EH
  241. ApcObjectLength equ 00030H
  242. ;
  243. ; DPC object Structure Offset Definitions
  244. ;
  245. DpType equ 00000H
  246. DpNumber equ 00002H
  247. DpImportance equ 00003H
  248. DpDpcListEntry equ 00004H
  249. DpDeferredRoutine equ 0000CH
  250. DpDeferredContext equ 00010H
  251. DpSystemArgument1 equ 00014H
  252. DpSystemArgument2 equ 00018H
  253. DpLock equ 0001CH
  254. DpcObjectLength equ 00020H
  255. ;
  256. ; Device Queue Object Structure Offset Definitions
  257. ;
  258. DvType equ 00000H
  259. DvSize equ 00002H
  260. DvDeviceListHead equ 00004H
  261. DvSpinLock equ 0000CH
  262. DvBusy equ 00010H
  263. DeviceQueueObjectLength equ 00014H
  264. ;
  265. ; Device Queue Entry Structure Offset Definitions
  266. ;
  267. DeDeviceListEntry equ 00000H
  268. DeSortKey equ 00008H
  269. DeInserted equ 0000CH
  270. DeviceQueueEntryLength equ 00010H
  271. ;
  272. ; Event Object Structure Offset Definitions
  273. ;
  274. EvType equ 00000H
  275. EvSize equ 00002H
  276. EvSignalState equ 00004H
  277. EvWaitListHead equ 00008H
  278. EventObjectLength equ 00010H
  279. ;
  280. ; Event Pair Object Structure Offset Definitions
  281. ;
  282. EpType equ 00000H
  283. EpSize equ 00002H
  284. EpEventLow equ 00004H
  285. EpEventHigh equ 00014H
  286. ;
  287. ; Interrupt Object Structure Offset Definitions
  288. ;
  289. InLevelSensitive equ 00000H
  290. InLatched equ 00001H
  291. InType equ 00000H
  292. InSize equ 00002H
  293. InInterruptListEntry equ 00004H
  294. InServiceRoutine equ 0000CH
  295. InServiceContext equ 00010H
  296. InSpinLock equ 00014H
  297. InTickCount equ 00018H
  298. InActualLock equ 0001CH
  299. InDispatchAddress equ 00020H
  300. InVector equ 00024H
  301. InIrql equ 00028H
  302. InSynchronizeIrql equ 00029H
  303. InFloatingSave equ 0002AH
  304. InConnected equ 0002BH
  305. InNumber equ 0002CH
  306. InShareVector equ 0002DH
  307. InMode equ 00030H
  308. InServiceCount equ 00034H
  309. InDispatchCount equ 00038H
  310. InDispatchCode equ 0003CH
  311. InterruptObjectLength equ 001E4H
  312. NORMAL_DISPATCH_LENGTH equ 001A8H
  313. DISPATCH_LENGTH equ 001A8H
  314. ;
  315. ; Process Object Structure Offset Definitions
  316. ;
  317. PrType equ 00000H
  318. PrSize equ 00002H
  319. PrSignalState equ 00004H
  320. PrProfileListHead equ 00010H
  321. PrDirectoryTableBase equ 00018H
  322. PrLdtDescriptor equ 00020H
  323. PrInt21Descriptor equ 00028H
  324. PrIopmOffset equ 00030H
  325. PrIopl equ 00032H
  326. PrVdmTrapcHandler equ 0004CH
  327. PrVdmObjects equ 00158H
  328. PrFlags equ 00248H
  329. PrActiveProcessors equ 00034H
  330. PrKernelTime equ 00038H
  331. PrUserTime equ 0003CH
  332. PrReadyListHead equ 00040H
  333. PrSwapListEntry equ 00048H
  334. PrThreadListHead equ 00050H
  335. PrProcessLock equ 00058H
  336. PrAffinity equ 0005CH
  337. PrStackCount equ 00060H
  338. PrBasePriority equ 00062H
  339. PrThreadQuantum equ 00063H
  340. PrAutoAlignment equ 00064H
  341. PrState equ 00065H
  342. ProcessObjectLength equ 00070H
  343. ExtendedProcessObjectLength equ 00260H
  344. ;
  345. ; Profile Object Structure Offset Definitions
  346. ;
  347. PfType equ 00000H
  348. PfSize equ 00002H
  349. PfProfileListEntry equ 00004H
  350. PfProcess equ 0000CH
  351. PfRangeBase equ 00010H
  352. PfRangeLimit equ 00014H
  353. PfBucketShift equ 00018H
  354. PfBuffer equ 0001CH
  355. PfSegment equ 00020H
  356. PfAffinity equ 00024H
  357. PfSource equ 00028H
  358. PfStarted equ 0002AH
  359. ProfileObjectLength equ 0002CH
  360. ;
  361. ; Queue Object Structure Offset Definitions
  362. ;
  363. QuType equ 00000H
  364. QuSize equ 00002H
  365. QuSignalState equ 00004H
  366. QuEntryListHead equ 00010H
  367. QuCurrentCount equ 00018H
  368. QuMaximumCount equ 0001CH
  369. QuThreadListHead equ 00020H
  370. QueueObjectLength equ 00028H
  371. ;
  372. ; Thread Object Structure Offset Definitions
  373. ;
  374. EeKernelEventPair equ 00000H
  375. EtCid equ 001ECH
  376. EtEthreadLength equ 00260H
  377. ThType equ 00000H
  378. ThSize equ 00002H
  379. ThSignalState equ 00004H
  380. ThMutantListHead equ 00010H
  381. ThInitialStack equ 00018H
  382. ThStackLimit equ 0001CH
  383. ThTeb equ 00020H
  384. ThTlsArray equ 00024H
  385. ThKernelStack equ 00028H
  386. ThDebugActive equ 0002CH
  387. ThState equ 0002DH
  388. ThAlerted equ 0002EH
  389. ThIopl equ 00030H
  390. ThNpxState equ 00031H
  391. ThSaturation equ 00032H
  392. ThPriority equ 00033H
  393. ThApcState equ 00034H
  394. ThIdleSwapBlock equ 00050H
  395. ThContextSwitches equ 0004CH
  396. ThWaitStatus equ 00054H
  397. ThWaitIrql equ 00058H
  398. ThWaitMode equ 00059H
  399. ThWaitNext equ 0005AH
  400. ThWaitReason equ 0005BH
  401. ThWaitBlockList equ 0005CH
  402. ThWaitListEntry equ 00060H
  403. ThWaitTime equ 00068H
  404. ThBasePriority equ 0006CH
  405. ThDecrementCount equ 0006DH
  406. ThPriorityDecrement equ 0006EH
  407. ThQuantum equ 0006FH
  408. ThWaitBlock equ 00070H
  409. ThKernelApcDisable equ 000D4H
  410. ThUserAffinity equ 000D8H
  411. ThSystemAffinityActive equ 000DCH
  412. ThServiceTable equ 000E0H
  413. ThQueue equ 000E4H
  414. ThApcQueueLock equ 000E8H
  415. ThTimer equ 000F0H
  416. ThQueueListEntry equ 00118H
  417. ThAffinity equ 00124H
  418. ThPreempted equ 00128H
  419. ThProcessReadyQueue equ 00129H
  420. ThKernelStackResident equ 0012AH
  421. ThNextProcessor equ 0012BH
  422. ThCallbackStack equ 0012CH
  423. ThWin32Thread equ 00130H
  424. ThTrapFrame equ 00134H
  425. ThApcStatePointer equ 00138H
  426. ThPreviousMode equ 00140H
  427. ThEnableStackSwap equ 00141H
  428. ThLargeStack equ 00142H
  429. ThKernelTime equ 00144H
  430. ThUserTime equ 00148H
  431. ThSavedApcState equ 0014CH
  432. ThAlertable equ 00164H
  433. ThApcStateIndex equ 00165H
  434. ThApcQueueable equ 00166H
  435. ThAutoAlignment equ 00167H
  436. ThStackBase equ 00168H
  437. ThSuspendApc equ 0016CH
  438. ThSuspendSemaphore equ 0019CH
  439. ThThreadListEntry equ 001B0H
  440. ThFreezeCount equ 001B8H
  441. ThSuspendCount equ 001B9H
  442. ThIdealProcessor equ 001BAH
  443. ThDisableBoost equ 001BBH
  444. ThSoftAffinity equ 00120H
  445. ThreadObjectLength equ 001C0H
  446. ExtendedThreadObjectLength equ 00260H
  447. EVENT_WAIT_BLOCK_OFFSET equ 000A0H
  448. NPX_STATE_NOT_LOADED equ 0000AH
  449. NPX_STATE_LOADED equ 00000H
  450. ;
  451. ; Timer object Structure Offset Definitions
  452. ;
  453. TiType equ 00000H
  454. TiSize equ 00002H
  455. TiInserted equ 00003H
  456. TiSignalState equ 00004H
  457. TiDueTime equ 00010H
  458. TiTimerListEntry equ 00018H
  459. TiDpc equ 00020H
  460. TiPeriod equ 00024H
  461. TimerObjectLength equ 00028H
  462. TIMER_TABLE_SIZE equ 00100H
  463. ;
  464. ; Wait Block Structure Offset Definitions
  465. ;
  466. WbWaitListEntry equ 00000H
  467. WbThread equ 00008H
  468. WbObject equ 0000CH
  469. WbNextWaitBlock equ 00010H
  470. WbWaitKey equ 00014H
  471. WbWaitType equ 00016H
  472. ;
  473. ; Fiber Structure Offset Definitions
  474. ;
  475. FbFiberData equ 00000H
  476. FbExceptionList equ 00004H
  477. FbStackBase equ 00008H
  478. FbStackLimit equ 0000CH
  479. FbDeallocationStack equ 00010H
  480. FbFiberContext equ 00014H
  481. FbWx86Tib equ 002E0H
  482. ;
  483. ; Process Environment Block Structure Offset Definitions
  484. ;
  485. PeKernelCallbackTable equ 0002CH
  486. ;
  487. ; System Service Descriptor Table Structure Definitions
  488. ;
  489. NUMBER_SERVICE_TABLES equ 00004H
  490. SERVICE_NUMBER_MASK equ 00FFFH
  491. SERVICE_TABLE_SHIFT equ 00008H
  492. SERVICE_TABLE_MASK equ 00030H
  493. SERVICE_TABLE_TEST equ 00010H
  494. SdBase equ 00000H
  495. SdCount equ 00004H
  496. SdLimit equ 00008H
  497. SdNumber equ 0000CH
  498. ;
  499. ; Thread Environment Block Structure Offset Definitions
  500. ;
  501. TeStackBase equ 00004H
  502. TeStackLimit equ 00008H
  503. TeFiberData equ 00010H
  504. TeSelf equ 00018H
  505. TeEnvironmentPointer equ 0001CH
  506. TeClientId equ 00020H
  507. TeActiveRpcHandle equ 00028H
  508. TeThreadLocalStoragePointer equ 0002CH
  509. TeCountOfOwnedCriticalSections equ 00038H
  510. TePeb equ 00030H
  511. TeCsrClientThread equ 0003CH
  512. TeWOW32Reserved equ 000C0H
  513. TeSoftFpcr equ 000C8H
  514. TeExceptionCode equ 001A4H
  515. TeGdiClientPID equ 006C0H
  516. TeGdiClientTID equ 006C4H
  517. TeGdiThreadLocalInfo equ 006C8H
  518. TeglDispatchTable equ 007C4H
  519. TeglReserved1 equ 00B68H
  520. TeglReserved2 equ 00BDCH
  521. TeglSectionInfo equ 00BE0H
  522. TeglSection equ 00BE4H
  523. TeglTable equ 00BE8H
  524. TeglCurrentRC equ 00BECH
  525. TeglContext equ 00BF0H
  526. TeDeallocationStack equ 00E0CH
  527. TeTlsSlots equ 00E10H
  528. TeVdm equ 00F18H
  529. TeGdiBatchCount equ 00F70H
  530. TeInstrumentation equ 00F2CH
  531. ThreadEnvironmentBlockLength equ 00FB4H
  532. CmThreadEnvironmentBlockOffset equ 01000H
  533. ;
  534. ; Lock Queue Structure Offset Definitions
  535. ;
  536. LOCK_QUEUE_WAIT equ 00001H
  537. LOCK_QUEUE_OWNER equ 00002H
  538. LOCK_QUEUE_HEADER_SIZE equ 00008H
  539. LockQueueDispatcherLock equ 00000H
  540. LockQueueContextSwapLock equ 00001H
  541. LqNext equ 00000H
  542. LqLock equ 00004H
  543. LqhNext equ 00000H
  544. LqhLock equ 00004H
  545. LqhOldIrql equ 00008H
  546. ;
  547. ; Performance Definitions
  548. ;
  549. PERF_CONTEXTSWAP_OFFSET equ 00004H
  550. PERF_CONTEXTSWAP_FLAG equ 00004H
  551. PERF_DPC_OFFSET equ 00004H
  552. PERF_DPC_FLAG equ 00080H
  553. PERF_INTERRUPT_OFFSET equ 00004H
  554. PERF_INTERRUPT_FLAG equ 04000H
  555. ;
  556. ; Apc Record Structure Offset Definitions
  557. ;
  558. ArNormalRoutine equ 00000H
  559. ArNormalContext equ 00004H
  560. ArSystemArgument1 equ 00008H
  561. ArSystemArgument2 equ 0000CH
  562. ApcRecordLength equ 00010H
  563. ;
  564. ; Processor Control Registers Structure Offset Definitions
  565. ;
  566. KI_BEGIN_KERNEL_RESERVED equ 0FFDF0000H
  567. ifdef NT_UP
  568. P0PCRADDRESS equ 0FFDFF000H
  569. PCR equ ds:[0FFDFF000H]
  570. else
  571. PCR equ fs:
  572. endif
  573. PcExceptionList equ 00000H
  574. PcInitialStack equ 00004H
  575. PcStackLimit equ 00008H
  576. PcSelfPcr equ 0001CH
  577. PcPrcb equ 00020H
  578. PcTeb equ 00018H
  579. PcIrql equ 00024H
  580. PcIRR equ 00028H
  581. PcIrrActive equ 0002CH
  582. PcIDR equ 00030H
  583. PcIdt equ 00038H
  584. PcGdt equ 0003CH
  585. PcTss equ 00040H
  586. PcDebugActive equ 00050H
  587. PcNumber equ 00051H
  588. PcVdmAlert equ 00054H
  589. PcSetMember equ 00048H
  590. PcStallScaleFactor equ 0004CH
  591. PcHal equ 00094H
  592. PcPrcbData equ 00120H
  593. ProcessorControlRegisterLength equ 00D70H
  594. TebPeb equ 00030H
  595. PebBeingDebugged equ 00002H
  596. PebKernelCallbackTable equ 0002CH
  597. ;
  598. ; Defines for user shared data
  599. ;
  600. USER_SHARED_DATA equ 0FFDF0000H
  601. MM_SHARED_USER_DATA_VA equ 07FFE0000H
  602. USERDATA equ ds:[0FFDF0000H]
  603. UsTickCountLow equ 00000H
  604. UsTickCountMultiplier equ 00004H
  605. UsInterruptTime equ 00008H
  606. UsSystemTime equ 00014H
  607. UsSystemCall equ 00300H
  608. ;
  609. ; Tss Structure Offset Definitions
  610. ;
  611. TssEsp0 equ 00004H
  612. TssCR3 equ 0001CH
  613. TssEip equ 00020H
  614. TssEFlags equ 00024H
  615. TssEax equ 00028H
  616. TssEbx equ 00034H
  617. TssEcx equ 0002CH
  618. TssEdx equ 00030H
  619. TssEsp equ 00038H
  620. TssEbp equ 0003CH
  621. TssEsi equ 00040H
  622. TssEdi equ 00044H
  623. TssEs equ 00048H
  624. TssCs equ 0004CH
  625. TssSs equ 00050H
  626. TssDs equ 00054H
  627. TssFs equ 00058H
  628. TssGs equ 0005CH
  629. TssIoMapBase equ 00066H
  630. TssIoMaps equ 00068H
  631. TssLength equ 020ACH
  632. ;
  633. ; Gdt Descriptor Offset Definitions
  634. ;
  635. KGDT_R3_DATA equ 00020H
  636. KGDT_R3_CODE equ 00018H
  637. KGDT_R0_CODE equ 00008H
  638. KGDT_R0_DATA equ 00010H
  639. KGDT_R0_PCR equ 00030H
  640. KGDT_STACK16 equ 000F8H
  641. KGDT_CODE16 equ 000F0H
  642. KGDT_TSS equ 00028H
  643. KGDT_R3_TEB equ 00038H
  644. KGDT_DF_TSS equ 00050H
  645. KGDT_NMI_TSS equ 00058H
  646. KGDT_LDT equ 00048H
  647. ;
  648. ; GdtEntry Offset Definitions
  649. ;
  650. KgdtBaseLow equ 00002H
  651. KgdtBaseMid equ 00004H
  652. KgdtBaseHi equ 00007H
  653. KgdtLimitHi equ 00006H
  654. KgdtLimitLow equ 00000H
  655. ;
  656. ; Processor Block Structure Offset Definitions
  657. ;
  658. PbCurrentThread equ 00004H
  659. PbNextThread equ 00008H
  660. PbIdleThread equ 0000CH
  661. PbNumber equ 00010H
  662. PbSetMember equ 00014H
  663. PbCpuID equ 00019H
  664. PbCpuType equ 00018H
  665. PbCpuStep equ 0001AH
  666. PbProcessorState equ 0001CH
  667. PbHalReserved equ 0037CH
  668. PbLockQueue equ 00418H
  669. PbNpxThread equ 004A0H
  670. PbInterruptCount equ 004A4H
  671. PbKernelTime equ 004A8H
  672. PbUserTime equ 004ACH
  673. PbDpcTime equ 004B0H
  674. PbDebugDpcTime equ 004B4H
  675. PbInterruptTime equ 004B8H
  676. PbAdjustDpcThreshold equ 004BCH
  677. PbPageColor equ 004C0H
  678. PbSkipTick equ 004C4H
  679. PbMultiThreadProcessorSet equ 004D0H
  680. PbThreadStartCount equ 004D8H
  681. PbAlignmentFixupCount equ 004F8H
  682. PbContextSwitches equ 004FCH
  683. PbDcacheFlushCount equ 00500H
  684. PbExceptionDispatchCount equ 00504H
  685. PbFirstLevelTbFills equ 00508H
  686. PbFloatingEmulationCount equ 0050CH
  687. PbIcacheFlushCount equ 00510H
  688. PbSecondLevelTbFills equ 00514H
  689. PbSystemCalls equ 00518H
  690. PbPPLookasideList equ 00520H
  691. PbPPNPagedLookasideList equ 005A0H
  692. PbPPPagedLookasideList equ 006A0H
  693. PbPacketBarrier equ 007A0H
  694. PbReverseStall equ 007A4H
  695. PbIpiFrame equ 007A8H
  696. PbCurrentPacket equ 007E0H
  697. PbTargetSet equ 007ECH
  698. PbWorkerRoutine equ 007F0H
  699. PbIpiFrozen equ 007F4H
  700. PbRequestSummary equ 00820H
  701. PbSignalDone equ 00824H
  702. PbDpcListHead equ 00860H
  703. PbDpcStack equ 00868H
  704. PbDpcCount equ 0086CH
  705. PbDpcQueueDepth equ 00870H
  706. PbDpcRoutineActive equ 00874H
  707. PbDpcInterruptRequested equ 00878H
  708. PbDpcLastCount equ 0087CH
  709. PbDpcRequestRate equ 00880H
  710. PbMaximumDpcQueueDepth equ 00884H
  711. PbMinimumDpcRate equ 00888H
  712. PbQuantumEnd equ 0088CH
  713. PbDpcLock equ 008A0H
  714. PbNpxSaveArea equ 00920H
  715. PbChainedInterruptList equ 008E0H
  716. PbPowerState equ 00B30H
  717. ProcessorBlockLength equ 00C50H
  718. ;
  719. ; Processor Power State Offset Definitions
  720. ;
  721. PpIdleFunction equ 00000H
  722. ;
  723. ; Immediate Interprocessor Command Definitions
  724. ;
  725. IPI_APC equ 00001H
  726. IPI_DPC equ 00002H
  727. IPI_FREEZE equ 00004H
  728. IPI_PACKET_READY equ 00008H
  729. IPI_SYNCH_REQUEST equ 00010H
  730. ;
  731. ; Thread Environment Block Structure Offset Definitions
  732. ;
  733. TbExceptionList equ 00000H
  734. TbStackBase equ 00004H
  735. TbStackLimit equ 00008H
  736. TbEnvironmentPointer equ 0001CH
  737. TbVersion equ 00010H
  738. TbFiberData equ 00010H
  739. TbArbitraryUserPointer equ 00014H
  740. TbClientId equ 00020H
  741. TbThreadLocalStoragePointer equ 0002CH
  742. TbCountOfOwnedCriticalSections equ 00038H
  743. TbSystemReserved1 equ 000CCH
  744. TbVdm equ 00F18H
  745. TbCsrClientThread equ 0003CH
  746. TbGdiThreadLocalInfo equ 006C8H
  747. TbglDispatchTable equ 007C4H
  748. TbglSectionInfo equ 00BE0H
  749. TbglSection equ 00BE4H
  750. TbglTable equ 00BE8H
  751. TbglCurrentRC equ 00BECH
  752. TbglContext equ 00BF0H
  753. TbWOW32Reserved equ 000C0H
  754. TbExceptionCode equ 001A4H
  755. TbDeallocationStack equ 00E0CH
  756. TbGdiBatchCount equ 00F70H
  757. ;
  758. ; Time Fields (TIME_FIELDS) Structure Offset Definitions
  759. ;
  760. TfSecond equ 0000AH
  761. TfMinute equ 00008H
  762. TfHour equ 00006H
  763. TfWeekday equ 0000EH
  764. TfDay equ 00004H
  765. TfMonth equ 00002H
  766. TfYear equ 00000H
  767. TfMilliseconds equ 0000CH
  768. ;
  769. ; constants for system irql and IDT vector conversion
  770. ;
  771. MAXIMUM_IDTVECTOR equ 000FFH
  772. MAXIMUM_PRIMARY_VECTOR equ 000FFH
  773. PRIMARY_VECTOR_BASE equ 00030H
  774. RPL_MASK equ 00003H
  775. MODE_MASK equ 00001H
  776. ;
  777. ; Flags in the CR0 register
  778. ;
  779. CR0_PG equ 080000000H
  780. CR0_ET equ 00010H
  781. CR0_TS equ 00008H
  782. CR0_EM equ 00004H
  783. CR0_MP equ 00002H
  784. CR0_PE equ 00001H
  785. CR0_CD equ 040000000H
  786. CR0_NW equ 020000000H
  787. CR0_AM equ 040000H
  788. CR0_WP equ 010000H
  789. CR0_NE equ 00020H
  790. ;
  791. ; Flags in the CR4 register
  792. ;
  793. CR4_VME equ 00001H
  794. CR4_PVI equ 00002H
  795. CR4_TSD equ 00004H
  796. CR4_DE equ 00008H
  797. CR4_PSE equ 00010H
  798. CR4_PAE equ 00020H
  799. CR4_MCE equ 00040H
  800. CR4_PGE equ 00080H
  801. CR4_FXSR equ 00200H
  802. CR4_XMMEXCPT equ 00400H
  803. ;
  804. ; Miscellaneous Definitions
  805. ;
  806. MAXIMUM_PROCESSORS equ 00020H
  807. INITIAL_STALL_COUNT equ 00064H
  808. IRQL_NOT_GREATER_OR_EQUAL equ 00009H
  809. IRQL_NOT_LESS_OR_EQUAL equ 0000AH
  810. MUTEX_ALREADY_OWNED equ 000BFH
  811. THREAD_NOT_MUTEX_OWNER equ 00011H
  812. SPIN_LOCK_ALREADY_OWNED equ 0000FH
  813. SPIN_LOCK_NOT_OWNED equ 00010H
  814. BASE_PRIORITY_THRESHOLD equ 00008H
  815. EVENT_PAIR_INCREMENT equ 00001H
  816. LOW_REALTIME_PRIORITY equ 00010H
  817. BlackHole equ 0FFFFA000H
  818. KERNEL_LARGE_STACK_COMMIT equ 03000H
  819. KERNEL_STACK_SIZE equ 03000H
  820. DOUBLE_FAULT_STACK_SIZE equ 01000H
  821. EFLAG_SELECT equ 0C000H
  822. BREAKPOINT_BREAK equ 00000H
  823. IPI_FREEZE equ 00004H
  824. CLOCK_QUANTUM_DECREMENT equ 00003H
  825. READY_SKIP_QUANTUM equ 00002H
  826. THREAD_QUANTUM equ 00006H
  827. WAIT_QUANTUM_DECREMENT equ 00001H
  828. ROUND_TRIP_DECREMENT_COUNT equ 00010H
  829. ;
  830. ; Trap Frame Offset Definitions and Length
  831. ;
  832. TsExceptionList equ 0004CH
  833. TsPreviousPreviousMode equ 00048H
  834. TsSegGs equ 00030H
  835. TsSegFs equ 00050H
  836. TsSegEs equ 00034H
  837. TsSegDs equ 00038H
  838. TsEdi equ 00054H
  839. TsEsi equ 00058H
  840. TsEbp equ 00060H
  841. TsEbx equ 0005CH
  842. TsEdx equ 0003CH
  843. TsEcx equ 00040H
  844. TsEax equ 00044H
  845. TsErrCode equ 00064H
  846. TsEip equ 00068H
  847. TsSegCs equ 0006CH
  848. TsEflags equ 00070H
  849. TsHardwareEsp equ 00074H
  850. TsHardwareSegSs equ 00078H
  851. TsTempSegCs equ 00010H
  852. TsTempEsp equ 00014H
  853. TsDbgEbp equ 00000H
  854. TsDbgEip equ 00004H
  855. TsDbgArgMark equ 00008H
  856. TsDbgArgPointer equ 0000CH
  857. TsDr0 equ 00018H
  858. TsDr1 equ 0001CH
  859. TsDr2 equ 00020H
  860. TsDr3 equ 00024H
  861. TsDr6 equ 00028H
  862. TsDr7 equ 0002CH
  863. TsV86Es equ 0007CH
  864. TsV86Ds equ 00080H
  865. TsV86Fs equ 00084H
  866. TsV86Gs equ 00088H
  867. KTRAP_FRAME_LENGTH equ 0008CH
  868. KTRAP_FRAME_ALIGN equ 00004H
  869. FRAME_EDITED equ 0FFF8H
  870. EFLAGS_ALIGN_CHECK equ 040000H
  871. EFLAGS_V86_MASK equ 020000H
  872. EFLAGS_INTERRUPT_MASK equ 00200H
  873. EFLAGS_TF equ 00100H
  874. EFLAGS_VIF equ 080000H
  875. EFLAGS_VIP equ 0100000H
  876. EFLAGS_USER_SANITIZE equ 03E0DD7H
  877. ;
  878. ; Context Frame Offset and Flag Definitions
  879. ;
  880. CONTEXT_FULL equ 010007H
  881. CONTEXT_DEBUG_REGISTERS equ 010010H
  882. CONTEXT_CONTROL equ 010001H
  883. CONTEXT_FLOATING_POINT equ 010008H
  884. CONTEXT_INTEGER equ 010002H
  885. CONTEXT_SEGMENTS equ 010004H
  886. CsContextFlags equ 00000H
  887. CsDr0 equ 00004H
  888. CsDr1 equ 00008H
  889. CsDr2 equ 0000CH
  890. CsDr3 equ 00010H
  891. CsDr6 equ 00014H
  892. CsDr7 equ 00018H
  893. CsFloatSave equ 0001CH
  894. CsSegGs equ 0008CH
  895. CsSegFs equ 00090H
  896. CsSegEs equ 00094H
  897. CsSegDs equ 00098H
  898. CsEdi equ 0009CH
  899. CsEsi equ 000A0H
  900. CsEbx equ 000A4H
  901. CsEdx equ 000A8H
  902. CsEcx equ 000ACH
  903. CsEax equ 000B0H
  904. CsEbp equ 000B4H
  905. CsEip equ 000B8H
  906. CsSegCs equ 000BCH
  907. CsEflags equ 000C0H
  908. CsEsp equ 000C4H
  909. CsSegSs equ 000C8H
  910. CsExtendedRegisters equ 000CCH
  911. ContextFrameLength equ 002D0H
  912. DR6_LEGAL equ 0E00FH
  913. DR7_LEGAL equ 0FFFF0155H
  914. DR7_ACTIVE equ 00055H
  915. ErrHandler equ 00004H
  916. ErrNext equ 00000H
  917. ;
  918. ; Floating save area field offset definitions
  919. ;
  920. FpControlWord equ 00000H
  921. FpStatusWord equ 00004H
  922. FpTagWord equ 00008H
  923. FpErrorOffset equ 0000CH
  924. FpErrorSelector equ 00010H
  925. FpDataOffset equ 00014H
  926. FpDataSelector equ 00018H
  927. FpRegisterArea equ 0001CH
  928. FpCtxtCr0NpxState equ 0006CH
  929. ;
  930. ; FX Floating save area field offset definitions
  931. ;
  932. FxControlWord equ 00000H
  933. FxStatusWord equ 00002H
  934. FxTagWord equ 00004H
  935. FxErrorOpcode equ 00006H
  936. FxErrorOffset equ 00008H
  937. FxErrorSelector equ 0000CH
  938. FxDataOffset equ 00010H
  939. FxDataSelector equ 00014H
  940. FxMXCsr equ 00018H
  941. FxFpRegisterArea equ 00020H
  942. FpNpxSavedCpu equ 00208H
  943. FpCr0NpxState equ 0020CH
  944. NPX_FRAME_LENGTH equ 00210H
  945. ;
  946. ; Processor State Frame Offset Definitions
  947. ;
  948. PsContextFrame equ 00000H
  949. PsSpecialRegisters equ 002CCH
  950. SrCr0 equ 00000H
  951. SrCr2 equ 00004H
  952. SrCr3 equ 00008H
  953. SrCr4 equ 0000CH
  954. SrKernelDr0 equ 00010H
  955. SrKernelDr1 equ 00014H
  956. SrKernelDr2 equ 00018H
  957. SrKernelDr3 equ 0001CH
  958. SrKernelDr6 equ 00020H
  959. SrKernelDr7 equ 00024H
  960. SrGdtr equ 0002AH
  961. SrIdtr equ 00032H
  962. SrTr equ 00038H
  963. SrLdtr equ 0003AH
  964. ProcessorStateLength equ 00320H
  965. ;
  966. ; EPROCESS
  967. ;
  968. EpDebugPort equ 000BCH
  969. EpVdmObjects equ 00158H
  970. ;
  971. ; Machine type definitions (Temporarily)
  972. ;
  973. MACHINE_TYPE_ISA equ 00000H
  974. MACHINE_TYPE_EISA equ 00001H
  975. MACHINE_TYPE_MCA equ 00002H
  976. ;
  977. ; KeFeatureBits defines
  978. ;
  979. KF_V86_VIS equ 00001H
  980. KF_RDTSC equ 00002H
  981. KF_CR4 equ 00004H
  982. KF_GLOBAL_PAGE equ 00010H
  983. KF_LARGE_PAGE equ 00020H
  984. KF_CMPXCHG8B equ 00080H
  985. KF_FAST_SYSCALL equ 01000H
  986. ;
  987. ; LoaderParameterBlock offsets relative to base
  988. ;
  989. LpbLoadOrderListHead equ 00000H
  990. LpbMemoryDescriptorListHead equ 00008H
  991. LpbKernelStack equ 00018H
  992. LpbPrcb equ 0001CH
  993. LpbProcess equ 00020H
  994. LpbThread equ 00024H
  995. LpbI386 equ 0005CH
  996. LpbRegistryLength equ 00028H
  997. LpbRegistryBase equ 0002CH
  998. LpbConfigurationRoot equ 00030H
  999. LpbArcBootDeviceName equ 00034H
  1000. LpbArcHalDeviceName equ 00038H
  1001. PAGE_SIZE equ 01000H
  1002. ;
  1003. ; VDM equates.
  1004. ;
  1005. VDM_INDEX_Invalid equ 00000H
  1006. VDM_INDEX_0F equ 00001H
  1007. VDM_INDEX_ESPrefix equ 00002H
  1008. VDM_INDEX_CSPrefix equ 00003H
  1009. VDM_INDEX_SSPrefix equ 00004H
  1010. VDM_INDEX_DSPrefix equ 00005H
  1011. VDM_INDEX_FSPrefix equ 00006H
  1012. VDM_INDEX_GSPrefix equ 00007H
  1013. VDM_INDEX_OPER32Prefix equ 00008H
  1014. VDM_INDEX_ADDR32Prefix equ 00009H
  1015. VDM_INDEX_INSB equ 0000AH
  1016. VDM_INDEX_INSW equ 0000BH
  1017. VDM_INDEX_OUTSB equ 0000CH
  1018. VDM_INDEX_OUTSW equ 0000DH
  1019. VDM_INDEX_PUSHF equ 0000EH
  1020. VDM_INDEX_POPF equ 0000FH
  1021. VDM_INDEX_INTnn equ 00010H
  1022. VDM_INDEX_INTO equ 00011H
  1023. VDM_INDEX_IRET equ 00012H
  1024. VDM_INDEX_NPX equ 00013H
  1025. VDM_INDEX_INBimm equ 00014H
  1026. VDM_INDEX_INWimm equ 00015H
  1027. VDM_INDEX_OUTBimm equ 00016H
  1028. VDM_INDEX_OUTWimm equ 00017H
  1029. VDM_INDEX_INB equ 00018H
  1030. VDM_INDEX_INW equ 00019H
  1031. VDM_INDEX_OUTB equ 0001AH
  1032. VDM_INDEX_OUTW equ 0001BH
  1033. VDM_INDEX_LOCKPrefix equ 0001CH
  1034. VDM_INDEX_REPNEPrefix equ 0001DH
  1035. VDM_INDEX_REPPrefix equ 0001EH
  1036. VDM_INDEX_CLI equ 0001FH
  1037. VDM_INDEX_STI equ 00020H
  1038. VDM_INDEX_HLT equ 00021H
  1039. MAX_VDM_INDEX equ 00022H
  1040. ;
  1041. ; VDM feature bits.
  1042. ;
  1043. V86_VIRTUAL_INT_EXTENSIONS equ 00001H
  1044. PM_VIRTUAL_INT_EXTENSIONS equ 00002H
  1045. ;
  1046. ; Selector types.
  1047. ;
  1048. SEL_TYPE_NP equ 00040H
  1049. ;
  1050. ; Usermode callout frame definitions
  1051. ;
  1052. CuInStk equ 00000H
  1053. CuTrFr equ 00004H
  1054. CuCbStk equ 00008H
  1055. CuEdi equ 0000CH
  1056. CuEsi equ 00010H
  1057. CuEbx equ 00014H
  1058. CuEbp equ 00018H
  1059. CuRet equ 0001CH
  1060. CuOutBf equ 00020H
  1061. CuOutLn equ 00024H
  1062. ;
  1063. ; VDM_PROCESS_OBJECTS
  1064. ;
  1065. VpVdmTib equ 00098H