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.

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