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.

553 lines
11 KiB

  1. ;
  2. ; Wait Reason and Wait Type Enumerated Type Values
  3. ;
  4. WrExecutive equ 00000H
  5. AsProcess equ 00010H
  6. ;
  7. ; Bug Check Code Definitions
  8. ;
  9. APC_INDEX_MISMATCH equ 00001H
  10. ATTEMPTED_SWITCH_FROM_DPC equ 000B8H
  11. DATA_BUS_ERROR equ 0002EH
  12. DATA_COHERENCY_EXCEPTION equ 00055H
  13. HAL1_INITIALIZATION_FAILED equ 00061H
  14. INSTRUCTION_BUS_ERROR equ 0002FH
  15. INSTRUCTION_COHERENCY_EXCEPTION equ 00056H
  16. INTERRUPT_EXCEPTION_NOT_HANDLED equ 0003DH
  17. INTERRUPT_UNWIND_ATTEMPTED equ 0003CH
  18. INVALID_AFFINITY_SET equ 00003H
  19. INVALID_DATA_ACCESS_TRAP equ 00004H
  20. IRQL_GT_ZERO_AT_SYSTEM_SERVICE equ 0004AH
  21. IRQL_NOT_LESS_OR_EQUAL equ 0000AH
  22. KMODE_EXCEPTION_NOT_HANDLED equ 0001EH
  23. NMI_HARDWARE_FAILURE equ 00080H
  24. NO_USER_MODE_CONTEXT equ 0000EH
  25. PAGE_FAULT_WITH_INTERRUPTS_OFF equ 00049H
  26. PANIC_STACK_SWITCH equ 0002BH
  27. SPIN_LOCK_INIT_FAILURE equ 00081H
  28. SYSTEM_EXIT_OWNED_MUTEX equ 00039H
  29. SYSTEM_SERVICE_EXCEPTION equ 0003BH
  30. SYSTEM_UNWIND_PREVIOUS_USER equ 0003AH
  31. TRAP_CAUSE_UNKNOWN equ 00012H
  32. UNEXPECTED_KERNEL_MODE_TRAP equ 0007FH
  33. HARDWARE_INTERRUPT_STORM equ 000F2H
  34. RECURSIVE_MACHINE_CHECK equ 000FBH
  35. ;
  36. ; Breakpoint type definitions
  37. ;
  38. DBG_STATUS_CONTROL_C equ 00001H
  39. ;
  40. ; Exception Record Offset, Flag, and Enumerated Type Definitions
  41. ;
  42. EXCEPTION_NONCONTINUABLE equ 00001H
  43. EXCEPTION_UNWINDING equ 00002H
  44. EXCEPTION_EXIT_UNWIND equ 00004H
  45. EXCEPTION_STACK_INVALID equ 00008H
  46. EXCEPTION_NESTED_CALL equ 00010H
  47. EXCEPTION_TARGET_UNWIND equ 00020H
  48. EXCEPTION_COLLIDED_UNWIND equ 00040H
  49. EXCEPTION_UNWIND equ 00066H
  50. EXCEPTION_EXECUTE_HANDLER equ 00001H
  51. EXCEPTION_CONTINUE_SEARCH equ 00000H
  52. EXCEPTION_CONTINUE_EXECUTION equ 0FFFFFFFFH
  53. EXCEPTION_CHAIN_END equ 0FFFFFFFFH
  54. FIXED_NTVDMSTATE_LINEAR equ 00714H
  55. ExceptionContinueExecution equ 00000H
  56. ExceptionContinueSearch equ 00001H
  57. ExceptionNestedException equ 00002H
  58. ExceptionCollidedUnwind equ 00003H
  59. ErExceptionCode equ 00000H
  60. ErExceptionFlags equ 00004H
  61. ErExceptionRecord equ 00008H
  62. ErExceptionAddress equ 0000CH
  63. ErNumberParameters equ 00010H
  64. ErExceptionInformation equ 00014H
  65. ExceptionRecordLength equ 00050H
  66. ;
  67. ; Fast Mutex Structure Offset Definitions
  68. ;
  69. FmCount equ 00000H
  70. FmOwner equ 00004H
  71. FmContention equ 00008H
  72. FmEvent equ 0000CH
  73. FmOldIrql equ 0001CH
  74. ;
  75. ; Interrupt Priority Request Level Definitions
  76. ;
  77. PASSIVE_LEVEL equ 00000H
  78. APC_LEVEL equ 00001H
  79. DISPATCH_LEVEL equ 00002H
  80. CLOCK1_LEVEL equ 0001CH
  81. CLOCK2_LEVEL equ 0001CH
  82. IPI_LEVEL equ 0001DH
  83. POWER_LEVEL equ 0001EH
  84. PROFILE_LEVEL equ 0001BH
  85. HIGH_LEVEL equ 0001FH
  86. ifdef NT_UP
  87. SYNCH_LEVEL equ 00002H
  88. else
  89. SYNCH_LEVEL equ 0001BH
  90. endif
  91. ;
  92. ; Large Integer Structure Offset Definitions
  93. ;
  94. LiLowPart equ 00000H
  95. LiHighPart equ 00004H
  96. ;
  97. ; List Entry Structure Offset Definitions
  98. ;
  99. LsFlink equ 00000H
  100. LsBlink equ 00004H
  101. ;
  102. ; String Structure Offset Definitions
  103. ;
  104. StrLength equ 00000H
  105. StrMaximumLength equ 00002H
  106. StrBuffer equ 00004H
  107. ;
  108. ; System Time Structure Offset Definitions
  109. ;
  110. StLowTime equ 00000H
  111. StHigh1Time equ 00004H
  112. StHigh2Time equ 00008H
  113. ;
  114. ; Tick Count Offset Definitions
  115. ;
  116. UsTickCount equ 00320H
  117. ;
  118. ; Time Structure Offset Definitions
  119. ;
  120. TmLowTime equ 00000H
  121. TmHighTime equ 00004H
  122. ;
  123. ; DPC object Structure Offset Definitions
  124. ;
  125. DpType equ 00000H
  126. DpNumber equ 00002H
  127. DpImportance equ 00003H
  128. DpDpcListEntry equ 00004H
  129. DpDeferredRoutine equ 0000CH
  130. DpDeferredContext equ 00010H
  131. DpSystemArgument1 equ 00014H
  132. DpSystemArgument2 equ 00018H
  133. DpDpcData equ 0001CH
  134. DpcObjectLength equ 00020H
  135. PrDirectoryTableBase equ 00018H
  136. PrLdtDescriptor equ 00020H
  137. PrIopmOffset equ 00030H
  138. ThDebugActive equ 00003H
  139. ThStackLimit equ 0001CH
  140. ThApcState equ 00034H
  141. ;
  142. ; Lock Queue Structure Offset Definitions
  143. ;
  144. LOCK_QUEUE_WAIT equ 00001H
  145. LOCK_QUEUE_OWNER equ 00002H
  146. LOCK_QUEUE_HEADER_SIZE equ 00008H
  147. LockQueueDispatcherLock equ 00000H
  148. LqNext equ 00000H
  149. LqLock equ 00004H
  150. LqhNext equ 00000H
  151. LqhLock equ 00004H
  152. LqhOldIrql equ 00008H
  153. ;
  154. ; Processor Control Registers Structure Offset Definitions
  155. ;
  156. KI_BEGIN_KERNEL_RESERVED equ 0FFDF0000H
  157. ifdef NT_UP
  158. P0PCRADDRESS equ 0FFDFF000H
  159. PCR equ ds:[0FFDFF000H]
  160. else
  161. PCR equ fs:
  162. endif
  163. PcExceptionList equ 00000H
  164. PcInitialStack equ 00004H
  165. PcPerfGlobalGroupMask equ 00008H
  166. PcTssCopy equ 0000CH
  167. PcContextSwitches equ 00010H
  168. PcSetMemberCopy equ 00014H
  169. PcSelfPcr equ 0001CH
  170. PcPrcb equ 00020H
  171. PcTeb equ 00018H
  172. PcIrql equ 00024H
  173. PcIRR equ 00028H
  174. PcIrrActive equ 0002CH
  175. PcIDR equ 00030H
  176. PcIdt equ 00038H
  177. PcGdt equ 0003CH
  178. PcTss equ 00040H
  179. PcNumber equ 00051H
  180. PcVdmAlert equ 00054H
  181. PcSetMember equ 00048H
  182. PcStallScaleFactor equ 0004CH
  183. PcHal equ 00094H
  184. PcPrcbData equ 00120H
  185. ;
  186. ; Defines for user shared data
  187. ;
  188. USER_SHARED_DATA equ 0FFDF0000H
  189. MM_SHARED_USER_DATA_VA equ 07FFE0000H
  190. USERDATA equ ds:[0FFDF0000H]
  191. UsTickCountMultiplier equ 00004H
  192. UsInterruptTime equ 00008H
  193. UsSystemTime equ 00014H
  194. UsProcessorFeatures equ 00274H
  195. UsSystemCall equ 00300H
  196. PF_XMMI_INSTRUCTIONS_AVAILABLE equ 00006H
  197. ;
  198. ; Tss Structure Offset Definitions
  199. ;
  200. TssEsp0 equ 00004H
  201. TssCR3 equ 0001CH
  202. TssEip equ 00020H
  203. TssEFlags equ 00024H
  204. TssEax equ 00028H
  205. TssEbx equ 00034H
  206. TssEcx equ 0002CH
  207. TssEdx equ 00030H
  208. TssEsp equ 00038H
  209. TssEbp equ 0003CH
  210. TssEsi equ 00040H
  211. TssEdi equ 00044H
  212. TssEs equ 00048H
  213. TssCs equ 0004CH
  214. TssSs equ 00050H
  215. TssDs equ 00054H
  216. TssFs equ 00058H
  217. TssGs equ 0005CH
  218. TssLDT equ 00060H
  219. TssIoMapBase equ 00066H
  220. TssIoMaps equ 00068H
  221. TssLength equ 020ACH
  222. ;
  223. ; Gdt Descriptor Offset Definitions
  224. ;
  225. KGDT_R3_DATA equ 00020H
  226. KGDT_R3_CODE equ 00018H
  227. KGDT_R0_CODE equ 00008H
  228. KGDT_R0_DATA equ 00010H
  229. KGDT_R0_PCR equ 00030H
  230. KGDT_STACK16 equ 000F8H
  231. KGDT_CODE16 equ 000F0H
  232. KGDT_TSS equ 00028H
  233. KGDT_LDT equ 00048H
  234. ;
  235. ; GdtEntry Offset Definitions
  236. ;
  237. KgdtBaseLow equ 00002H
  238. KgdtBaseMid equ 00004H
  239. KgdtBaseHi equ 00007H
  240. KgdtLimitHi equ 00006H
  241. KgdtLimitLow equ 00000H
  242. ;
  243. ; Processor Block Structure Offset Definitions
  244. ;
  245. PbCurrentThread equ 00004H
  246. PbNextThread equ 00008H
  247. PbIdleThread equ 0000CH
  248. PbNumber equ 00010H
  249. PbSetMember equ 00014H
  250. PbCpuID equ 00019H
  251. PbCpuType equ 00018H
  252. PbCpuStep equ 0001AH
  253. PbProcessorState equ 0001CH
  254. PbHalReserved equ 0037CH
  255. PbLockQueue equ 00418H
  256. ;
  257. ; Time Fields (TIME_FIELDS) Structure Offset Definitions
  258. ;
  259. TfSecond equ 0000AH
  260. TfMinute equ 00008H
  261. TfHour equ 00006H
  262. TfWeekday equ 0000EH
  263. TfDay equ 00004H
  264. TfMonth equ 00002H
  265. TfYear equ 00000H
  266. TfMilliseconds equ 0000CH
  267. ;
  268. ; constants for system irql and IDT vector conversion
  269. ;
  270. MAXIMUM_IDTVECTOR equ 000FFH
  271. MAXIMUM_PRIMARY_VECTOR equ 000FFH
  272. PRIMARY_VECTOR_BASE equ 00030H
  273. RPL_MASK equ 00003H
  274. MODE_MASK equ 00001H
  275. ;
  276. ; Flags in the CR0 register
  277. ;
  278. CR0_PG equ 080000000H
  279. CR0_ET equ 00010H
  280. CR0_TS equ 00008H
  281. CR0_EM equ 00004H
  282. CR0_MP equ 00002H
  283. CR0_PE equ 00001H
  284. CR0_CD equ 040000000H
  285. CR0_NW equ 020000000H
  286. CR0_AM equ 040000H
  287. CR0_WP equ 010000H
  288. CR0_NE equ 00020H
  289. ;
  290. ; Flags in the CR4 register
  291. ;
  292. CR4_VME equ 00001H
  293. CR4_PVI equ 00002H
  294. CR4_TSD equ 00004H
  295. CR4_DE equ 00008H
  296. CR4_PSE equ 00010H
  297. CR4_PAE equ 00020H
  298. CR4_MCE equ 00040H
  299. CR4_PGE equ 00080H
  300. CR4_FXSR equ 00200H
  301. CR4_XMMEXCPT equ 00400H
  302. ;
  303. ; Miscellaneous Definitions
  304. ;
  305. MAXIMUM_PROCESSORS equ 00020H
  306. INITIAL_STALL_COUNT equ 00064H
  307. IRQL_NOT_GREATER_OR_EQUAL equ 00009H
  308. IRQL_NOT_LESS_OR_EQUAL equ 0000AH
  309. MUTEX_ALREADY_OWNED equ 000BFH
  310. THREAD_NOT_MUTEX_OWNER equ 00011H
  311. SPIN_LOCK_ALREADY_OWNED equ 0000FH
  312. SPIN_LOCK_NOT_OWNED equ 00010H
  313. ;
  314. ; Trap Frame Offset Definitions and Length
  315. ;
  316. TsExceptionList equ 0004CH
  317. TsPreviousPreviousMode equ 00048H
  318. TsSegGs equ 00030H
  319. TsSegFs equ 00050H
  320. TsSegEs equ 00034H
  321. TsSegDs equ 00038H
  322. TsEdi equ 00054H
  323. TsEsi equ 00058H
  324. TsEbp equ 00060H
  325. TsEbx equ 0005CH
  326. TsEdx equ 0003CH
  327. TsEcx equ 00040H
  328. TsEax equ 00044H
  329. TsErrCode equ 00064H
  330. TsEip equ 00068H
  331. TsSegCs equ 0006CH
  332. TsEflags equ 00070H
  333. TsHardwareEsp equ 00074H
  334. TsHardwareSegSs equ 00078H
  335. TsTempSegCs equ 00010H
  336. TsTempEsp equ 00014H
  337. TsDbgEbp equ 00000H
  338. TsDbgEip equ 00004H
  339. TsDbgArgMark equ 00008H
  340. TsDbgArgPointer equ 0000CH
  341. TsDr0 equ 00018H
  342. TsDr1 equ 0001CH
  343. TsDr2 equ 00020H
  344. TsDr3 equ 00024H
  345. TsDr6 equ 00028H
  346. TsDr7 equ 0002CH
  347. TsV86Es equ 0007CH
  348. TsV86Ds equ 00080H
  349. TsV86Fs equ 00084H
  350. TsV86Gs equ 00088H
  351. KTRAP_FRAME_LENGTH equ 0008CH
  352. KTRAP_FRAME_ALIGN equ 00004H
  353. FRAME_EDITED equ 0FFF8H
  354. EFLAGS_ALIGN_CHECK equ 040000H
  355. EFLAGS_V86_MASK equ 020000H
  356. EFLAGS_INTERRUPT_MASK equ 00200H
  357. EFLAGS_TF equ 00100H
  358. EFLAGS_VIF equ 080000H
  359. EFLAGS_VIP equ 0100000H
  360. EFLAGS_USER_SANITIZE equ 03F4DD7H
  361. ;
  362. ; Context Frame Offset and Flag Definitions
  363. ;
  364. CONTEXT_FULL equ 010007H
  365. CONTEXT_DEBUG_REGISTERS equ 010010H
  366. CONTEXT_CONTROL equ 010001H
  367. CONTEXT_FLOATING_POINT equ 010008H
  368. CONTEXT_INTEGER equ 010002H
  369. CONTEXT_SEGMENTS equ 010004H
  370. CsContextFlags equ 00000H
  371. CsDr0 equ 00004H
  372. CsDr1 equ 00008H
  373. CsDr2 equ 0000CH
  374. CsDr3 equ 00010H
  375. CsDr6 equ 00014H
  376. CsDr7 equ 00018H
  377. CsFloatSave equ 0001CH
  378. CsSegGs equ 0008CH
  379. CsSegFs equ 00090H
  380. CsSegEs equ 00094H
  381. CsSegDs equ 00098H
  382. CsEdi equ 0009CH
  383. CsEsi equ 000A0H
  384. CsEbx equ 000A4H
  385. CsEdx equ 000A8H
  386. CsEcx equ 000ACH
  387. CsEax equ 000B0H
  388. CsEbp equ 000B4H
  389. CsEip equ 000B8H
  390. CsSegCs equ 000BCH
  391. CsEflags equ 000C0H
  392. CsEsp equ 000C4H
  393. CsSegSs equ 000C8H
  394. CsExtendedRegisters equ 000CCH
  395. ContextFrameLength equ 002D0H
  396. DR6_LEGAL equ 0E00FH
  397. DR7_LEGAL equ 0FFFF0155H
  398. DR7_ACTIVE equ 00055H
  399. ErrHandler equ 00004H
  400. ErrNext equ 00000H
  401. ;
  402. ; Floating save area field offset definitions
  403. ;
  404. FpControlWord equ 00000H
  405. FpStatusWord equ 00004H
  406. FpTagWord equ 00008H
  407. FpErrorOffset equ 0000CH
  408. FpErrorSelector equ 00010H
  409. FpDataOffset equ 00014H
  410. FpDataSelector equ 00018H
  411. FpRegisterArea equ 0001CH
  412. FpCtxtCr0NpxState equ 0006CH
  413. ;
  414. ; FX Floating save area field offset definitions
  415. ;
  416. FxControlWord equ 00000H
  417. FxStatusWord equ 00002H
  418. FxTagWord equ 00004H
  419. FxErrorOpcode equ 00006H
  420. FxErrorOffset equ 00008H
  421. FxErrorSelector equ 0000CH
  422. FxDataOffset equ 00010H
  423. FxDataSelector equ 00014H
  424. FxMXCsr equ 00018H
  425. FxFpRegisterArea equ 00020H
  426. FpNpxSavedCpu equ 00208H
  427. FpCr0NpxState equ 0020CH
  428. NPX_FRAME_LENGTH equ 00210H
  429. ;
  430. ; Processor State Frame Offset Definitions
  431. ;
  432. PsContextFrame equ 00000H
  433. PsSpecialRegisters equ 002CCH
  434. SrCr0 equ 00000H
  435. SrCr2 equ 00004H
  436. SrCr3 equ 00008H
  437. SrCr4 equ 0000CH
  438. SrKernelDr0 equ 00010H
  439. SrKernelDr1 equ 00014H
  440. SrKernelDr2 equ 00018H
  441. SrKernelDr3 equ 0001CH
  442. SrKernelDr6 equ 00020H
  443. SrKernelDr7 equ 00024H
  444. SrGdtr equ 0002AH
  445. SrIdtr equ 00032H
  446. SrTr equ 00038H
  447. SrLdtr equ 0003AH
  448. ProcessorStateLength equ 00320H
  449. ;
  450. ; Machine type definitions (Temporarily)
  451. ;
  452. MACHINE_TYPE_ISA equ 00000H
  453. MACHINE_TYPE_EISA equ 00001H
  454. MACHINE_TYPE_MCA equ 00002H
  455. ;
  456. ; LoaderParameterBlock offsets relative to base
  457. ;
  458. LpbLoadOrderListHead equ 00000H
  459. LpbMemoryDescriptorListHead equ 00008H
  460. LpbKernelStack equ 00018H
  461. LpbPrcb equ 0001CH
  462. LpbProcess equ 00020H
  463. LpbThread equ 00024H
  464. LpbI386 equ 0005CH
  465. LpbRegistryLength equ 00028H
  466. LpbRegistryBase equ 0002CH
  467. LpbConfigurationRoot equ 00030H
  468. LpbArcBootDeviceName equ 00034H
  469. LpbArcHalDeviceName equ 00038H
  470. LpbExtension equ 00058H
  471. ;
  472. ; LoaderParameterExtension offsets relative to base
  473. ;
  474. LpeHalpIRQLToTPR equ 00040H
  475. LpeHalpVectorToIRQL equ 00044H