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.

525 lines
10 KiB

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