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.

1352 lines
47 KiB

  1. #ifndef _KDEXTS_IA64_H_
  2. #define _KDEXTS_IA64_H_
  3. /*++
  4. Copyright (c) 1999 Microsoft Corporation
  5. Module Name:
  6. ia64.h
  7. Abstract:
  8. This file contains definitions which are specifice to ia64 platforms
  9. Author:
  10. Kshitiz K. Sharma (kksharma)
  11. Environment:
  12. User Mode.
  13. Revision History:
  14. --*/
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. //
  19. // Define base address for kernel and user space
  20. //
  21. #define UREGION_INDEX_IA64 0
  22. #define KREGION_INDEX_IA64 7
  23. #define UADDRESS_BASE_IA64 ((ULONGLONG)UREGION_INDEX_IA64 << 61)
  24. #define KADDRESS_BASE_IA64 ((ULONGLONG)KREGION_INDEX_IA64 << 61)
  25. //
  26. // user/kernel page table base and top addresses
  27. //
  28. #define SADDRESS_BASE_IA64 0x2000000000000000UI64 // session base address
  29. //
  30. // Define the number of bits to shift to left to produce page table offset
  31. // from page table index.
  32. //
  33. #define PTE_SHIFT_IA64 3 // Intel-IA64-Filler
  34. #define PAGE_SHIFT_IA64 13L
  35. #define VRN_MASK_IA64 0xE000000000000000UI64 // Virtual Region Number mask
  36. extern ULONG64 KiIA64VaSignedFill;
  37. extern ULONG64 KiIA64PtaSign;
  38. #define PTA_SIGN_IA64 KiIA64PtaSign
  39. #define VA_FILL_IA64 KiIA64VaSignedFill
  40. #define PTA_BASE_IA64 KiIA64PtaBase
  41. #define PTE_UBASE_IA64 (UADDRESS_BASE_IA64|PTA_BASE_IA64)
  42. #define PTE_KBASE_IA64 (KADDRESS_BASE_IA64|PTA_BASE_IA64)
  43. #define PTE_SBASE_IA64 (SADDRESS_BASE_IA64|PTA_BASE_IA64)
  44. #define PTE_UTOP_IA64 (PTE_UBASE_IA64|(((ULONG64)1 << PDI1_SHIFT_IA64) - 1)) // top level PDR address (user)
  45. #define PTE_KTOP_IA64 (PTE_KBASE_IA64|(((ULONG64)1 << PDI1_SHIFT_IA64) - 1)) // top level PDR address (kernel)
  46. #define PTE_STOP_IA64 (PTE_SBASE_IA64|(((ULONG64)1 << PDI1_SHIFT_IA64) - 1)) // top level PDR address (session)
  47. //
  48. // Second level user and kernel PDR address
  49. //
  50. #define PTI_SHIFT_IA64 PAGE_SHIFT_IA64 // Intel-IA64-Filler
  51. #define PDI_SHIFT_IA64 (PTI_SHIFT_IA64 + PAGE_SHIFT_IA64 - PTE_SHIFT_IA64) // Intel-IA64-Filler
  52. #define PDI1_SHIFT_IA64 (PDI_SHIFT_IA64 + PAGE_SHIFT_IA64 - PTE_SHIFT_IA64) // Intel-IA64-Filler
  53. #define PDE_UBASE_IA64 (PTE_UBASE_IA64|(PTE_UBASE_IA64>>(PTI_SHIFT_IA64-PTE_SHIFT_IA64)))
  54. #define PDE_KBASE_IA64 (PTE_KBASE_IA64|(PTE_KBASE_IA64>>(PTI_SHIFT_IA64-PTE_SHIFT_IA64)))
  55. #define PDE_SBASE_IA64 (PTE_SBASE_IA64|(PTE_SBASE_IA64>>(PTI_SHIFT_IA64-PTE_SHIFT_IA64)))
  56. #define PDE_UTOP_IA64 (PDE_UBASE_IA64|(((ULONG64)1 << PDI_SHIFT_IA64) - 1)) // second level PDR address (user)
  57. #define PDE_KTOP_IA64 (PDE_KBASE_IA64|(((ULONG64)1 << PDI_SHIFT_IA64) - 1)) // second level PDR address (kernel)
  58. #define PDE_STOP_IA64 (PDE_SBASE_IA64|(((ULONG64)1 << PDI_SHIFT_IA64) - 1)) // second level PDR address (session)
  59. //
  60. // 8KB first level user and kernel PDR address
  61. //
  62. #define PDE_UTBASE_IA64 (PTE_UBASE_IA64|(PDE_UBASE_IA64>>(PTI_SHIFT_IA64-PTE_SHIFT_IA64)))
  63. #define PDE_KTBASE_IA64 (PTE_KBASE_IA64|(PDE_KBASE_IA64>>(PTI_SHIFT_IA64-PTE_SHIFT_IA64)))
  64. #define PDE_STBASE_IA64 (PTE_SBASE_IA64|(PDE_SBASE_IA64>>(PTI_SHIFT_IA64-PTE_SHIFT_IA64)))
  65. #define PDE_USELFMAP_IA64 (PDE_UTBASE_IA64|(PAGE_SIZE_IA64 - (1<<PTE_SHIFT_IA64))) // self mapped PPE address (user)
  66. #define PDE_KSELFMAP_IA64 (PDE_KTBASE_IA64|(PAGE_SIZE_IA64 - (1<<PTE_SHIFT_IA64))) // self mapped PPE address (kernel)
  67. #define PDE_SSELFMAP_IA64 (PDE_STBASE_IA64|(PAGE_SIZE_IA64 - (1<<PTE_SHIFT_IA64))) // self mapped PPE address (kernel)
  68. #define PTE_BASE_IA64 PTE_UBASE_IA64
  69. #define PDE_BASE_IA64 PDE_UBASE_IA64
  70. #define PDE_TBASE_IA64 PDE_UTBASE_IA64
  71. #define PDE_SELFMAP_IA64 PDE_USELFMAP_IA64
  72. #define KSEG3_BASE_IA64 0x8000000000000000UI64
  73. #define KSEG3_LIMIT_IA64 0x8000100000000000UI64
  74. #define KUSEG_BASE_IA64 (UADDRESS_BASE_IA64 + 0x0) // base of user segment
  75. #define KSEG0_BASE_IA64 (KADDRESS_BASE_IA64 + 0x80000000) // base of kernel
  76. #define KSEG2_BASE_IA64 (KADDRESS_BASE_IA64 + 0xA0000000) // end of kernel
  77. #define PDE_TOP_IA64 PDE_UTOP_IA64
  78. #define MI_IS_PHYSICAL_ADDRESS_IA64(Va) \
  79. ((((Va) >= KSEG3_BASE_IA64) && ((Va) < KSEG3_LIMIT_IA64)) || \
  80. ((Va >= KSEG0_BASE_IA64) && (Va < KSEG2_BASE_IA64)))
  81. #define _MM_PAGING_FILE_LOW_SHIFT_IA64 28
  82. #define _MM_PAGING_FILE_HIGH_SHIFT_IA64 32
  83. #define MI_PTE_LOOKUP_NEEDED_IA64 ((ULONG64)0xffffffff)
  84. #define PTE_TO_PAGEFILE_OFFSET_IA64(PTE_CONTENTS) ((ULONG64)(PTE_CONTENTS) >> 32)
  85. #define PTI_MASK_IA64 0x00FFE000
  86. //
  87. // Define masks for fields within the PTE.
  88. //
  89. #define MM_PTE_OWNER_MASK_IA64 0x0180
  90. #define MM_PTE_VALID_MASK_IA64 1
  91. #define MM_PTE_ACCESS_MASK_IA64 0x0020
  92. #define MM_PTE_DIRTY_MASK_IA64 0x0040
  93. #define MM_PTE_EXECUTE_MASK_IA64 0x0200
  94. #define MM_PTE_WRITE_MASK_IA64 0x0400
  95. #define MM_PTE_LARGE_PAGE_MASK_IA64 0
  96. #define MM_PTE_COPY_ON_WRITE_MASK_IA64 ((ULONG)1 << (PAGE_SHIFT_IA64-1))
  97. #define MM_PTE_PROTOTYPE_MASK_IA64 0x0002
  98. #define MM_PTE_TRANSITION_MASK_IA64 0x0080
  99. #define MM_PTE_PROTECTION_MASK_IA64 0x7c
  100. #define MM_PTE_PAGEFILE_MASK_IA64 0xf0000000
  101. #define MM_SESSION_SPACE_DEFAULT_IA64 (0x2000000000000000UI64) // make it the region 1 space
  102. //
  103. // Define Interruption Function State (IFS) Register
  104. //
  105. // IFS bit field positions
  106. //
  107. #define IFS_IFM_IA64 _IA64 0
  108. #define IFS_IFM_LEN_IA64 38
  109. #define IFS_MBZ0_IA64 38
  110. #define IFS_MBZ0_V_IA64 0x1ffffffi64
  111. #define IFS_V_IA64 63
  112. #define IFS_V_LEN_IA64 1
  113. //
  114. // IFS is valid when IFS_V = IFS_VALID
  115. //
  116. #define IFS_VALID_IA64 1
  117. //
  118. // define the width of each size field in PFS/IFS
  119. //
  120. #define PFS_EC_SHIFT_IA64 52
  121. #define PFS_EC_SIZE_IA64 6
  122. #define PFS_EC_MASK_IA64 0x3F
  123. #define PFS_SIZE_SHIFT_IA64 7
  124. #define PFS_SIZE_MASK_IA64 0x7F
  125. #define NAT_BITS_PER_RNAT_REG_IA64 63
  126. #define RNAT_ALIGNMENT_IA64 (NAT_BITS_PER_RNAT_REG_IA64 << 3)
  127. //
  128. // Define Region Register (RR)
  129. //
  130. // RR bit field positions
  131. //
  132. #define RR_VE_IA64 0
  133. #define RR_MBZ0_IA64 1
  134. #define RR_PS_IA64 2
  135. #define RR_PS_LEN_IA64 6
  136. #define RR_RID_IA64 8
  137. #define RR_RID_LEN_IA64 24
  138. #define RR_MBZ1_IA64 32
  139. //
  140. // indirect mov index for loading RR
  141. //
  142. #define RR_INDEX_IA64 61
  143. #define RR_INDEX_LEN_IA64 3
  144. #ifndef CONTEXT_i386
  145. #define CONTEXT_i386 0x00010000 // this assumes that i386 and
  146. #endif
  147. // Please contact INTEL to get IA64-specific information
  148. // @@BEGIN_DDKSPLIT
  149. #define CONTEXT_IA64 0x00080000 // Intel-IA64-Filler
  150. #define CONTEXTIA64_CONTROL (CONTEXT_IA64 | 0x00000001L) // Intel-IA64-Filler
  151. #define CONTEXTIA64_LOWER_FLOATING_POINT (CONTEXT_IA64 | 0x00000002L) // Intel-IA64-Filler
  152. #define CONTEXTIA64_HIGHER_FLOATING_POINT (CONTEXT_IA64 | 0x00000004L) // Intel-IA64-Filler
  153. #define CONTEXTIA64_INTEGER (CONTEXT_IA64 | 0x00000008L) // Intel-IA64-Filler
  154. #define CONTEXTIA64_DEBUG (CONTEXT_IA64 | 0x00000010L) // Intel-IA64-Filler
  155. #define CONTEXTIA64_FLOATING_POINT (CONTEXTIA64_LOWER_FLOATING_POINT | CONTEXTIA64_HIGHER_FLOATING_POINT) // Intel-IA64-Filler
  156. #define CONTEXTIA64_FULL (CONTEXTIA64_CONTROL | CONTEXTIA64_FLOATING_POINT | CONTEXTIA64_INTEGER) // Intel-IA64-Filler
  157. // User / System mask
  158. #define IA64_PSR_MBZ4 0
  159. #define IA64_PSR_BE 1
  160. #define IA64_PSR_UP 2
  161. #define IA64_PSR_AC 3
  162. #define IA64_PSR_MFL 4
  163. #define IA64_PSR_MFH 5
  164. // PSR bits 6-12 reserved (must be zero)
  165. #define IA64_PSR_MBZ0 6
  166. #define IA64_PSR_MBZ0_V 0x1ffi64
  167. // System only mask
  168. #define IA64_PSR_IC 13
  169. #define IA64_PSR_I 14
  170. #define IA64_PSR_PK 15
  171. #define IA64_PSR_MBZ1 16
  172. #define IA64_PSR_MBZ1_V 0x1i64
  173. #define IA64_PSR_DT 17
  174. #define IA64_PSR_DFL 18
  175. #define IA64_PSR_DFH 19
  176. #define IA64_PSR_SP 20
  177. #define IA64_PSR_PP 21
  178. #define IA64_PSR_DI 22
  179. #define IA64_PSR_SI 23
  180. #define IA64_PSR_DB 24
  181. #define IA64_PSR_LP 25
  182. #define IA64_PSR_TB 26
  183. #define IA64_PSR_RT 27
  184. // PSR bits 28-31 reserved (must be zero)
  185. #define IA64_PSR_MBZ2 28
  186. #define IA64_PSR_MBZ2_V 0xfi64
  187. // Neither mask
  188. #define IA64_PSR_CPL 32
  189. #define IA64_PSR_CPL_LEN 2
  190. #define IA64_PSR_IS 34
  191. #define IA64_PSR_MC 35
  192. #define IA64_PSR_IT 36
  193. #define IA64_PSR_ID 37
  194. #define IA64_PSR_DA 38
  195. #define IA64_PSR_DD 39
  196. #define IA64_PSR_SS 40
  197. #define IA64_PSR_RI 41
  198. #define IA64_PSR_RI_LEN 2
  199. #define IA64_PSR_ED 43
  200. #define IA64_PSR_BN 44
  201. // PSR bits 45-63 reserved (must be zero)
  202. #define IA64_PSR_MBZ3 45
  203. #define IA64_PSR_MBZ3_V 0xfffffi64
  204. //
  205. // Define IA64 specific read control space commands for the
  206. // Kernel Debugger.
  207. //
  208. #define DEBUG_CONTROL_SPACE_PCR_IA64 1
  209. #define DEBUG_CONTROL_SPACE_PRCB_IA64 2
  210. #define DEBUG_CONTROL_SPACE_KSPECIAL_IA64 3
  211. #define DEBUG_CONTROL_SPACE_THREAD_IA64 4
  212. /////////////////////////////////////////////
  213. //
  214. // Generic EM Registers definitions
  215. //
  216. /////////////////////////////////////////////
  217. typedef unsigned __int64 EM_REG;
  218. typedef EM_REG *PEM_REG;
  219. #define EM_REG_BITS (sizeof(EM_REG) * 8)
  220. __inline EM_REG
  221. ULong64ToEMREG(
  222. IN ULONG64 Val
  223. )
  224. {
  225. return (*((PEM_REG)&Val));
  226. } // ULong64ToEMREG()
  227. __inline ULONG64
  228. EMREGToULong64(
  229. IN EM_REG EmReg
  230. )
  231. {
  232. return (*((PULONG64)&EmReg));
  233. } // EMRegToULong64()
  234. #define DEFINE_ULONG64_TO_EMREG(_EM_REG_TYPE) \
  235. __inline _EM_REG_TYPE \
  236. ULong64To##_EM_REG_TYPE( \
  237. IN ULONG64 Val \
  238. ) \
  239. { \
  240. return (*((P##_EM_REG_TYPE)&Val)); \
  241. } // ULong64To##_EM_REG_TYPE()
  242. #define DEFINE_EMREG_TO_ULONG64(_EM_REG_TYPE) \
  243. __inline ULONG64 \
  244. _EM_REG_TYPE##ToULong64( \
  245. IN _EM_REG_TYPE EmReg \
  246. ) \
  247. { \
  248. return (*((PULONG64)&EmReg)); \
  249. } // _EM_REG_TYPE##ToULong64()
  250. typedef struct _EM_ISR {
  251. unsigned __int64 code:16; // 0-15 : interruption Code
  252. unsigned __int64 vector:8; // 16-23 : IA32 exception vector number
  253. unsigned __int64 reserved0: 8;
  254. unsigned __int64 x:1; // 32 : Execute exception
  255. unsigned __int64 w:1; // 33 : Write exception
  256. unsigned __int64 r:1; // 34 : Read exception
  257. unsigned __int64 na:1; // 35 : Non-Access exception
  258. unsigned __int64 sp:1; // 36 : Speculative load exception
  259. unsigned __int64 rs:1; // 37 : Register Stack
  260. unsigned __int64 ir:1; // 38 : Invalid Register frame
  261. unsigned __int64 ni:1; // 39 : Nested interruption
  262. unsigned __int64 so:1; // 40 : IA32 Supervisor Override
  263. unsigned __int64 ei:2; // 41-42 : Excepting IA64 Instruction
  264. unsigned __int64 ed:1; // 43 : Exception Differal
  265. unsigned __int64 reserved1:20; // 44-63
  266. } EM_ISR, *PEM_ISR;
  267. DEFINE_ULONG64_TO_EMREG(EM_ISR)
  268. DEFINE_EMREG_TO_ULONG64(EM_ISR)
  269. /////////////////////////////////////////////
  270. //
  271. // Trap.c
  272. //
  273. /////////////////////////////////////////////
  274. VOID
  275. DisplayIsrIA64(
  276. IN const PCHAR Header, // Header string displayed before psr.
  277. IN EM_ISR IsrValue, // ISR value. Use ULong64ToEM_ISR() if needed.
  278. IN DISPLAY_MODE DisplayMode // Display mode.
  279. );
  280. /////////////////////////////////////////////
  281. //
  282. // Psr.c
  283. //
  284. /////////////////////////////////////////////
  285. typedef struct _EM_PSR {
  286. unsigned __int64 reserved0:1; // 0 : reserved
  287. unsigned __int64 be:1; // 1 : Big-Endian
  288. unsigned __int64 up:1; // 2 : User Performance monitor enable
  289. unsigned __int64 ac:1; // 3 : Alignment Check
  290. unsigned __int64 mfl:1; // 4 : Lower (f2 .. f31) floating-point registers written
  291. unsigned __int64 mfh:1; // 5 : Upper (f32 .. f127) floating-point registers written
  292. unsigned __int64 reserved1:7; // 6-12 : reserved
  293. unsigned __int64 ic:1; // 13 : Interruption Collection
  294. unsigned __int64 i:1; // 14 : Interrupt Bit
  295. unsigned __int64 pk:1; // 15 : Protection Key enable
  296. unsigned __int64 reserved2:1; // 16 : reserved
  297. unsigned __int64 dt:1; // 17 : Data Address Translation
  298. unsigned __int64 dfl:1; // 18 : Disabled Floating-point Low register set
  299. unsigned __int64 dfh:1; // 19 : Disabled Floating-point High register set
  300. unsigned __int64 sp:1; // 20 : Secure Performance monitors
  301. unsigned __int64 pp:1; // 21 : Privileged Performance monitor enable
  302. unsigned __int64 di:1; // 22 : Disable Instruction set transition
  303. unsigned __int64 si:1; // 23 : Secure Interval timer
  304. unsigned __int64 db:1; // 24 : Debug Breakpoint fault
  305. unsigned __int64 lp:1; // 25 : Lower Privilege transfer trap
  306. unsigned __int64 tb:1; // 26 : Taken Branch trap
  307. unsigned __int64 rt:1; // 27 : Register stack translation
  308. unsigned __int64 reserved3:4; // 28-31 : reserved
  309. unsigned __int64 cpl:2; // 32;33 : Current Privilege Level
  310. unsigned __int64 is:1; // 34 : Instruction Set
  311. unsigned __int64 mc:1; // 35 : Machine Abort Mask
  312. unsigned __int64 it:1; // 36 : Instruction address Translation
  313. unsigned __int64 id:1; // 37 : Instruction Debug fault disable
  314. unsigned __int64 da:1; // 38 : Disable Data Access and Dirty-bit faults
  315. unsigned __int64 dd:1; // 39 : Data Debug fault disable
  316. unsigned __int64 ss:1; // 40 : Single Step enable
  317. unsigned __int64 ri:2; // 41;42 : Restart Instruction
  318. unsigned __int64 ed:1; // 43 : Exception Deferral
  319. unsigned __int64 bn:1; // 44 : register Bank
  320. unsigned __int64 ia:1; // 45 : Disable Instruction Access-bit faults
  321. unsigned __int64 reserved4:18; // 46-63 : reserved
  322. } EM_PSR, *PEM_PSR;
  323. typedef EM_PSR EM_IPSR;
  324. typedef EM_IPSR *PEM_IPSR;
  325. DEFINE_ULONG64_TO_EMREG(EM_PSR)
  326. DEFINE_EMREG_TO_ULONG64(EM_PSR)
  327. VOID
  328. DisplayPsrIA64(
  329. IN const PCHAR Header, // Header string displayed before psr.
  330. IN EM_PSR PsrValue, // PSR value. Use ULong64ToEM_PSR() if needed.
  331. IN DISPLAY_MODE DisplayMode // Display mode.
  332. );
  333. typedef struct _EM_PSP {
  334. unsigned __int64 reserved0:2; // 0-1 : reserved
  335. unsigned __int64 rz:1; // 2 : Rendez-vous successful
  336. unsigned __int64 ra:1; // 3 : Rendez-vous attempted
  337. unsigned __int64 me:1; // 4 : Distinct Multiple errors
  338. unsigned __int64 mn:1; // 5 : Min-state Save Area registered
  339. unsigned __int64 sy:1; // 6 : Storage integrity synchronized
  340. unsigned __int64 co:1; // 7 : Continuable
  341. unsigned __int64 ci:1; // 8 : Machine Check isolated
  342. unsigned __int64 us:1; // 9 : Uncontained Storage damage
  343. unsigned __int64 hd:1; // 10 : Hardware damage
  344. unsigned __int64 tl:1; // 11 : Trap lost
  345. unsigned __int64 mi:1; // 12 : More Information
  346. unsigned __int64 pi:1; // 13 : Precise Instruction pointer
  347. unsigned __int64 pm:1; // 14 : Precise Min-state Save Area
  348. unsigned __int64 dy:1; // 15 : Processor Dynamic State valid
  349. unsigned __int64 in:1; // 16 : INIT interruption
  350. unsigned __int64 rs:1; // 17 : RSE valid
  351. unsigned __int64 cm:1; // 18 : Machine Check corrected
  352. unsigned __int64 ex:1; // 19 : Machine Check expected
  353. unsigned __int64 cr:1; // 20 : Control Registers valid
  354. unsigned __int64 pc:1; // 21 : Performance Counters valid
  355. unsigned __int64 dr:1; // 22 : Debug Registers valid
  356. unsigned __int64 tr:1; // 23 : Translation Registers valid
  357. unsigned __int64 rr:1; // 24 : Region Registers valid
  358. unsigned __int64 ar:1; // 25 : Application Registers valid
  359. unsigned __int64 br:1; // 26 : Branch Registers valid
  360. unsigned __int64 pr:1; // 27 : Predicate Registers valid
  361. unsigned __int64 fp:1; // 28 : Floating-Point Registers valid
  362. unsigned __int64 b1:1; // 29 : Preserved Bank 1 General Registers valid
  363. unsigned __int64 b0:1; // 30 : Preserved Bank 0 General Registers valid
  364. unsigned __int64 gr:1; // 31 : General Registers valid
  365. unsigned __int64 dsize:16; // 32-47 : Processor Dynamic State size
  366. unsigned __int64 reserved1:11; // 48-58 : reserved
  367. unsigned __int64 cc:1; // 59 : Cache Check
  368. unsigned __int64 tc:1; // 60 : TLB Check
  369. unsigned __int64 bc:1; // 61 : Bus Check
  370. unsigned __int64 rc:1; // 62 : Register File Check
  371. unsigned __int64 uc:1; // 63 : Micro-Architectural Check
  372. } EM_PSP, *PEM_PSP;
  373. DEFINE_ULONG64_TO_EMREG(EM_PSP)
  374. DEFINE_EMREG_TO_ULONG64(EM_PSP)
  375. VOID
  376. DisplayPspIA64(
  377. IN const PCHAR Header, // Header string displayed before psr.
  378. IN EM_PSP PspValue, // PSP value. Use ULong64ToEM_PSP() if needed.
  379. IN DISPLAY_MODE DisplayMode // Display mode.
  380. );
  381. /////////////////////////////////////////////
  382. //
  383. // cpuinfo.cpp
  384. //
  385. /////////////////////////////////////////////
  386. extern VOID
  387. ExecCommand(
  388. IN PCSTR Cmd
  389. );
  390. /////////////////////////////////////////////
  391. //
  392. // Pmc.c
  393. //
  394. /////////////////////////////////////////////
  395. VOID
  396. DisplayPmcIA64(
  397. IN const PCHAR Header, // Header string displayed before pmc.
  398. IN ULONG64 PmcValue, // PMC value.
  399. IN DISPLAY_MODE DisplayMode // Display mode.
  400. );
  401. typedef struct _EM_PMC { // Generic PMC register.
  402. unsigned __int64 plm:4; // 0-3 : Privilege Level Mask
  403. unsigned __int64 ev:1; // 4 : External Visibility
  404. unsigned __int64 oi:1; // 5 : Overflow Interrupt
  405. unsigned __int64 pm:1; // 6 : Privilege Mode
  406. unsigned __int64 ignored1:1; // 7 : Ignored
  407. unsigned __int64 es:7; // 8-14 : Event Selection
  408. unsigned __int64 ignored2:1; // 15 : Ignored
  409. unsigned __int64 umask:4; // 16-19 : Event Umask
  410. unsigned __int64 threshold:3; // 20-22 : Event Threshold (3 bits for PMC4-5, 2 for PMC6-7)
  411. unsigned __int64 ignored:1; // 23 : Ignored
  412. unsigned __int64 ism:2; // 24-25 : Instruction Set Mask
  413. unsigned __int64 ignored3:18; // 26-63 : Ignored
  414. } EM_PMC, *PEM_PMC;
  415. VOID
  416. DisplayGenPmcIA64(
  417. IN const PCHAR Header, // Header string displayed before pmc.
  418. IN ULONG64 PmcValue, // PMC value.
  419. IN DISPLAY_MODE DisplayMode // Display mode.
  420. );
  421. DEFINE_ULONG64_TO_EMREG(EM_PMC)
  422. DEFINE_EMREG_TO_ULONG64(EM_PMC)
  423. typedef struct _EM_BTB_PMC { // Branch Trace Buffer PMC register.
  424. unsigned __int64 plm:4; // 0-3 : Privilege Level Mask
  425. unsigned __int64 ignored1:2; // 4-5 : Ignored
  426. unsigned __int64 pm:1; // 6 : Privilege Mode
  427. unsigned __int64 tar:1; // 7 : Target Address Register
  428. unsigned __int64 tm:2; // 8-9 : Taken Mask
  429. unsigned __int64 ptm:2; // 10-11 : Predicted Target Address Mask
  430. unsigned __int64 ppm:2; // 12-13 : Predicted Predicate Mask
  431. unsigned __int64 bpt:1; // 14 : Branch Prediction Table
  432. unsigned __int64 bac:1; // 15 : Branch Address Calculator
  433. unsigned __int64 ignored2:48; // 16-63 : Ignored
  434. } EM_BTB_PMC, *PEM_BTB_PMC;
  435. VOID
  436. DisplayBtbPmcIA64(
  437. IN const PCHAR Header, // Header string displayed before pmc.
  438. IN ULONG64 PmcValue, // PMC value.
  439. IN DISPLAY_MODE DisplayMode // Display mode.
  440. );
  441. DEFINE_ULONG64_TO_EMREG(EM_BTB_PMC)
  442. DEFINE_EMREG_TO_ULONG64(EM_BTB_PMC)
  443. typedef struct _EM_BTB_PMD { // Branch Trace Buffer PMD register.
  444. unsigned __int64 b:1; // 0 : Branch Bit
  445. unsigned __int64 mp:1; // 1 : Mispredict Bit
  446. unsigned __int64 slot:2; // 2-3 : Slot
  447. unsigned __int64 address:60; // 4-63 : Address
  448. } EM_BTB_PMD, *PEM_BTB_PMD;
  449. VOID
  450. DisplayBtbPmdIA64(
  451. IN const PCHAR Header, // Header string displayed before pmc.
  452. IN ULONG64 PmdValue, // PMD value.
  453. IN DISPLAY_MODE DisplayMode // Display mode.
  454. );
  455. DEFINE_ULONG64_TO_EMREG(EM_BTB_PMD)
  456. DEFINE_EMREG_TO_ULONG64(EM_BTB_PMD)
  457. typedef struct _EM_BTB_INDEX_PMD { // Branch Trace Buffer Index Format PMD register.
  458. unsigned __int64 bbi:3; // 0-2 : Branch Buffer Index
  459. unsigned __int64 full:1; // 3 : Full bit
  460. unsigned __int64 ignored:60; // 4-63 : Ignored
  461. } EM_BTB_INDEX_PMD, *PEM_BTB_INDEX_PMD;
  462. VOID
  463. DisplayBtbIndexPmdIA64(
  464. IN const PCHAR Header, // Header string displayed before pmc.
  465. IN ULONG64 PmdValue, // PMD value.
  466. IN DISPLAY_MODE DisplayMode // Display mode.
  467. );
  468. DEFINE_ULONG64_TO_EMREG(EM_BTB_INDEX_PMD)
  469. DEFINE_EMREG_TO_ULONG64(EM_BTB_INDEX_PMD)
  470. /////////////////////////////////////////////
  471. //
  472. // Dcr.c
  473. //
  474. /////////////////////////////////////////////
  475. typedef struct _EM_DCR {
  476. unsigned __int64 pp:1; // 0 : Privileged Performance Monitor Default
  477. unsigned __int64 be:1; // 1 : Big-Endian Default
  478. unsigned __int64 lc:1; // 2 : IA-32 Lock check Enable
  479. unsigned __int64 reserved1:5; // 3-7 : Reserved
  480. unsigned __int64 dm:1; // 8 : Defer TLB Miss faults only
  481. unsigned __int64 dp:1; // 9 : Defer Page Not Present faults only
  482. unsigned __int64 dk:1; // 10 : Defer Key Miss faults only
  483. unsigned __int64 dx:1; // 11 : Defer Key Permission faults only
  484. unsigned __int64 dr:1; // 12 : Defer Access Rights faults only
  485. unsigned __int64 da:1; // 13 : Defer Access Bit faults only
  486. unsigned __int64 dd:1; // 14 : Defer Debug faults only
  487. unsigned __int64 reserved2:49; // 15-63 : Reserved
  488. } EM_DCR, *PEM_DCR;
  489. DEFINE_ULONG64_TO_EMREG(EM_DCR)
  490. DEFINE_EMREG_TO_ULONG64(EM_DCR)
  491. VOID
  492. DisplayDcrIA64(
  493. IN const PCHAR Header, // Header string displayed before dcr.
  494. IN EM_DCR DcrValue, // DCR value. Use ULong64ToEM_DCR() if needed.
  495. IN DISPLAY_MODE DisplayMode // Display mode.
  496. );
  497. /////////////////////////////////////////////
  498. //
  499. // Ih.c
  500. //
  501. /////////////////////////////////////////////
  502. //
  503. // Interruption history
  504. //
  505. // N.B. Currently the history records are saved in the 2nd half of the 8K
  506. // PCR page. Therefore, we can only keep track of up to the latest
  507. // 128 interruption records, each of 32 bytes in size. Also, the PCR
  508. // structure cannot be greater than 4K. In the future, the interruption
  509. // history records may become part of the KPCR structure.
  510. //
  511. typedef struct _IHISTORY_RECORD {
  512. ULONGLONG InterruptionType;
  513. ULONGLONG IIP;
  514. ULONGLONG IPSR;
  515. ULONGLONG Extra0;
  516. } IHISTORY_RECORD;
  517. #define MAX_NUMBER_OF_IHISTORY_RECORDS 128
  518. //
  519. // Branch Trace Buffer history
  520. //
  521. // FIXFIX: MAX_NUMBER_OF_BTB_RECORDS is micro-architecture dependent.
  522. // We should collect this from processor specific data structure.
  523. #define MAX_NUMBER_OF_BTB_RECORDS 8
  524. #define MAX_NUMBER_OF_BTBHISTORY_RECORDS (MAX_NUMBER_OF_BTB_RECORDS + 1 /* HBC */)
  525. /////////////////////////////////////////////
  526. //
  527. // Mca.c
  528. //
  529. //
  530. /////////////////////////////////////////////
  531. //
  532. // Thierry - 10/04/2000:
  533. // Duplicating the following ntos\inc\hal [or ntos\inc\ia64.h] definitions is wrong.
  534. // I expressed my view to the DBG team. We should not do this but we have to
  535. // wait until they offer a way to build these extensions without these
  536. // unneeded and error prone duplications.
  537. //
  538. // However, these definitions should be temporarely because the *.pdb reads should
  539. // be successful. After the HALIA64 MCA changes got propagated to all the builds,
  540. // we should definitively think about deleting these definitions from this file.
  541. //
  542. //
  543. // IA64 ERRORS: ERROR_REVISION definitions
  544. //
  545. typedef union _ERROR_REVISION_IA64 {
  546. USHORT Revision; // Major and Minor revision number of the record:
  547. struct {
  548. UCHAR Minor; // Byte0: Minor.
  549. UCHAR Major; // Byte1: Major.
  550. };
  551. } ERROR_REVISION_IA64, *PERROR_REVISION_IA64;
  552. //
  553. // IA64 ERRORS: ERROR_SEVERITY definitions
  554. //
  555. // One day the MS compiler will support typed enums with type != int so this
  556. // type of enums (USHORT, __int64) could be defined...
  557. //
  558. #define ErrorRecoverable_IA64 ((USHORT)0)
  559. #define ErrorFatal_IA64 ((USHORT)1)
  560. #define ErrorCorrected_IA64 ((USHORT)2)
  561. // ErrorOthers : Reserved
  562. typedef UCHAR ERROR_SEVERITY_IA64, *PERROR_SEVERITY_IA64;
  563. //
  564. // IA64 ERRORS: ERROR_RECORD_VALID definitions
  565. //
  566. typedef union _ERROR_RECORD_VALID_IA64 {
  567. UCHAR Valid;
  568. struct { // Bits
  569. UCHAR OemPlatformID:1; // 0: OEM Platform Id is present in the record header
  570. UCHAR Reserved:7; // 1-7: Reserved
  571. };
  572. } ERROR_RECORD_VALID_IA64, *PERROR_RECORD_VALID_IA64;
  573. //
  574. // IA64 ERRORS: ERROR_TIMESTAMP definitions
  575. //
  576. typedef union _ERROR_TIMESTAMP_IA64 {
  577. ULONGLONG TimeStamp;
  578. struct {
  579. UCHAR Seconds; // Byte0: Seconds
  580. UCHAR Minutes; // Byte1: Minutes
  581. UCHAR Hours; // Byte2: Hours
  582. UCHAR Reserved; // Byte3: Reserved
  583. UCHAR Day; // Byte4: Day
  584. UCHAR Month; // Byte5: Month
  585. UCHAR Year; // Byte6: Year
  586. UCHAR Century; // Byte7: Century
  587. };
  588. } ERROR_TIMESTAMP_IA64, *PERROR_TIMESTAMP_IA64;
  589. //
  590. // IA64 ERRORS: ERROR_DEVICE_GUID definitions
  591. //
  592. typedef struct _ERROR_DEVICE_GUID_IA64 {
  593. ULONG Data1;
  594. USHORT Data2;
  595. USHORT Data3;
  596. UCHAR Data4[8];
  597. } ERROR_DEVICE_GUID_IA64, *PERROR_DEVICE_GUID_IA64;
  598. //
  599. // IA64 ERRORS: ERROR_RECORD definitions
  600. //
  601. typedef struct _ERROR_RECORD_HEADER_IA64 { // Offsets:
  602. ULONGLONG Id; // Unique identifier
  603. ERROR_REVISION_IA64 Revision; // Major and Minor revision number of the record
  604. ERROR_SEVERITY_IA64 ErrorSeverity; // Error Severity
  605. ERROR_RECORD_VALID_IA64 Valid; // Validation bits
  606. ULONG Length; // Length of this record in bytes, including the header
  607. ERROR_TIMESTAMP_IA64 TimeStamp; // Timestamp recorded when event occured
  608. UCHAR OemPlatformId[16]; // Unique platform identifier. OEM defined.
  609. } ERROR_RECORD_HEADER_IA64, *PERROR_RECORD_HEADER_IA64;
  610. //
  611. // IA64 ERRORS: ERROR_SECTION_HEADER definitions
  612. //
  613. typedef union _ERROR_RECOVERY_INFO_IA64 {
  614. UCHAR RecoveryInfo;
  615. struct { // Bits:
  616. UCHAR Corrected:1; // 0: Corrected
  617. UCHAR NotContained:1; // 1: Containment Warning
  618. UCHAR Reset:1; // 2: Reset
  619. UCHAR Reserved:4; // 6-3: Reserved
  620. UCHAR Valid:1; // 7: Valid Recovery Information
  621. };
  622. } ERROR_RECOVERY_INFO_IA64, *PERROR_RECOVERY_INFO_IA64;
  623. typedef struct _ERROR_SECTION_HEADER_IA64 {
  624. ERROR_DEVICE_GUID_IA64 Guid; // Unique identifier
  625. ERROR_REVISION_IA64 Revision; // Major and Minor revision number of the section
  626. ERROR_RECOVERY_INFO_IA64 RecoveryInfo; // Recovery Information
  627. UCHAR Reserved;
  628. ULONG Length; // Length of this error device section in bytes,
  629. // including the header.
  630. } ERROR_SECTION_HEADER_IA64, *PERROR_SECTION_HEADER_IA64;
  631. //
  632. // IA64 ERRORS: ERROR_PROCESSOR device definitions
  633. //
  634. typedef union _ERROR_MODINFO_VALID_IA64 {
  635. ULONGLONG Valid;
  636. struct { // Bits
  637. ULONGLONG CheckInfo: 1; // 0:
  638. ULONGLONG RequestorIdentifier: 1; // 1:
  639. ULONGLONG ResponderIdentifier: 1; // 2:
  640. ULONGLONG TargetIdentifier: 1; // 3:
  641. ULONGLONG PreciseIP: 1; // 4:
  642. ULONGLONG Reserved: 59; // 5-63:
  643. };
  644. } ERROR_MODINFO_VALID_IA64, *PERROR_MODINFO_VALID_IA64;
  645. // SAL Specs July 2000: The size of _ERROR_MODINFO will always be 48 Bytes.
  646. typedef struct _ERROR_MODINFO_IA64 {
  647. ERROR_MODINFO_VALID_IA64 Valid;
  648. ULONGLONG CheckInfo;
  649. ULONGLONG RequestedId;
  650. ULONGLONG ResponderId;
  651. ULONGLONG TargetId;
  652. ULONGLONG PreciseIP;
  653. } ERROR_MODINFO_IA64, *PERROR_MODINFO_IA64;
  654. #define ERROR_PROCESSOR_GUID_IA64 \
  655. { 0xe429faf1, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  656. typedef union _ERROR_PROCESSOR_VALID_IA64 {
  657. ULONGLONG Valid;
  658. struct { // Bits
  659. ULONGLONG ErrorMap: 1; // 0:
  660. ULONGLONG StateParameter: 1; // 1:
  661. ULONGLONG CRLid: 1; // 2:
  662. ULONGLONG StaticStruct:1; // 3: Processor Static Info error.
  663. ULONGLONG CacheCheckNum:4; // 4-7: Cache errors.
  664. ULONGLONG TlbCheckNum:4; // 8-11: Tlb errors.
  665. ULONGLONG BusCheckNum:4; // 12-15: Bus errors.
  666. ULONGLONG RegFileCheckNum:4; // 16-19: Registers file errors.
  667. ULONGLONG MsCheckNum:4; // 20-23: Micro-Architecture errors.
  668. ULONGLONG CpuIdInfo:1; // 24: CPUID Info.
  669. ULONGLONG Reserved:39; // 25-63: Reserved.
  670. };
  671. } ERROR_PROCESSOR_VALID_IA64, *PERROR_PROCESSOR_VALID_IA64;
  672. typedef struct _ERROR_PROCESSOR_CACHE_IA64 {
  673. ERROR_MODINFO_IA64 CacheError[ /* Valid.CacheCheckNum */ 1]; // 0 -> 15 cache error modinfo structs.
  674. } ERROR_PROCESSOR_CACHE_IA64, *PERROR_PROCESSOR_CACHE_IA64;
  675. typedef struct _ERROR_PROCESSOR_TLB_IA64 {
  676. ERROR_MODINFO_IA64 TlbError [ /* Valid.TlbCheckNum */ 1]; // 0 -> 15 tlb error modinfo structs.
  677. } ERROR_PROCESSOR_TLB_IA64, *PERROR_PROCESSOR_TLB_IA64;
  678. typedef struct _ERROR_PROCESSOR_BUS_IA64 {
  679. ERROR_MODINFO_IA64 BusError [ /* Valid.BusCheckNum */ 1]; // 0 -> 15 bus error modinfo structs.
  680. } ERROR_PROCESSOR_BUS_IA64, *PERROR_PROCESSOR_BUS_IA64;
  681. typedef struct _ERROR_PROCESSOR_REGFILE_IA64 {
  682. ULONGLONG RegError [ /* Valid.RegFileCheckNum */ 1]; // 0 -> 15 registers file errors.
  683. } ERROR_PROCESSOR_REGFILE_IA64, *PERROR_PROCESSOR_REGFILE_IA64;
  684. typedef struct _ERROR_PROCESSOR_MS_IA64 {
  685. ULONGLONG MsError [ /* Valid.MsCheckNum */ 1]; // 0 -> 15 registers file errors.
  686. } ERROR_PROCESSOR_MS_IA64, *PERROR_PROCESSOR_MS_IA64;
  687. typedef struct _ERROR_PROCESSOR_CPUID_INFO_IA64 { // Must be 48 bytes.
  688. ULONGLONG CpuId0;
  689. ULONGLONG CpuId1;
  690. ULONGLONG CpuId2;
  691. ULONGLONG CpuId3;
  692. ULONGLONG CpuId4;
  693. ULONGLONG Reserved;
  694. } ERROR_PROCESSOR_CPUID_INFO_IA64, *PERROR_PROCESSOR_CPUID_INFO_IA64;
  695. typedef union _ERROR_PROCESSOR_STATIC_INFO_VALID_IA64 {
  696. ULONGLONG Valid;
  697. struct { // Bits
  698. ULONGLONG MinState: 1; // 0: MinState valid.
  699. ULONGLONG BRs: 1; // 1: Branch Registers valid.
  700. ULONGLONG CRs: 1; // 2: Control Registers valid.
  701. ULONGLONG ARs: 1; // 3: Application Registers valid.
  702. ULONGLONG RRs: 1; // 4: Registers valid.
  703. ULONGLONG FRs: 1; // 5: Registers valid.
  704. ULONGLONG Reserved: 58; // 6-63: Reserved.
  705. };
  706. } ERROR_PROCESSOR_STATIC_INFO_VALID_IA64, *PERROR_PROCESSOR_STATIC_INFO_VALID_IA64;
  707. typedef struct _PROCESSOR_MINSTATE_SAVE_AREA_IA64 {
  708. ULONGLONG GRNats; // NaT bits for saved GRs
  709. ULONGLONG GR1;
  710. ULONGLONG GR2;
  711. ULONGLONG GR3;
  712. ULONGLONG GR4;
  713. ULONGLONG GR5;
  714. ULONGLONG GR6;
  715. ULONGLONG GR7;
  716. ULONGLONG GR8;
  717. ULONGLONG GR9;
  718. ULONGLONG GR10;
  719. ULONGLONG GR11;
  720. ULONGLONG GR12;
  721. ULONGLONG GR13;
  722. ULONGLONG GR14;
  723. ULONGLONG GR15;
  724. ULONGLONG Bank0GR16;
  725. ULONGLONG Bank0GR17;
  726. ULONGLONG Bank0GR18;
  727. ULONGLONG Bank0GR19;
  728. ULONGLONG Bank0GR20;
  729. ULONGLONG Bank0GR21;
  730. ULONGLONG Bank0GR22;
  731. ULONGLONG Bank0GR23;
  732. ULONGLONG Bank0GR24;
  733. ULONGLONG Bank0GR25;
  734. ULONGLONG Bank0GR26;
  735. ULONGLONG Bank0GR27;
  736. ULONGLONG Bank0GR28;
  737. ULONGLONG Bank0GR29;
  738. ULONGLONG Bank0GR30;
  739. ULONGLONG Bank0GR31;
  740. ULONGLONG Bank1GR16;
  741. ULONGLONG Bank1GR17;
  742. ULONGLONG Bank1GR18;
  743. ULONGLONG Bank1GR19;
  744. ULONGLONG Bank1GR20;
  745. ULONGLONG Bank1GR21;
  746. ULONGLONG Bank1GR22;
  747. ULONGLONG Bank1GR23;
  748. ULONGLONG Bank1GR24;
  749. ULONGLONG Bank1GR25;
  750. ULONGLONG Bank1GR26;
  751. ULONGLONG Bank1GR27;
  752. ULONGLONG Bank1GR28;
  753. ULONGLONG Bank1GR29;
  754. ULONGLONG Bank1GR30;
  755. ULONGLONG Bank1GR31;
  756. ULONGLONG Preds;
  757. ULONGLONG BR0;
  758. ULONGLONG RSC;
  759. ULONGLONG IIP;
  760. ULONGLONG IPSR;
  761. ULONGLONG IFS;
  762. ULONGLONG XIP;
  763. ULONGLONG XPSR;
  764. ULONGLONG XFS;
  765. } PROCESSOR_MINSTATE_SAVE_AREA_IA64, *PPROCESSOR_MINSTATE_SAVE_AREA_IA64;
  766. typedef struct _PROCESSOR_CONTROL_REGISTERS_IA64 {
  767. ULONGLONG DCR;
  768. ULONGLONG ITM;
  769. ULONGLONG IVA;
  770. ULONGLONG CR3;
  771. ULONGLONG CR4;
  772. ULONGLONG CR5;
  773. ULONGLONG CR6;
  774. ULONGLONG CR7;
  775. ULONGLONG PTA;
  776. ULONGLONG GPTA;
  777. ULONGLONG CR10;
  778. ULONGLONG CR11;
  779. ULONGLONG CR12;
  780. ULONGLONG CR13;
  781. ULONGLONG CR14;
  782. ULONGLONG CR15;
  783. ULONGLONG IPSR;
  784. ULONGLONG ISR;
  785. ULONGLONG CR18;
  786. ULONGLONG IIP;
  787. ULONGLONG IFA;
  788. ULONGLONG ITIR;
  789. ULONGLONG IFS;
  790. ULONGLONG IIM;
  791. ULONGLONG IHA;
  792. ULONGLONG CR26;
  793. ULONGLONG CR27;
  794. ULONGLONG CR28;
  795. ULONGLONG CR29;
  796. ULONGLONG CR30;
  797. ULONGLONG CR31;
  798. ULONGLONG CR32;
  799. ULONGLONG CR33;
  800. ULONGLONG CR34;
  801. ULONGLONG CR35;
  802. ULONGLONG CR36;
  803. ULONGLONG CR37;
  804. ULONGLONG CR38;
  805. ULONGLONG CR39;
  806. ULONGLONG CR40;
  807. ULONGLONG CR41;
  808. ULONGLONG CR42;
  809. ULONGLONG CR43;
  810. ULONGLONG CR44;
  811. ULONGLONG CR45;
  812. ULONGLONG CR46;
  813. ULONGLONG CR47;
  814. ULONGLONG CR48;
  815. ULONGLONG CR49;
  816. ULONGLONG CR50;
  817. ULONGLONG CR51;
  818. ULONGLONG CR52;
  819. ULONGLONG CR53;
  820. ULONGLONG CR54;
  821. ULONGLONG CR55;
  822. ULONGLONG CR56;
  823. ULONGLONG CR57;
  824. ULONGLONG CR58;
  825. ULONGLONG CR59;
  826. ULONGLONG CR60;
  827. ULONGLONG CR61;
  828. ULONGLONG CR62;
  829. ULONGLONG CR63;
  830. ULONGLONG LID;
  831. ULONGLONG IVR;
  832. ULONGLONG TPR;
  833. ULONGLONG EOI;
  834. ULONGLONG IRR0;
  835. ULONGLONG IRR1;
  836. ULONGLONG IRR2;
  837. ULONGLONG IRR3;
  838. ULONGLONG ITV;
  839. ULONGLONG PMV;
  840. ULONGLONG CMCV;
  841. ULONGLONG CR75;
  842. ULONGLONG CR76;
  843. ULONGLONG CR77;
  844. ULONGLONG CR78;
  845. ULONGLONG CR79;
  846. ULONGLONG LRR0;
  847. ULONGLONG LRR1;
  848. ULONGLONG CR82;
  849. ULONGLONG CR83;
  850. ULONGLONG CR84;
  851. ULONGLONG CR85;
  852. ULONGLONG CR86;
  853. ULONGLONG CR87;
  854. ULONGLONG CR88;
  855. ULONGLONG CR89;
  856. ULONGLONG CR90;
  857. ULONGLONG CR91;
  858. ULONGLONG CR92;
  859. ULONGLONG CR93;
  860. ULONGLONG CR94;
  861. ULONGLONG CR95;
  862. ULONGLONG CR96;
  863. ULONGLONG CR97;
  864. ULONGLONG CR98;
  865. ULONGLONG CR99;
  866. ULONGLONG CR100;
  867. ULONGLONG CR101;
  868. ULONGLONG CR102;
  869. ULONGLONG CR103;
  870. ULONGLONG CR104;
  871. ULONGLONG CR105;
  872. ULONGLONG CR106;
  873. ULONGLONG CR107;
  874. ULONGLONG CR108;
  875. ULONGLONG CR109;
  876. ULONGLONG CR110;
  877. ULONGLONG CR111;
  878. ULONGLONG CR112;
  879. ULONGLONG CR113;
  880. ULONGLONG CR114;
  881. ULONGLONG CR115;
  882. ULONGLONG CR116;
  883. ULONGLONG CR117;
  884. ULONGLONG CR118;
  885. ULONGLONG CR119;
  886. ULONGLONG CR120;
  887. ULONGLONG CR121;
  888. ULONGLONG CR122;
  889. ULONGLONG CR123;
  890. ULONGLONG CR124;
  891. ULONGLONG CR125;
  892. ULONGLONG CR126;
  893. ULONGLONG CR127;
  894. } PROCESSOR_CONTROL_REGISTERS_IA64, *PPROCESSOR_CONTROL_REGISTERS_IA64;
  895. typedef struct _PROCESSOR_APPLICATION_REGISTERS_IA64 {
  896. ULONGLONG KR0;
  897. ULONGLONG KR1;
  898. ULONGLONG KR2;
  899. ULONGLONG KR3;
  900. ULONGLONG KR4;
  901. ULONGLONG KR5;
  902. ULONGLONG KR6;
  903. ULONGLONG KR7;
  904. ULONGLONG AR8;
  905. ULONGLONG AR9;
  906. ULONGLONG AR10;
  907. ULONGLONG AR11;
  908. ULONGLONG AR12;
  909. ULONGLONG AR13;
  910. ULONGLONG AR14;
  911. ULONGLONG AR15;
  912. ULONGLONG RSC;
  913. ULONGLONG BSP;
  914. ULONGLONG BSPSTORE;
  915. ULONGLONG RNAT;
  916. ULONGLONG AR20;
  917. ULONGLONG FCR;
  918. ULONGLONG AR22;
  919. ULONGLONG AR23;
  920. ULONGLONG EFLAG;
  921. ULONGLONG CSD;
  922. ULONGLONG SSD;
  923. ULONGLONG CFLG;
  924. ULONGLONG FSR;
  925. ULONGLONG FIR;
  926. ULONGLONG FDR;
  927. ULONGLONG AR31;
  928. ULONGLONG CCV;
  929. ULONGLONG AR33;
  930. ULONGLONG AR34;
  931. ULONGLONG AR35;
  932. ULONGLONG UNAT;
  933. ULONGLONG AR37;
  934. ULONGLONG AR38;
  935. ULONGLONG AR39;
  936. ULONGLONG FPSR;
  937. ULONGLONG AR41;
  938. ULONGLONG AR42;
  939. ULONGLONG AR43;
  940. ULONGLONG ITC;
  941. ULONGLONG AR45;
  942. ULONGLONG AR46;
  943. ULONGLONG AR47;
  944. ULONGLONG AR48;
  945. ULONGLONG AR49;
  946. ULONGLONG AR50;
  947. ULONGLONG AR51;
  948. ULONGLONG AR52;
  949. ULONGLONG AR53;
  950. ULONGLONG AR54;
  951. ULONGLONG AR55;
  952. ULONGLONG AR56;
  953. ULONGLONG AR57;
  954. ULONGLONG AR58;
  955. ULONGLONG AR59;
  956. ULONGLONG AR60;
  957. ULONGLONG AR61;
  958. ULONGLONG AR62;
  959. ULONGLONG AR63;
  960. ULONGLONG PFS;
  961. ULONGLONG LC;
  962. ULONGLONG EC;
  963. ULONGLONG AR67;
  964. ULONGLONG AR68;
  965. ULONGLONG AR69;
  966. ULONGLONG AR70;
  967. ULONGLONG AR71;
  968. ULONGLONG AR72;
  969. ULONGLONG AR73;
  970. ULONGLONG AR74;
  971. ULONGLONG AR75;
  972. ULONGLONG AR76;
  973. ULONGLONG AR77;
  974. ULONGLONG AR78;
  975. ULONGLONG AR79;
  976. ULONGLONG AR80;
  977. ULONGLONG AR81;
  978. ULONGLONG AR82;
  979. ULONGLONG AR83;
  980. ULONGLONG AR84;
  981. ULONGLONG AR85;
  982. ULONGLONG AR86;
  983. ULONGLONG AR87;
  984. ULONGLONG AR88;
  985. ULONGLONG AR89;
  986. ULONGLONG AR90;
  987. ULONGLONG AR91;
  988. ULONGLONG AR92;
  989. ULONGLONG AR93;
  990. ULONGLONG AR94;
  991. ULONGLONG AR95;
  992. ULONGLONG AR96;
  993. ULONGLONG AR97;
  994. ULONGLONG AR98;
  995. ULONGLONG AR99;
  996. ULONGLONG AR100;
  997. ULONGLONG AR101;
  998. ULONGLONG AR102;
  999. ULONGLONG AR103;
  1000. ULONGLONG AR104;
  1001. ULONGLONG AR105;
  1002. ULONGLONG AR106;
  1003. ULONGLONG AR107;
  1004. ULONGLONG AR108;
  1005. ULONGLONG AR109;
  1006. ULONGLONG AR110;
  1007. ULONGLONG AR111;
  1008. ULONGLONG AR112;
  1009. ULONGLONG AR113;
  1010. ULONGLONG AR114;
  1011. ULONGLONG AR115;
  1012. ULONGLONG AR116;
  1013. ULONGLONG AR117;
  1014. ULONGLONG AR118;
  1015. ULONGLONG AR119;
  1016. ULONGLONG AR120;
  1017. ULONGLONG AR121;
  1018. ULONGLONG AR122;
  1019. ULONGLONG AR123;
  1020. ULONGLONG AR124;
  1021. ULONGLONG AR125;
  1022. ULONGLONG AR126;
  1023. ULONGLONG AR127;
  1024. } PROCESSOR_APPLICATION_REGISTERS_IA64, *PPROCESSOR_APPLICATION_REGISTERS_IA64;
  1025. typedef struct _ERROR_PROCESSOR_STATIC_INFO_IA64 {
  1026. ERROR_PROCESSOR_STATIC_INFO_VALID_IA64 Valid;
  1027. UCHAR MinState[ /* SAL Specs, July 2000 and Jan 2001 state approximatively: */ 1024];
  1028. ULONGLONG BR [ 8 ];
  1029. ULONGLONG CR [ /* SAL Specs, July 2000 states that it is processor dependent */ 128 ];
  1030. ULONGLONG AR [ /* SAL Specs, July 2000 states that it is processor dependent */ 128 ];
  1031. ULONGLONG RR [ 8 ];
  1032. ULONGLONG FR [ 2 * 128 ];
  1033. } ERROR_PROCESSOR_STATIC_INFO_IA64, *PERROR_PROCESSOR_STATIC_INFO_IA64;
  1034. typedef union _ERROR_PROCESSOR_ERROR_MAP_IA64 {
  1035. ULONGLONG ErrorMap;
  1036. struct {
  1037. ULONGLONG Cid:4; // bits 0- 3: Processor Core Identifier
  1038. ULONGLONG Tid:4; // 4- 7: Logical Thread Identifier
  1039. ULONGLONG Eic:4; // 8-11: Instruction Caches Level Information
  1040. ULONGLONG Edc:4; // 12-15: Data Caches Level Information
  1041. ULONGLONG Eit:4; // 16-19: Instruction TLB Level Information
  1042. ULONGLONG Edt:4; // 20-23: Data TLB Level Information
  1043. ULONGLONG Ebh:4; // 24-27: Processor Bus Level Information
  1044. ULONGLONG Erf:4; // 28-31: Register File Level Information
  1045. ULONGLONG Ems:16; // 32-47: MicroArchitecture Level Information
  1046. ULONGLONG Reserved:16;
  1047. };
  1048. } ERROR_PROCESSOR_ERROR_MAP_IA64, *PERROR_PROCESSOR_ERROR_MAP_IA64;
  1049. typedef struct _ERROR_PROCESSOR_IA64 {
  1050. ERROR_SECTION_HEADER_IA64 Header;
  1051. ERROR_PROCESSOR_VALID_IA64 Valid;
  1052. ULONGLONG ErrorMap;
  1053. ULONGLONG StateParameter;
  1054. ULONGLONG CRLid;
  1055. #if 0
  1056. // The presence of the following data depends on the valid bits
  1057. // from ERROR_PROCESSOR.Valid.
  1058. //
  1059. ERROR_MODINFO CacheErrorInfo [ /* Valid.CacheCheckNum */ ]; // 0->15 cache error modinfo structs.
  1060. ERROR_MODINFO TlbErrorInfo [ /* Valid.TlbCheckNum */ ]; // 0->15 tlb error modinfo structs.
  1061. ERROR_MODINFO BusErrorInfo [ /* Valid.BusCheckNum */ ]; // 0->15 bus error modinfo structs.
  1062. ERROR_MODINFO RegFileCheckInfo [ /* Valid.RegFileCheckNum */ ]; // 0->15 registers file errors.
  1063. ERROR_MODINFO MsCheckInfo [ /* Valid.MsCheckNum */ ]; // 0->15 registers file errors.
  1064. ERROR_PROCESSOR_CPUID_INFO CpuIdInfo; // field will always be there but could be zero-padded.
  1065. ERROR_PROCESSOR_STATIC_INFO StaticInfo; // field will always be there but could be zero-padded.
  1066. #endif // 0
  1067. } ERROR_PROCESSOR_IA64, *PERROR_PROCESSOR_IA64;
  1068. //
  1069. // IA64 ERRORS: ERROR_STATUS definitions
  1070. //
  1071. typedef union _ERROR_STATUS_IA64 {
  1072. ULONGLONG Status;
  1073. struct { // Bits:
  1074. ULONGLONG Reserved0:8; // 7-0: Reserved
  1075. ULONGLONG Type:8; // 15-8: Error Type - See _ERR_TYPE definitions.
  1076. ULONGLONG Address:1; // 16: Error was detected on address signals or on address portion of transaction
  1077. ULONGLONG Control:1; // 17: Error was detected on control signals or in control portion of transaction
  1078. ULONGLONG Data:1; // 18: Error was detected on data signals or in data portion of transaction
  1079. ULONGLONG Responder:1; // 19: Error was detected by responder of transaction
  1080. ULONGLONG Requestor:1; // 20: Error was detected by requestor of transaction
  1081. ULONGLONG FirstError:1; // 21: If multiple errors, this is the first error of the highestseverity that occurred
  1082. ULONGLONG Overflow:1; // 22: Additional errors occurred which were not logged because registers overflow
  1083. ULONGLONG Reserved1:41; // 63-23: Reserved
  1084. };
  1085. } ERROR_STATUS_IA64, *PERROR_STATUS_IA64;
  1086. //
  1087. // IA64 ERRORS: Platform OEM_DATA definitions
  1088. //
  1089. typedef struct _ERROR_OEM_DATA_IA64 {
  1090. USHORT Length;
  1091. #if 0
  1092. UCHAR Data[/* ERROR_OEM_DATA.Length */];
  1093. #endif // 0
  1094. } ERROR_OEM_DATA_IA64, *PERROR_OEM_DATA_IA64;
  1095. //
  1096. // IA64 ERRORS: Platform BUS_SPECIFIC_DATA definitions
  1097. //
  1098. typedef union _ERROR_BUS_SPECIFIC_DATA_IA64 {
  1099. ULONGLONG BusSpecificData;
  1100. struct { // Bits :
  1101. ULONGLONG LockAsserted:1; // 0: LOCK# Asserted during request phase
  1102. ULONGLONG DeferLogged:1; // 1: Defer phase is logged
  1103. ULONGLONG IOQEmpty:1; // 2: IOQ is empty
  1104. ULONGLONG DeferredTransaction:1; // 3: Component interface deferred transaction
  1105. ULONGLONG RetriedTransaction:1; // 4: Component interface retried transaction
  1106. ULONGLONG MemoryClaimedTransaction:1; // 5: memory claimed the transaction
  1107. ULONGLONG IOClaimedTransaction:1; // 6: IO controller claimed the transaction
  1108. ULONGLONG ResponseParitySignal:1; // 7: Response parity signal
  1109. ULONGLONG DeferSignal:1; // 8: DEFER# signal
  1110. ULONGLONG HitMSignal:1; // 9: HITM# signal
  1111. ULONGLONG HitSignal:1; // 10: HIT# signal
  1112. ULONGLONG RequestBusFirstCycle:6; // 16-11: First cycle of request bus
  1113. ULONGLONG RequestBusSecondCycle:6; // 22-17: Second cycle of request bus
  1114. ULONGLONG AddressParityBusFirstCycle:2; // 24-23: First cycle of address parity bus
  1115. ULONGLONG AddressParityBusSecondCycle:2; // 26-25: Second cycle of address parity
  1116. ULONGLONG ResponseBus:3; // 29-27: Response bus
  1117. ULONGLONG RequestParitySignalFirstCycle:1; // 30: First cycle of request parity signal
  1118. ULONGLONG RequestParitySignalSecondCycle:1; // 31: Second cycle of request parity signal
  1119. ULONGLONG Reserved:32; // 63-32: Reserved
  1120. };
  1121. } ERROR_BUS_SPECIFIC_DATA_IA64, *PERROR_BUS_SPECIFIC_DATA_IA64;
  1122. #define ERROR_MEMORY_GUID_IA64 \
  1123. { 0xe429faf2, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  1124. #define ERROR_PCI_BUS_GUID_IA64 \
  1125. { 0xe429faf4, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  1126. #define ERROR_PCI_COMPONENT_GUID_IA64 \
  1127. { 0xe429faf6, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  1128. #define ERROR_SYSTEM_EVENT_LOG_GUID_IA64 \
  1129. { 0xe429faf3, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  1130. #define ERROR_SMBIOS_GUID_IA64 \
  1131. { 0xe429faf5, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  1132. #define ERROR_PLATFORM_SPECIFIC_GUID_IA64 \
  1133. { 0xe429faf7, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  1134. typedef union _ERROR_PLATFORM_SPECIFIC_VALID_IA64 {
  1135. ULONGLONG Valid;
  1136. struct { // Bits:
  1137. ULONGLONG ErrorStatus:1; // 0: Error Status valid bit
  1138. ULONGLONG RequestorId:1; // 1: Requestor Identifier valid bit
  1139. ULONGLONG ResponderId:1; // 2: Responder Identifier valid bit
  1140. ULONGLONG TargetId:1; // 3: Target Identifier valid bit
  1141. ULONGLONG BusSpecificData:1; // 4: Bus Specific Data valid bit
  1142. ULONGLONG OemId:1; // 5: OEM Identification valid bit
  1143. ULONGLONG OemData:1; // 6: OEM Data valid bit
  1144. ULONGLONG OemDevicePath:1; // 7: OEM Device Path valid bit
  1145. ULONGLONG Reserved:56; // 63-8: Reserved
  1146. };
  1147. } ERROR_PLATFORM_SPECIFIC_VALID_IA64, *PERROR_PLATFORM_SPECIFIC_VALID_IA64;
  1148. typedef struct _ERROR_PLATFORM_SPECIFIC_IA64 {
  1149. ERROR_SECTION_HEADER_IA64 Header;
  1150. ERROR_PLATFORM_SPECIFIC_VALID_IA64 Valid;
  1151. ERROR_STATUS_IA64 ErrorStatus; // Platform Generic Error Status
  1152. ULONGLONG RequestorId; // Bus Requestor ID at the time of the event
  1153. ULONGLONG ResponderId; // Bus Responder ID at the time of the event
  1154. ULONGLONG TargetId; // Bus intended Target ID at the time of the event
  1155. ERROR_BUS_SPECIFIC_DATA_IA64 BusSpecificData; // OEM specific Bus dependent data
  1156. UCHAR OemId[16]; // OEM specific data for bus identification
  1157. ERROR_OEM_DATA_IA64 OemData; // OEM specific data
  1158. #if 0
  1159. UCHAR OemDevicePath[/* 16 ? */]; // OEM specific vendor device path.
  1160. #endif // 0
  1161. } ERROR_PLATFORM_SPECIFIC_IA64, *PERROR_PLATFORM_SPECIFIC_IA64;
  1162. #define ERROR_PLATFORM_BUS_GUID_IA64 \
  1163. { 0xe429faf9, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  1164. #define ERROR_PLATFORM_HOST_CONTROLLER_GUID_IA64 \
  1165. { 0xe429faf8, 0x3cb7, 0x11d4, { 0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }}
  1166. #ifdef __cplusplus
  1167. }
  1168. #endif
  1169. #endif