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.

836 lines
18 KiB

  1. #include "kxia64.h"
  2. #include "regia64.h"
  3. //
  4. // Wait Reason and Wait Type Enumerated Type Values
  5. //
  6. #define WrExecutive 0x0
  7. #define AsProcess 0x20
  8. //
  9. // Bug Check Code Definitions
  10. //
  11. #define APC_INDEX_MISMATCH 0x1
  12. #define ATTEMPTED_SWITCH_FROM_DPC 0xb8
  13. #define DATA_BUS_ERROR 0x2e
  14. #define DATA_COHERENCY_EXCEPTION 0x55
  15. #define HAL1_INITIALIZATION_FAILED 0x61
  16. #define INSTRUCTION_BUS_ERROR 0x2f
  17. #define INSTRUCTION_COHERENCY_EXCEPTION 0x56
  18. #define INTERRUPT_EXCEPTION_NOT_HANDLED 0x3d
  19. #define INTERRUPT_UNWIND_ATTEMPTED 0x3c
  20. #define INVALID_AFFINITY_SET 0x3
  21. #define INVALID_DATA_ACCESS_TRAP 0x4
  22. #define IRQL_GT_ZERO_AT_SYSTEM_SERVICE 0x4a
  23. #define IRQL_NOT_LESS_OR_EQUAL 0xa
  24. #define KMODE_EXCEPTION_NOT_HANDLED 0x1e
  25. #define NMI_HARDWARE_FAILURE 0x80
  26. #define NO_USER_MODE_CONTEXT 0xe
  27. #define PAGE_FAULT_WITH_INTERRUPTS_OFF 0x49
  28. #define PANIC_STACK_SWITCH 0x2b
  29. #define SPIN_LOCK_INIT_FAILURE 0x81
  30. #define SYSTEM_EXIT_OWNED_MUTEX 0x39
  31. #define SYSTEM_SERVICE_EXCEPTION 0x3b
  32. #define SYSTEM_UNWIND_PREVIOUS_USER 0x3a
  33. #define TRAP_CAUSE_UNKNOWN 0x12
  34. #define UNEXPECTED_KERNEL_MODE_TRAP 0x7f
  35. #define HARDWARE_INTERRUPT_STORM 0xf2
  36. #define RECURSIVE_MACHINE_CHECK 0xfb
  37. //
  38. // Breakpoint type definitions
  39. //
  40. #define DBG_STATUS_CONTROL_C 0x1
  41. //
  42. // Exception Record Offset, Flag, and Enumerated Type Definitions
  43. //
  44. #define EXCEPTION_NONCONTINUABLE 0x1
  45. #define EXCEPTION_UNWINDING 0x2
  46. #define EXCEPTION_EXIT_UNWIND 0x4
  47. #define EXCEPTION_STACK_INVALID 0x8
  48. #define EXCEPTION_NESTED_CALL 0x10
  49. #define EXCEPTION_TARGET_UNWIND 0x20
  50. #define EXCEPTION_COLLIDED_UNWIND 0x40
  51. #define EXCEPTION_UNWIND 0x66
  52. #define EXCEPTION_EXECUTE_HANDLER 0x1
  53. #define EXCEPTION_CONTINUE_SEARCH 0x0
  54. #define EXCEPTION_CONTINUE_EXECUTION 0xffffffff
  55. #define ExceptionContinueExecution 0x0
  56. #define ExceptionContinueSearch 0x1
  57. #define ExceptionNestedException 0x2
  58. #define ExceptionCollidedUnwind 0x3
  59. #define ErExceptionCode 0x0
  60. #define ErExceptionFlags 0x4
  61. #define ErExceptionRecord 0x8
  62. #define ErExceptionAddress 0x10
  63. #define ErNumberParameters 0x18
  64. #define ErExceptionInformation 0x20
  65. #define ExceptionRecordLength 0xa0
  66. //
  67. // Fast Mutex Structure Offset Definitions
  68. //
  69. #define FmCount 0x0
  70. #define FmOwner 0x8
  71. #define FmContention 0x10
  72. #define FmEvent 0x18
  73. #define FmOldIrql 0x30
  74. //
  75. // Interrupt Priority Request Level Definitions
  76. //
  77. #define PASSIVE_LEVEL 0x0
  78. #define APC_LEVEL 0x1
  79. #define DISPATCH_LEVEL 0x2
  80. #define IPI_LEVEL 0xe
  81. #define POWER_LEVEL 0xf
  82. #define PROFILE_LEVEL 0xf
  83. #define HIGH_LEVEL 0xf
  84. #ifdef NT_UP
  85. #define SYNCH_LEVEL 0x2
  86. #else
  87. #define SYNCH_LEVEL 0xc
  88. #endif
  89. //
  90. // Large Integer Structure Offset Definitions
  91. //
  92. #define LiLowPart 0x0
  93. #define LiHighPart 0x4
  94. //
  95. // List Entry Structure Offset Definitions
  96. //
  97. #define LsFlink 0x0
  98. #define LsBlink 0x8
  99. //
  100. // String Structure Offset Definitions
  101. //
  102. #define StrLength 0x0
  103. #define StrMaximumLength 0x2
  104. #define StrBuffer 0x8
  105. //
  106. // Tick Count Offset Definitions
  107. //
  108. #define UsTickCount 0x320
  109. //
  110. // Time Structure Offset Definitions
  111. //
  112. #define TmLowTime 0x0
  113. #define TmHighTime 0x4
  114. //
  115. // DPC object Structure Offset Definitions
  116. //
  117. #define DpType 0x0
  118. #define DpNumber 0x2
  119. #define DpImportance 0x3
  120. #define DpDpcListEntry 0x8
  121. #define DpDeferredRoutine 0x18
  122. #define DpDeferredContext 0x20
  123. #define DpSystemArgument1 0x28
  124. #define DpSystemArgument2 0x30
  125. #define DpDpcData 0x38
  126. #define DpcObjectLength 0x40
  127. //
  128. // Interrupt Object Structure Offset Definitions
  129. //
  130. #define InLevelSensitive 0x0
  131. #define InLatched 0x1
  132. #define InType 0x0
  133. #define InSize 0x2
  134. #define InInterruptListEntry 0x8
  135. #define InServiceRoutine 0x18
  136. #define InServiceContext 0x20
  137. #define InSpinLock 0x28
  138. #define InTickCount 0x30
  139. #define InActualLock 0x38
  140. #define InDispatchAddress 0x40
  141. #define InVector 0x48
  142. #define InIrql 0x4c
  143. #define InSynchronizeIrql 0x4d
  144. #define InFloatingSave 0x4e
  145. #define InConnected 0x4f
  146. #define InNumber 0x50
  147. #define InShareVector 0x51
  148. #define InMode 0x54
  149. #define InServiceCount 0x58
  150. #define InDispatchCount 0x5c
  151. #define InDispatchCode 0x60
  152. #define InterruptObjectLength 0x70
  153. #define PrDirectoryTableBase 0x28
  154. #define ThDebugActive 0x3
  155. #define ThStackLimit 0x30
  156. #define ThApcState 0x78
  157. //
  158. // Processor Block Structure Offset Definitions
  159. //
  160. #define PRCB_MINOR_VERSION 0x1
  161. #define PRCB_MAJOR_VERSION 0x1
  162. #define PbMinorVersion 0x0
  163. #define PbMajorVersion 0x2
  164. #define PbCurrentThread 0x8
  165. #define PbNextThread 0x10
  166. #define PbIdleThread 0x18
  167. #define PbNumber 0x20
  168. #define PbBuildType 0x22
  169. #define PbSetMember 0x28
  170. #define PbRestartBlock 0x30
  171. #define PbPcrPage 0x38
  172. #define PbProcessorModel 0x50
  173. #define PbProcessorRevision 0x54
  174. #define PbProcessorFamily 0x58
  175. #define PbProcessorSerialNumber 0x60
  176. #define PbProcessorFeatureBits 0x68
  177. #define PbProcessorVendorString 0x70
  178. #define PbSystemReserved 0x80
  179. #define PbHalReserved 0xc0
  180. //
  181. // Context Frame Offset and Flag Definitions
  182. //
  183. #define CONTEXT_FULL 0x8002f
  184. #define CONTEXT_CONTROL 0x80001
  185. #define CONTEXT_INTEGER 0x80008
  186. #define CONTEXT_LOWER_FLOATING_POINT 0x80002
  187. #define CONTEXT_HIGHER_FLOATING_POINT 0x80004
  188. #define CONTEXT_FLOATING_POINT 0x80006
  189. #define CONTEXT_DEBUG 0x80010
  190. #define CONTEXT_IA32_CONTROL 0x80020
  191. #define CxContextFlags 0x0
  192. #define CxDbI0 0x10
  193. #define CxDbI1 0x18
  194. #define CxDbI2 0x20
  195. #define CxDbI3 0x28
  196. #define CxDbI4 0x30
  197. #define CxDbI5 0x38
  198. #define CxDbI6 0x40
  199. #define CxDbI7 0x48
  200. #define CxDbD0 0x50
  201. #define CxDbD1 0x58
  202. #define CxDbD2 0x60
  203. #define CxDbD3 0x68
  204. #define CxDbD4 0x70
  205. #define CxDbD5 0x78
  206. #define CxDbD6 0x80
  207. #define CxDbD7 0x88
  208. #define CxFltS0 0x90
  209. #define CxFltS1 0xa0
  210. #define CxFltS2 0xb0
  211. #define CxFltS3 0xc0
  212. #define CxFltT0 0xd0
  213. #define CxFltT1 0xe0
  214. #define CxFltT2 0xf0
  215. #define CxFltT3 0x100
  216. #define CxFltT4 0x110
  217. #define CxFltT5 0x120
  218. #define CxFltT6 0x130
  219. #define CxFltT7 0x140
  220. #define CxFltT8 0x150
  221. #define CxFltT9 0x160
  222. #define CxFltS4 0x170
  223. #define CxFltS5 0x180
  224. #define CxFltS6 0x190
  225. #define CxFltS7 0x1a0
  226. #define CxFltS8 0x1b0
  227. #define CxFltS9 0x1c0
  228. #define CxFltS10 0x1d0
  229. #define CxFltS11 0x1e0
  230. #define CxFltS12 0x1f0
  231. #define CxFltS13 0x200
  232. #define CxFltS14 0x210
  233. #define CxFltS15 0x220
  234. #define CxFltS16 0x230
  235. #define CxFltS17 0x240
  236. #define CxFltS18 0x250
  237. #define CxFltS19 0x260
  238. #define CxFltF32 0x270
  239. #define CxFltF33 0x280
  240. #define CxFltF34 0x290
  241. #define CxFltF35 0x2a0
  242. #define CxFltF36 0x2b0
  243. #define CxFltF37 0x2c0
  244. #define CxFltF38 0x2d0
  245. #define CxFltF39 0x2e0
  246. #define CxFltF40 0x2f0
  247. #define CxFltF41 0x300
  248. #define CxFltF42 0x310
  249. #define CxFltF43 0x320
  250. #define CxFltF44 0x330
  251. #define CxFltF45 0x340
  252. #define CxFltF46 0x350
  253. #define CxFltF47 0x360
  254. #define CxFltF48 0x370
  255. #define CxFltF49 0x380
  256. #define CxFltF50 0x390
  257. #define CxFltF51 0x3a0
  258. #define CxFltF52 0x3b0
  259. #define CxFltF53 0x3c0
  260. #define CxFltF54 0x3d0
  261. #define CxFltF55 0x3e0
  262. #define CxFltF56 0x3f0
  263. #define CxFltF57 0x400
  264. #define CxFltF58 0x410
  265. #define CxFltF59 0x420
  266. #define CxFltF60 0x430
  267. #define CxFltF61 0x440
  268. #define CxFltF62 0x450
  269. #define CxFltF63 0x460
  270. #define CxFltF64 0x470
  271. #define CxFltF65 0x480
  272. #define CxFltF66 0x490
  273. #define CxFltF67 0x4a0
  274. #define CxFltF68 0x4b0
  275. #define CxFltF69 0x4c0
  276. #define CxFltF70 0x4d0
  277. #define CxFltF71 0x4e0
  278. #define CxFltF72 0x4f0
  279. #define CxFltF73 0x500
  280. #define CxFltF74 0x510
  281. #define CxFltF75 0x520
  282. #define CxFltF76 0x530
  283. #define CxFltF77 0x540
  284. #define CxFltF78 0x550
  285. #define CxFltF79 0x560
  286. #define CxFltF80 0x570
  287. #define CxFltF81 0x580
  288. #define CxFltF82 0x590
  289. #define CxFltF83 0x5a0
  290. #define CxFltF84 0x5b0
  291. #define CxFltF85 0x5c0
  292. #define CxFltF86 0x5d0
  293. #define CxFltF87 0x5e0
  294. #define CxFltF88 0x5f0
  295. #define CxFltF89 0x600
  296. #define CxFltF90 0x610
  297. #define CxFltF91 0x620
  298. #define CxFltF92 0x630
  299. #define CxFltF93 0x640
  300. #define CxFltF94 0x650
  301. #define CxFltF95 0x660
  302. #define CxFltF96 0x670
  303. #define CxFltF97 0x680
  304. #define CxFltF98 0x690
  305. #define CxFltF99 0x6a0
  306. #define CxFltF100 0x6b0
  307. #define CxFltF101 0x6c0
  308. #define CxFltF102 0x6d0
  309. #define CxFltF103 0x6e0
  310. #define CxFltF104 0x6f0
  311. #define CxFltF105 0x700
  312. #define CxFltF106 0x710
  313. #define CxFltF107 0x720
  314. #define CxFltF108 0x730
  315. #define CxFltF109 0x740
  316. #define CxFltF110 0x750
  317. #define CxFltF111 0x760
  318. #define CxFltF112 0x770
  319. #define CxFltF113 0x780
  320. #define CxFltF114 0x790
  321. #define CxFltF115 0x7a0
  322. #define CxFltF116 0x7b0
  323. #define CxFltF117 0x7c0
  324. #define CxFltF118 0x7d0
  325. #define CxFltF119 0x7e0
  326. #define CxFltF120 0x7f0
  327. #define CxFltF121 0x800
  328. #define CxFltF122 0x810
  329. #define CxFltF123 0x820
  330. #define CxFltF124 0x830
  331. #define CxFltF125 0x840
  332. #define CxFltF126 0x850
  333. #define CxFltF127 0x860
  334. #define CxStFPSR 0x870
  335. #define CxIntGp 0x878
  336. #define CxIntT0 0x880
  337. #define CxIntT1 0x888
  338. #define CxIntS0 0x890
  339. #define CxIntS1 0x898
  340. #define CxIntS2 0x8a0
  341. #define CxIntS3 0x8a8
  342. #define CxIntV0 0x8b0
  343. #define CxIntT2 0x8b8
  344. #define CxIntT3 0x8c0
  345. #define CxIntT4 0x8c8
  346. #define CxIntSp 0x8d0
  347. #define CxIntTeb 0x8d8
  348. #define CxIntT5 0x8e0
  349. #define CxIntT6 0x8e8
  350. #define CxIntT7 0x8f0
  351. #define CxIntT8 0x8f8
  352. #define CxIntT9 0x900
  353. #define CxIntT10 0x908
  354. #define CxIntT11 0x910
  355. #define CxIntT12 0x918
  356. #define CxIntT13 0x920
  357. #define CxIntT14 0x928
  358. #define CxIntT15 0x930
  359. #define CxIntT16 0x938
  360. #define CxIntT17 0x940
  361. #define CxIntT18 0x948
  362. #define CxIntT19 0x950
  363. #define CxIntT20 0x958
  364. #define CxIntT21 0x960
  365. #define CxIntT22 0x968
  366. #define CxIntNats 0x970
  367. #define CxPreds 0x978
  368. #define CxBrRp 0x980
  369. #define CxBrS0 0x988
  370. #define CxBrS1 0x990
  371. #define CxBrS2 0x998
  372. #define CxBrS3 0x9a0
  373. #define CxBrS4 0x9a8
  374. #define CxBrT0 0x9b0
  375. #define CxBrT1 0x9b8
  376. #define CxApUNAT 0x9c0
  377. #define CxApLC 0x9c8
  378. #define CxApEC 0x9d0
  379. #define CxApCCV 0x9d8
  380. #define CxApDCR 0x9e0
  381. #define CxRsPFS 0x9e8
  382. #define CxRsBSP 0x9f0
  383. #define CxRsBSPSTORE 0x9f8
  384. #define CxRsRSC 0xa00
  385. #define CxRsRNAT 0xa08
  386. #define CxStIPSR 0xa10
  387. #define CxStIIP 0xa18
  388. #define CxStIFS 0xa20
  389. #define CxStFCR 0xa28
  390. #define CxEflag 0xa30
  391. #define CxSegCSD 0xa38
  392. #define CxSegSSD 0xa40
  393. #define CxCflag 0xa48
  394. #define CxStFSR 0xa50
  395. #define CxStFIR 0xa58
  396. #define CxStFDR 0xa60
  397. #define ContextFrameLength 0xa70
  398. //
  399. // Dispatcher Context Structure Offset Definitions
  400. //
  401. #define DcControlPc 0x10
  402. #define DcFunctionEntry 0x20
  403. #define DcEstablisherFrame 0x0
  404. #define DcContextRecord 0x28
  405. //
  406. // Debug Register Offset Definitions and Length
  407. //
  408. #define TsAr21 0x0
  409. #define TsAr24 0x8
  410. #define TsAr26 0x18
  411. #define TsAr27 0x20
  412. #define TsAr28 0x28
  413. #define TsAr29 0x30
  414. #define TsAr30 0x38
  415. //
  416. // Higher FP Volatile Offset Definitions and Length
  417. //
  418. #define HiFltF32 0x0
  419. #define HiFltF33 0x10
  420. #define HiFltF34 0x20
  421. #define HiFltF35 0x30
  422. #define HiFltF36 0x40
  423. #define HiFltF37 0x50
  424. #define HiFltF38 0x60
  425. #define HiFltF39 0x70
  426. #define HiFltF40 0x80
  427. #define HiFltF41 0x90
  428. #define HiFltF42 0xa0
  429. #define HiFltF43 0xb0
  430. #define HiFltF44 0xc0
  431. #define HiFltF45 0xd0
  432. #define HiFltF46 0xe0
  433. #define HiFltF47 0xf0
  434. #define HiFltF48 0x100
  435. #define HiFltF49 0x110
  436. #define HiFltF50 0x120
  437. #define HiFltF51 0x130
  438. #define HiFltF52 0x140
  439. #define HiFltF53 0x150
  440. #define HiFltF54 0x160
  441. #define HiFltF55 0x170
  442. #define HiFltF56 0x180
  443. #define HiFltF57 0x190
  444. #define HiFltF58 0x1a0
  445. #define HiFltF59 0x1b0
  446. #define HiFltF60 0x1c0
  447. #define HiFltF61 0x1d0
  448. #define HiFltF62 0x1e0
  449. #define HiFltF63 0x1f0
  450. #define HiFltF64 0x200
  451. #define HiFltF65 0x210
  452. #define HiFltF66 0x220
  453. #define HiFltF67 0x230
  454. #define HiFltF68 0x240
  455. #define HiFltF69 0x250
  456. #define HiFltF70 0x260
  457. #define HiFltF71 0x270
  458. #define HiFltF72 0x280
  459. #define HiFltF73 0x290
  460. #define HiFltF74 0x2a0
  461. #define HiFltF75 0x2b0
  462. #define HiFltF76 0x2c0
  463. #define HiFltF77 0x2d0
  464. #define HiFltF78 0x2e0
  465. #define HiFltF79 0x2f0
  466. #define HiFltF80 0x300
  467. #define HiFltF81 0x310
  468. #define HiFltF82 0x320
  469. #define HiFltF83 0x330
  470. #define HiFltF84 0x340
  471. #define HiFltF85 0x350
  472. #define HiFltF86 0x360
  473. #define HiFltF87 0x370
  474. #define HiFltF88 0x380
  475. #define HiFltF89 0x390
  476. #define HiFltF90 0x3a0
  477. #define HiFltF91 0x3b0
  478. #define HiFltF92 0x3c0
  479. #define HiFltF93 0x3d0
  480. #define HiFltF94 0x3e0
  481. #define HiFltF95 0x3f0
  482. #define HiFltF96 0x400
  483. #define HiFltF97 0x410
  484. #define HiFltF98 0x420
  485. #define HiFltF99 0x430
  486. #define HiFltF100 0x440
  487. #define HiFltF101 0x450
  488. #define HiFltF102 0x460
  489. #define HiFltF103 0x470
  490. #define HiFltF104 0x480
  491. #define HiFltF105 0x490
  492. #define HiFltF106 0x4a0
  493. #define HiFltF107 0x4b0
  494. #define HiFltF108 0x4c0
  495. #define HiFltF109 0x4d0
  496. #define HiFltF110 0x4e0
  497. #define HiFltF111 0x4f0
  498. #define HiFltF112 0x500
  499. #define HiFltF113 0x510
  500. #define HiFltF114 0x520
  501. #define HiFltF115 0x530
  502. #define HiFltF116 0x540
  503. #define HiFltF117 0x550
  504. #define HiFltF118 0x560
  505. #define HiFltF119 0x570
  506. #define HiFltF120 0x580
  507. #define HiFltF121 0x590
  508. #define HiFltF122 0x5a0
  509. #define HiFltF123 0x5b0
  510. #define HiFltF124 0x5c0
  511. #define HiFltF125 0x5d0
  512. #define HiFltF126 0x5e0
  513. #define HiFltF127 0x5f0
  514. //
  515. // Debug Register Offset Definitions and Length
  516. //
  517. #define DrDbI0 0x0
  518. #define DrDbI1 0x8
  519. #define DrDbI2 0x10
  520. #define DrDbI3 0x18
  521. #define DrDbI4 0x20
  522. #define DrDbI5 0x28
  523. #define DrDbI6 0x30
  524. #define DrDbI7 0x38
  525. #define DrDbD0 0x40
  526. #define DrDbD1 0x48
  527. #define DrDbD2 0x50
  528. #define DrDbD3 0x58
  529. #define DrDbD4 0x60
  530. #define DrDbD5 0x68
  531. #define DrDbD6 0x70
  532. #define DrDbD7 0x78
  533. #define TsAppRegisters 0x0
  534. #define TsPerfRegisters 0x40
  535. #define TsHigherFPVolatile 0x80
  536. #define TsDebugRegisters 0x680
  537. #define ThreadStateSaveAreaLength 0x700
  538. //
  539. // Exception Frame Offset Definitions and Length
  540. //
  541. #define ExFltS0 0x60
  542. #define ExFltS1 0x70
  543. #define ExFltS2 0x80
  544. #define ExFltS3 0x90
  545. #define ExFltS4 0xa0
  546. #define ExFltS5 0xb0
  547. #define ExFltS6 0xc0
  548. #define ExFltS7 0xd0
  549. #define ExFltS8 0xe0
  550. #define ExFltS9 0xf0
  551. #define ExFltS10 0x100
  552. #define ExFltS11 0x110
  553. #define ExFltS12 0x120
  554. #define ExFltS13 0x130
  555. #define ExFltS14 0x140
  556. #define ExFltS15 0x150
  557. #define ExFltS16 0x160
  558. #define ExFltS17 0x170
  559. #define ExFltS18 0x180
  560. #define ExFltS19 0x190
  561. #define ExIntS0 0x18
  562. #define ExIntS1 0x20
  563. #define ExIntS2 0x28
  564. #define ExIntS3 0x30
  565. #define ExIntNats 0x10
  566. #define ExBrS0 0x38
  567. #define ExBrS1 0x40
  568. #define ExBrS2 0x48
  569. #define ExBrS3 0x50
  570. #define ExBrS4 0x58
  571. #define ExApEC 0x0
  572. #define ExApLC 0x8
  573. #define ExceptionFrameLength 0x1a0
  574. //
  575. // Switch Frame Offset Definitions and Length
  576. //
  577. #define SwExFrame 0x30
  578. #define SwPreds 0x0
  579. #define SwRp 0x8
  580. #define SwPFS 0x10
  581. #define SwFPSR 0x18
  582. #define SwBsp 0x20
  583. #define SwRnat 0x28
  584. #define SwitchFrameLength 0x1d0
  585. //
  586. // Plabel structure offset definitions
  587. //
  588. #define PlEntryPoint 0x0
  589. #define PlGlobalPointer 0x8
  590. //
  591. // Trap Frame Offset Definitions and Length
  592. //
  593. #define TrFltT0 0x50
  594. #define TrFltT1 0x60
  595. #define TrFltT2 0x70
  596. #define TrFltT3 0x80
  597. #define TrFltT4 0x90
  598. #define TrFltT5 0xa0
  599. #define TrFltT6 0xb0
  600. #define TrFltT7 0xc0
  601. #define TrFltT8 0xd0
  602. #define TrFltT9 0xe0
  603. #define TrIntGp 0xf0
  604. #define TrIntT0 0xf8
  605. #define TrIntT1 0x100
  606. #define TrApUNAT 0x108
  607. #define TrApCCV 0x110
  608. #define TrSegCSD 0x118
  609. #define TrPreds 0x120
  610. #define TrIntV0 0x128
  611. #define TrIntT2 0x130
  612. #define TrIntT3 0x138
  613. #define TrIntT4 0x140
  614. #define TrIntSp 0x148
  615. #define TrIntTeb 0x150
  616. #define TrIntT5 0x158
  617. #define TrIntT6 0x160
  618. #define TrIntT7 0x168
  619. #define TrIntT8 0x170
  620. #define TrIntT9 0x178
  621. #define TrIntT10 0x180
  622. #define TrIntT11 0x188
  623. #define TrIntT12 0x190
  624. #define TrIntT13 0x198
  625. #define TrIntT14 0x1a0
  626. #define TrIntT15 0x1a8
  627. #define TrIntT16 0x1b0
  628. #define TrIntT17 0x1b8
  629. #define TrIntT18 0x1c0
  630. #define TrIntT19 0x1c8
  631. #define TrIntT20 0x1d0
  632. #define TrIntT21 0x1d8
  633. #define TrIntT22 0x1e0
  634. #define TrIntNats 0x1e8
  635. #define TrBrRp 0x1f0
  636. #define TrBrT0 0x1f8
  637. #define TrBrT1 0x200
  638. #define TrRsPFS 0x228
  639. #define TrRsBSP 0x210
  640. #define TrRsRSC 0x208
  641. #define TrRsRNAT 0x220
  642. #define TrRsBSPSTORE 0x218
  643. #define TrStIPSR 0x230
  644. #define TrStISR 0x250
  645. #define TrStIFA 0x258
  646. #define TrStIIP 0x238
  647. #define TrStIIPA 0x260
  648. #define TrStIFS 0x240
  649. #define TrStIIM 0x268
  650. #define TrStIHA 0x270
  651. #define TrStFPSR 0x248
  652. #define TrOldIrql 0x278
  653. #define TrPreviousMode 0x27c
  654. #define TrTrapFrame 0x280
  655. #define TrNewBSP 0x328
  656. #define TrEOFMarker 0x330
  657. #define TrExceptionRecord 0x288
  658. #define TrapFrameLength 0x340
  659. #define TrapFrameArguments 0x40
  660. #define KTRAP_FRAME_EOF 0xe0f0e0f0e0f0e000
  661. //
  662. // Translation Register Info Definitions
  663. //
  664. #define TrInfoValid 0x0
  665. #define TrInfoPageSize 0x4
  666. #define TrInfoVirtualAddress 0x8
  667. #define TrInfoLength 0x28
  668. //
  669. // Loader Parameter Block Offset Definitions
  670. //
  671. #define LpbLoadOrderListHead 0x0
  672. #define LpbMemoryDescriptorListHead 0x10
  673. #define LpbKernelStack 0x30
  674. #define LpbPrcb 0x38
  675. #define LpbProcess 0x40
  676. #define LpbThread 0x48
  677. #define LpbAcpiRsdt 0x108
  678. #define LpbKernelPhysicalBase 0xc0
  679. #define LpbKernelVirtualBase 0xc8
  680. #define LpbInterruptStack 0xd0
  681. #define LpbPanicStack 0xd8
  682. #define LpbPcrPage 0xe0
  683. #define LpbPdrPage 0xe8
  684. #define LpbPcrPage2 0xf0
  685. #define LpbMachineType 0xb8
  686. #define LpbItrInfo 0x188
  687. #define LpbDtrInfo 0x2c8
  688. //
  689. // Address Space Layout Definitions
  690. //
  691. #define UREGION_INDEX 0x0
  692. #define KSEG0_BASE 0xe000000080000000
  693. #define KSEG2_BASE 0xe0000000a0000000
  694. #define KADDRESS_BASE 0xe000000000000000
  695. #define UADDRESS_BASE 0x0
  696. #define SADDRESS_BASE 0x2000000000000000
  697. //
  698. // Page Table and Directory Entry Definitions
  699. //
  700. #define PAGE_SIZE 0x2000
  701. #define PAGE_SHIFT 0xd
  702. #define PDI_SHIFT 0x17
  703. #define PTI_SHIFT 0xd
  704. #define PTE_SHIFT 0x3
  705. #define VHPT_PDE_BITS 0x28
  706. #define LARGE_PAGE_SIZE 0x1000000
  707. #define LARGE_PAGE_SHIFT 0x18
  708. //
  709. // Breakpoint Definitions
  710. //
  711. #define USER_BREAKPOINT 0x80002
  712. #define KERNEL_BREAKPOINT 0x80001
  713. #define BREAKPOINT_BREAKIN 0x80019
  714. //
  715. // Miscellaneous Definitions
  716. //
  717. #define Executive 0x0
  718. #define KernelMode 0x0
  719. #define UserMode 0x1
  720. #define FALSE 0x0
  721. #define TRUE 0x1
  722. #define KiPcr 0xe0000000ffff0000
  723. #define KiPcr2 0xe0000000fffe0000