Leaked source code of windows server 2003
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.

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