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.

646 lines
20 KiB

  1. /*++ BUILD Version: 0000 Increment this if a change has global effects
  2. Copyright (c) 1993 Digital Euipment Corporation
  3. Module Name:
  4. axp21064.h
  5. Abstract:
  6. This module defines the DECchip 21064-specific structures that are
  7. defined in the PAL but must be visible to the HAL.
  8. Revision History:
  9. --*/
  10. #ifndef _AXP21064_
  11. #define _AXP21064_
  12. //begin_axp21066
  13. #ifndef CORE_21064
  14. #define CORE_21064
  15. //
  16. // Define the "special" processor bus used by all machines that run a
  17. // DECchip 21064. The processor bus is used to access the internal
  18. // performance counters.
  19. //
  20. #define PROCESSOR_BUS_21064 21064
  21. //
  22. // Define the number of entries for repeated internal processor registers.
  23. //
  24. #define ITB_ENTRIES_21064 12
  25. #define DTB_ENTRIES_21064 32
  26. #define PAL_TEMPS_21064 32
  27. //
  28. // Define an interrupt enable table entry.
  29. //
  30. typedef struct _IETEntry_21064{
  31. ULONG ApcEnable: 1;
  32. ULONG DispatchEnable: 1;
  33. ULONG PerformanceCounter0Enable: 1;
  34. ULONG PerformanceCounter1Enable: 1;
  35. ULONG CorrectableReadEnable: 1;
  36. ULONG Irq0Enable: 1;
  37. ULONG Irq1Enable: 1;
  38. ULONG Irq2Enable: 1;
  39. ULONG Irq3Enable: 1;
  40. ULONG Irq4Enable: 1;
  41. ULONG Irq5Enable: 1;
  42. ULONG Reserved: 21;
  43. } IETEntry_21064, *PIETEntry_21064;
  44. //
  45. // Define the offsets and sizes of the mask sub-tables within the interrupt
  46. // mask table in the PCR.
  47. //
  48. #define IRQLMASK_HDW_SUBTABLE_21064 (8)
  49. #define IRQLMASK_HDW_SUBTABLE_21064_ENTRIES (64)
  50. #define IRQLMASK_SFW_SUBTABLE_21064 (0)
  51. #define IRQLMASK_SFW_SUBTABLE_21064_ENTRIES (4)
  52. #define IRQLMASK_PC_SUBTABLE_21064 (4)
  53. #define IRQLMASK_PC_SUBTABLE_21064_ENTRIES (4)
  54. //
  55. // PALcode Event Counters for the 21064
  56. // This is the structure of the data returned by the rdcounters call pal.
  57. //
  58. typedef struct _COUNTERS_21064{
  59. LARGE_INTEGER MachineCheckCount;
  60. LARGE_INTEGER ArithmeticExceptionCount;
  61. LARGE_INTEGER InterruptCount;
  62. LARGE_INTEGER ItbMissCount;
  63. LARGE_INTEGER NativeDtbMissCount;
  64. LARGE_INTEGER PalDtbMissCount;
  65. LARGE_INTEGER ItbAcvCount;
  66. LARGE_INTEGER DtbAcvCount;
  67. LARGE_INTEGER UnalignedCount;
  68. LARGE_INTEGER OpcdecCount;
  69. LARGE_INTEGER FenCount;
  70. LARGE_INTEGER ItbTnvCount;
  71. LARGE_INTEGER DtbTnvCount;
  72. LARGE_INTEGER PteMissCount;
  73. LARGE_INTEGER KspMissCount;
  74. LARGE_INTEGER PdeTnvCount;
  75. LARGE_INTEGER HaltCount;
  76. LARGE_INTEGER RestartCount;
  77. LARGE_INTEGER DrainaCount;
  78. LARGE_INTEGER InitpalCount;
  79. LARGE_INTEGER WrentryCount;
  80. LARGE_INTEGER SwpirqlCount;
  81. LARGE_INTEGER RdirqlCount;
  82. LARGE_INTEGER DiCount;
  83. LARGE_INTEGER EiCount;
  84. LARGE_INTEGER SwppalCount;
  85. LARGE_INTEGER SsirCount;
  86. LARGE_INTEGER CsirCount;
  87. LARGE_INTEGER RfeCount;
  88. LARGE_INTEGER RetsysCount;
  89. LARGE_INTEGER SwpctxCount;
  90. LARGE_INTEGER SwpprocessCount;
  91. LARGE_INTEGER RdmcesCount;
  92. LARGE_INTEGER WrmcesCount;
  93. LARGE_INTEGER TbiaCount;
  94. LARGE_INTEGER TbisCount;
  95. LARGE_INTEGER DtbisCount;
  96. LARGE_INTEGER RdkspCount;
  97. LARGE_INTEGER SwpkspCount;
  98. LARGE_INTEGER RdpsrCount;
  99. LARGE_INTEGER RdpcrCount;
  100. LARGE_INTEGER RdthreadCount;
  101. LARGE_INTEGER RdcountersCount;
  102. LARGE_INTEGER RdstateCount;
  103. LARGE_INTEGER WrperfmonCount;
  104. LARGE_INTEGER InitpcrCount;
  105. LARGE_INTEGER BptCount;
  106. LARGE_INTEGER CallsysCount;
  107. LARGE_INTEGER ImbCount;
  108. LARGE_INTEGER GentrapCount;
  109. LARGE_INTEGER RdtebCount;
  110. LARGE_INTEGER KbptCount;
  111. LARGE_INTEGER CallkdCount;
  112. LARGE_INTEGER TbisasnCount;
  113. LARGE_INTEGER Misc1Count;
  114. LARGE_INTEGER Misc2Count;
  115. LARGE_INTEGER Misc3Count;
  116. } COUNTERS_21064, *PCOUNTERS_21064;
  117. typedef enum _AXP21064_PCCOUNTER{
  118. Ev4PerformanceCounter0 = 0,
  119. Ev4PerformanceCounter1 = 1
  120. } AXP21064_PCCOUNTER, *PAXP21064_PCCOUNTER;
  121. typedef enum _AXP21064_PCMUXCONTROL{
  122. Ev4TotalIssues = 0x0,
  123. Ev4PipelineDry = 0x2,
  124. Ev4LoadInstruction = 0x4,
  125. Ev4PipelineFrozen = 0x6,
  126. Ev4BranchInstructions = 0x8,
  127. Ev4PalMode = 0xb,
  128. Ev4TotalCycles = 0xa,
  129. Ev4TotalNonIssues = 0xc,
  130. Ev4ExternalCounter0 = 0xe,
  131. Ev4DcacheMiss = 0x0,
  132. Ev4IcacheMiss = 0x1,
  133. Ev4DualIssues = 0x2,
  134. Ev4BranchMispredicts = 0x3,
  135. Ev4FPInstructions = 0x4,
  136. Ev4IntegerOperate = 0x5,
  137. Ev4StoreInstructions = 0x6,
  138. Ev4ExternalCounter1 = 0x7
  139. } AXP21064_PCMUXCONTROL, *PAXP21064_PCMUXCONTROL;
  140. typedef enum _AXP21064_PCEVENTCOUNT{
  141. Ev4CountEvents2xx8 = 0x100,
  142. Ev4CountEvents2xx12 = 0x1000,
  143. Ev4CountEvents2xx16 = 0x10000
  144. } AXP21064_PCEVENTCOUNT, *PAXP21064_PCEVENTCOUNT;
  145. typedef enum _AXP21064_EVENTCOUNT{
  146. Ev4EventCountHigh = 1,
  147. Ev4EventCountLow = 0
  148. } AXP21064_EVENTCOUNT, *PAXP21064_EVENTCOUNT;
  149. //
  150. // Internal Processor Register definitions (read format).
  151. //
  152. //
  153. // Pte formats
  154. //
  155. typedef LARGE_INTEGER ITB_PTE_21064;
  156. typedef ITB_PTE_21064 *PITB_PTE_21064;
  157. typedef LARGE_INTEGER DTB_PTE_21064;
  158. typedef DTB_PTE_21064 *PDTB_PTE_21064;
  159. #define PTE_FOR_21064_SHIFT 3
  160. #define PTE_FOW_21064_SHIFT 4
  161. #define PTE_KWE_21064_SHIFT 5
  162. #define PTE_EWE_21064_SHIFT 6
  163. #define PTE_SWE_21064_SHIFT 7
  164. #define PTE_UWE_21064_SHIFT 8
  165. #define PTE_KRE_21064_SHIFT 9
  166. #define PTE_ERE_21064_SHIFT 10
  167. #define PTE_SRE_21064_SHIFT 11
  168. #define PTE_URE_21064_SHIFT 12
  169. #define PTE_PFN_21064_SHIFT 13
  170. #define PTE_PFN_21064_SHIFTMASK 0x1FFFF
  171. #define PTE_ASM_21064_SHIFT 34
  172. #define PTE_ALL_21064(itbpte) (itbpte)
  173. #define PTE_FOR_21064(itbpte) ( (itbpte.LowPart >> PTE_FOR_21064_SHIFT) & 1)
  174. #define PTE_FOW_21064(itbpte) ( (itbpte.LowPart >> PTE_FOW_21064_SHIFT) & 1)
  175. #define PTE_KWE_21064(itbpte) ( (itbpte.LowPart >> PTE_KWE_21064_SHIFT) & 1)
  176. #define PTE_EWE_21064(itbpte) ( (itbpte.LowPart >> PTE_EWE_21064_SHIFT) & 1)
  177. #define PTE_SWE_21064(itbpte) ( (itbpte.LowPart >> PTE_SWE_21064_SHIFT) & 1)
  178. #define PTE_UWE_21064(itbpte) ( (itbpte.LowPart >> PTE_UWE_21064_SHIFT) & 1)
  179. #define PTE_KRE_21064(itbpte) ( (itbpte.LowPart >> PTE_KRE_21064_SHIFT) & 1)
  180. #define PTE_ERE_21064(itbpte) ( (itbpte.LowPart >> PTE_ERE_21064_SHIFT) & 1)
  181. #define PTE_SRE_21064(itbpte) ( (itbpte.LowPart >> PTE_SRE_21064_SHIFT) & 1)
  182. #define PTE_URE_21064(itbpte) ( (itbpte.LowPart >> PTE_URE_21064_SHIFT) & 1)
  183. #define PTE_ASM_21064(itbpte) ( (itbpte.LowPart >> PTE_ASM_21064_SHIFT) & 1)
  184. #define PTE_PFN_21064(itbpte) ( (itbpte.LowPart >> PTE_PFN_21064_SHIFT) & PTE_PFN_21064_SHIFTMASK)
  185. //
  186. // Instruction Cache Control and Status Register format
  187. //
  188. typedef LARGE_INTEGER ICCSR_21064;
  189. typedef ICCSR_21064 *PICCSR_21064;
  190. #define ICCSR_PC0_21064_SHIFT 1
  191. #define ICCSR_PC1_21064_SHIFT 2
  192. #define ICCSR_PCMUX0_21064_SHIFT 9
  193. #define ICCSR_PCMUX0_21064_SHIFTMASK 0xF
  194. #define ICCSR_PCMUX1_21064_SHIFT 13
  195. #define ICCSR_PCMUX1_21064_SHIFTMASK 0x7
  196. #define ICCSR_PIPE_21064_SHIFT 16
  197. #define ICCSR_BPE_21064_SHIFT 17
  198. #define ICCSR_JSE_21064_SHIFT 18
  199. #define ICCSR_BHE_21064_SHIFT 19
  200. #define ICCSR_DI_21064_SHIFT 20
  201. #define ICCSR_HWE_21064_SHIFT 21
  202. #define ICCSR_MAP_21064_SHIFT 22
  203. #define ICCSR_FPE_21064_SHIFT 23
  204. #define ICCSR_ASN_21064_SHIFT 28
  205. #define ICCSR_ASN_21064_SHIFTMASK 0x3F
  206. #define ICCSR_ALL_21064(iccsr) (iccsr)
  207. #define ICCSR_PC0_21064(iccsr) ( (iccsr.LowPart >> ICCSR_PC0_21064_SHIFT) & 1)
  208. #define ICCSR_PC1_21064(iccsr) ( (iccsr.LowPart >> ICCSR_PC1_21064_SHIFT) & 1)
  209. #define ICCSR_PCMUX0_21064(iccsr) \
  210. ( (iccsr.LowPart >> ICCSR_PCMUX0_21064_SHIFT) & ICCSR_PCMUX0_21064_SHIFTMASK)
  211. #define ICCSR_PCMUX1_21064(iccsr) \
  212. ( (iccsr.LowPart >> ICCSR_PCMUX1_21064_SHIFT) & ICCSR_PCMUX1_21064_SHIFTMASK)
  213. #define ICCSR_PIPE_21064(iccsr) ( (iccsr.LowPart >> ICCSR_PIPE_21064_SHIFT) & 1)
  214. #define ICCSR_BPE_21064(iccsr) ( (iccsr.LowPart >> ICCSR_BPE_21064_SHIFT) & 1)
  215. #define ICCSR_JSE_21064(iccsr) ( (iccsr.LowPart >> ICCSR_JSE_21064_SHIFT) & 1)
  216. #define ICCSR_BHE_21064(iccsr) ( (iccsr.LowPart >> ICCSR_BHE_21064_SHIFT) & 1)
  217. #define ICCSR_DI_21064(iccsr) ( (iccsr.LowPart >> ICCSR_DI_21064_SHIFT) & 1)
  218. #define ICCSR_HWE_21064(iccsr) ( (iccsr.LowPart >> ICCSR_HWE_21064_SHIFT) & 1)
  219. #define ICCSR_MAP_21064(iccsr) ( (iccsr.LowPart >> ICCSR_MAP_21064_SHIFT) & 1)
  220. #define ICCSR_FPE_21064(iccsr) ( (iccsr.LowPart >> ICCSR_FPE_21064_SHIFT) & 1)
  221. #define ICCSR_ASN_21064(iccsr) \
  222. (ULONG)( (iccsr.LowPart >> ICCSR_ASN_21064_SHIFT) & ICCSR_ASN_21064_SHIFTMASK)
  223. //
  224. // Processor Status (PS) format.
  225. //
  226. typedef LARGE_INTEGER PS_21064;
  227. typedef PS_21064 *PPS_21064;
  228. #define PS_CM0_21064_SHIFT 1
  229. #define PS_CM1_21064_SHIFT 34
  230. #define PS_ALL_21064(ps) (ps)
  231. #define PS_CM_21064(ps) \
  232. ( (((ps).LowPart >> PS_CM0_21064_SHIFT) & 1) || \
  233. (((ps).LowPart >> (PS_CM1_21064_SHIFT-1)) & 1) )
  234. //
  235. // Exception Summary (EXC_SUM) format.
  236. //
  237. typedef LARGE_INTEGER EXC_SUM_21064;
  238. typedef EXC_SUM_21064 *PEXC_SUM_21064;
  239. #define EXCSUM_SWC_21064_SHIFT 2
  240. #define EXCSUM_INV_21064_SHIFT 3
  241. #define EXCSUM_DZE_21064_SHIFT 4
  242. #define EXCSUM_FOV_21064_SHIFT 5
  243. #define EXCSUM_UNF_21064_SHIFT 6
  244. #define EXCSUM_INE_21064_SHIFT 7
  245. #define EXCSUM_IOV_21064_SHIFT 8
  246. #define EXCSUM_MSK_21064_SHIFT 33
  247. #define EXCSUM_ALL_21064(excsum) (excsum)
  248. #define EXCSUM_SWC_21064(excsum) ((excsum.LowPart >> EXCSUM_SWC_21064_SHIFT) & 0x1)
  249. #define EXCSUM_INV_21064(excsum) ( (excsum.LowPart >> EXCSUM_INV_21064_SHIFT) & 0x1)
  250. #define EXCSUM_DZE_21064(excsum) ( (excsum.LowPart >> EXCSUM_DZE_21064_SHIFT) & 0x1)
  251. #define EXCSUM_FOV_21064(excsum) ( (excsum.LowPart >> EXCSUM_FOV_21064_SHIFT) & 0x1)
  252. #define EXCSUM_UNF_21064(excsum) ( (excsum.LowPart >> EXCSUM_UNF_21064_SHIFT) & 0x1)
  253. #define EXCSUM_INE_21064(excsum) ( (excsum.LowPart >> EXCSUM_INE_21064_SHIFT) & 0x1)
  254. #define EXCSUM_IOV_21064(excsum) ( (excsum.LowPart >> EXCSUM_IOV_21064_SHIFT) & 0x1)
  255. #define EXCSUM_MSK_21064(excsum) ( (excsum.LowPart >> EXCSUM_MSK_21064_SHIFT) & 0x1)
  256. //
  257. // Interrupt Request (HIRR, SIRR, ASTRR) format.
  258. //
  259. typedef LARGE_INTEGER IRR_21064;
  260. typedef IRR_21064 *PIRR_21064;
  261. #define IRR_HWR_21064_SHIFT 1
  262. #define IRR_SWR_21064_SHIFT 2
  263. #define IRR_ATR_21064_SHIFT 3
  264. #define IRR_CRR_21064_SHIFT 4
  265. #define IRR_HIRR53_21064_SHIFT 5
  266. #define IRR_HIRR53_21064_SHIFTMASK 0x7
  267. #define IRR_PC1_21064_SHIFT 8
  268. #define IRR_PC0_21064_SHIFT 9
  269. #define IRR_HIRR20_21064_SHIFT 10
  270. #define IRR_HIRR20_21064_SHIFTMASK 0x7
  271. #define IRR_SLR_21064_SHIFT 13
  272. #define IRR_SIRR_21064_SHIFT 14
  273. #define IRR_SIRR_21064_SHIFTMASK 0x7FFF
  274. #define IRR_ASTRR_21064_SHIFT 29
  275. #define IRR_ASTRR_21064_SHIFTMASK 0xF
  276. #define IRR_ALL_21064(irr) (irr)
  277. #define IRR_HWR_21064(irr) ( (irr.LowPart >> IRR_HWR_21064_SHIFT) & 0x1)
  278. #define IRR_SWR_21064(irr) ( (irr.LowPart >> IRR_SWR_21064_SHIFT) & 0x1)
  279. #define IRR_ATR_21064(irr) ( (irr.LowPart >> IRR_ATR_21064_SHIFT) & 0x1)
  280. #define IRR_CRR_21064(irr) ( (irr.LowPart >> IRR_CRR_21064_SHIFT) & 0x1)
  281. #define IRR_HIRR_21064(irr) \
  282. ( ((irr.LowPart >> (IRR_HIRR53_21064_SHIFT-3)) & IRR_HIRR53_21064_SHIFTMASK) || \
  283. ( (irr.LowPart >> IRR_HIRR20_21064_SHIFT) & IRR_HIRR20_21064_SHIFTMASK) )
  284. #define IRR_PC1_21064(irr) ( (irr.LowPart >> IRR_PC1_21064_SHIFT) & 0x1)
  285. #define IRR_PC0_21064(irr) ( (irr.LowPart >> IRR_PC0_21064_SHIFT) & 0x1)
  286. #define IRR_SLR_21064(irr) ( (irr.LowPart >> IRR_SLR_21064_SHIFT) & 0x1)
  287. #define IRR_SIRR_21064(irr) \
  288. ( (irr.LowPart >> IRR_SIRR_21064_SHIFT) & IRR_SIRR_21064_SHIFTMASK)
  289. #define IRR_ASTRR_21064(irr) \
  290. ( (irr.LowPart >> IRR_ASTRR_21064_SHIFT) & IRR_ASTRR_21064_SHIFTMASK)
  291. //
  292. // Interrupt Enable (HIER, SIER, ASTER) format.
  293. //
  294. typedef LARGE_INTEGER IER_21064;
  295. typedef IER_21064 *PIER_21064;
  296. #define IER_CRR_21064_SHIFT 4
  297. #define IER_HIER53_21064_SHIFT 5
  298. #define IER_HIER53_21064_SHIFTMASK 0x7
  299. #define IER_PC1_21064_SHIFT 8
  300. #define IER_PC0_21064_SHIFT 9
  301. #define IER_HIER20_21064_SHIFT 10
  302. #define IER_HIER20_21064_SHIFTMASK 0x7
  303. #define IER_SLR_21064_SHIFT 13
  304. #define IER_SIER_21064_SHIFT 14
  305. #define IER_SIER_21064_SHIFTMASK 0x7FFF
  306. #define IER_ASTER_21064_SHIFT 29
  307. #define IER_ASTER_21064_SHIFTMASK 0xF
  308. #define IER_ALL_21064(ier) (ier)
  309. #define IER_CRR_21064(ier) ( (ier.LowPart >> IER_CRR_21064_SHIFT) & 0x1)
  310. #define IER_HIER_21064(ier) \
  311. ( ( (ier.LowPart >> (IER_HIER53_21064_SHIFT-3)) & IER_HIER53_21064_SHIFTMASK) || \
  312. ( (ier.LowPart >> IER_HIER20_21064_SHIFT) & IER_HIER20_21064_SHIFTMASK) )
  313. #define IER_PC1_21064(ier) ( (ier.LowPart >> IER_PC1_21064_SHIFT) & 0x1)
  314. #define IER_PC0_21064(ier) ( (ier.LowPart >> IER_PC0_21064_SHIFT) & 0x1)
  315. #define IER_SLR_21064(ier) ( (ier.LowPart >> IER_SLR_21064_SHIFT) & 0x1)
  316. #define IER_SIER_21064(ier) \
  317. ( (ier.LowPart >> IER_SIER_21064_SHIFT) & IER_SIER_21064_SHIFTMASK)
  318. #define IER_ASTER_21064(ier) \
  319. ( (ier.LowPart >> IER_ASTER_21064_SHIFT) & IER_ASTER_21064_SHIFTMASK)
  320. //
  321. // Abox Control Register (ABOX_CTL) format.
  322. //
  323. typedef union _ABOX_CTL_21064{
  324. struct {
  325. ULONG wb_dis: 1;
  326. ULONG mchk_en: 1;
  327. ULONG crd_en: 1;
  328. ULONG ic_sbuf_en: 1;
  329. ULONG spe_1: 1;
  330. ULONG spe_2: 1;
  331. ULONG emd_en: 1;
  332. ULONG mbz1: 3;
  333. ULONG dc_ena: 1;
  334. ULONG dc_fhit: 1;
  335. } bits;
  336. LARGE_INTEGER all;
  337. } ABOX_CTL_21064, *PABOX_CTL_21064;
  338. #define ABOXCTL_ALL_21064(aboxctl) ((aboxctl).all)
  339. #define ABOXCTL_WBDIS_21064(aboxctl) ((aboxctl).bits.wb_dis)
  340. #define ABOXCTL_MCHKEN_21064(aboxctl) ((aboxctl).bits.mchk_en)
  341. #define ABOXCTL_CRDEN_21064(aboxctl) ((aboxctl).bits.crd_en)
  342. #define ABOXCTL_ICSBUFEN_21064(aboxctl) ((aboxctl).bits.ic_sbuf_en)
  343. #define ABOXCTL_SPE1_21064(aboxctl) ((aboxctl).bits.spe_1)
  344. #define ABOXCTL_SPE2_21064(aboxctl) ((aboxctl).bits.spe_2)
  345. #define ABOXCTL_EMDEN_21064(aboxctl) ((aboxctl).bits.emd_en)
  346. #define ABOXCTL_DCENA_21064(aboxctl) ((aboxctl).bits.dc_ena)
  347. #define ABOXCTL_DCFHIT_21064(aboxctl) ((aboxctl).bits.dc_fhit)
  348. //
  349. // Memory Management Control and Status Register (MMCSR) format.
  350. //
  351. typedef union _MMCSR_21064{
  352. struct {
  353. ULONG Wr: 1;
  354. ULONG Acv: 1;
  355. ULONG For: 1;
  356. ULONG Fow: 1;
  357. ULONG Ra: 5;
  358. ULONG Opcode: 6;
  359. } bits;
  360. LARGE_INTEGER all;
  361. } MMCSR_21064, *PMMCSR_21064;
  362. #define MMCSR_ALL_21064(mmcsr) ((mmcsr).all)
  363. #define MMCSR_WR_21064(mmcsr) ((mmcsr).bits.Wr)
  364. #define MMCSR_ACV_21064(mmcsr) ((mmcsr).bits.Acv)
  365. #define MMCSR_FOR_21064(mmcsr) ((mmcsr).bits.For)
  366. #define MMCSR_FOW_21064(mmcsr) ((mmcsr).bits.Fow)
  367. #define MMCSR_RA_21064(mmcsr) ((mmcsr).bits.Ra)
  368. #define MMCSR_OPCODE_21064(mmcsr) ((mmcsr).bits.Opcode)
  369. //
  370. // Dcache Status (DC_STAT) format.
  371. //
  372. typedef union _DC_STAT_21064{
  373. struct {
  374. ULONG Reserved: 3;
  375. ULONG DcHit: 1;
  376. ULONG DCacheParityError: 1;
  377. ULONG ICacheParityError: 1;
  378. } bits;
  379. LARGE_INTEGER all;
  380. } DC_STAT_21064, *PDC_STAT_21064;
  381. #define DCSTAT_ALL_21064(dcstat) ((dcstat).all)
  382. #define DCSTAT_DCHIT_21064(dcstat) ((dcstat).bits.DcHit)
  383. #define DCSTAT_DCPARITY_ERROR_21064(dcstat) ((dcstat).bits.DCacheParityError)
  384. #define DCSTAT_ICPARITY_ERROR_21064(dcstat) ((dcstat).bits.ICacheParityError)
  385. #endif //!CORE_21064
  386. //
  387. // Bus Interface Unit Status (BIU_STAT) format.
  388. //
  389. typedef union _BIU_STAT_21064{
  390. struct {
  391. ULONG BiuHerr: 1;
  392. ULONG BiuSerr: 1;
  393. ULONG BcTperr: 1;
  394. ULONG BcTcperr: 1;
  395. ULONG BiuCmd: 3;
  396. ULONG Fatal1: 1;
  397. ULONG FillEcc: 1;
  398. ULONG Reserved: 1;
  399. ULONG FillDperr: 1;
  400. ULONG FillIrd: 1;
  401. ULONG FillQw: 2;
  402. ULONG Fatal2: 1;
  403. } bits;
  404. LARGE_INTEGER all;
  405. } BIU_STAT_21064, *PBIU_STAT_21064;
  406. #define BIUSTAT_ALL_21064(biustat) ((biustat).all)
  407. #define BIUSTAT_HERR_21064(biustat) ((biustat).bits.BiuHerr)
  408. #define BIUSTAT_SERR_21064(biustat) ((biustat).bits.BiuSerr)
  409. #define BIUSTAT_TPERR_21064(biustat) ((biustat).bits.BcTperr)
  410. #define BIUSTAT_TCPERR_21064(biustat) ((biustat).bits.BcTcperr)
  411. #define BIUSTAT_CMD_21064(biustat) ((biustat).bits.BiuCmd)
  412. #define BIUSTAT_FATAL1_21064(biustat) ((biustat).bits.Fatal1)
  413. #define BIUSTAT_FILLECC_21064(biustat) ((biustat).bits.FillEcc)
  414. #define BIUSTAT_FILLDPERR_21064(biustat) ((biustat).bits.FillDperr)
  415. #define BIUSTAT_FILLIRD_21064(biustat) ((biustat).bits.FillIrd)
  416. #define BIUSTAT_FILLQW_21064(biustat) ((biustat).bits.FillQw)
  417. #define BIUSTAT_FATAL2_21064(biustat) ((biustat).bits.Fatal2)
  418. //
  419. // Fill Syndrome (FILL_SYNDROME) format.
  420. //
  421. typedef union _FILL_SYNDROME_21064{
  422. struct {
  423. ULONG Lo: 7;
  424. ULONG Hi: 7;
  425. } bits;
  426. LARGE_INTEGER all;
  427. } FILL_SYNDROME_21064, *PFILL_SYNDROME_21064;
  428. #define FILLSYNDROME_ALL_21064(fs) ((fs).all)
  429. #define FILLSYNDROME_LO_21064(fs) ((fs).bits.Lo)
  430. #define FILLSYNDROME_HI_21064(fs) ((fs).bits.Hi)
  431. //
  432. // Backup Cache Tag (BC_TAG) format.
  433. //
  434. typedef union _BC_TAG_21064{
  435. struct {
  436. ULONG Hit: 1;
  437. ULONG TagctlP: 1;
  438. ULONG TagctlD: 1;
  439. ULONG TagctlS: 1;
  440. ULONG TagctlV: 1;
  441. ULONG Tag: 17;
  442. ULONG TagP: 1;
  443. } bits;
  444. LARGE_INTEGER all;
  445. } BC_TAG_21064, *PBC_TAG_21064;
  446. #define BCTAG_ALL_21064(bctag) ((bctag).all)
  447. #define BCTAG_HIT_21064(bctag) ((bctag).bits.Hit)
  448. #define BCTAG_TAGCTLP_21064(bctag) ((bctag).bits.TagctlP)
  449. #define BCTAG_TAGCTLD_21064(bctag) ((bctag).bits.TagctlD)
  450. #define BCTAG_TAGCTLS_21064(bctag) ((bctag).bits.TagctlS)
  451. #define BCTAG_TAGCTLV_21064(bctag) ((bctag).bits.TagctlV)
  452. #define BCTAG_TAG_21064(bctag) ((bctag).bits.Tag)
  453. #define BCTAG_TAGP_21064(bctag) ((bctag).bits.TagP)
  454. //
  455. // Bus Interface Unit Control Register (BIU_CTL) format.
  456. //
  457. typedef LARGE_INTEGER BIU_CTL_21064;
  458. typedef BIU_CTL_21064 *PBIU_CTL_21064;
  459. #define BIUCTL_BCENA_21064_SHIFT 0
  460. #define BIUCTL_ECC_21064_SHIFT 1
  461. #define BIUCTL_OE_21064_SHIFT 2
  462. #define BIUCTL_BCFHIT_21064_SHIFT 3
  463. #define BIUCTL_BCRDSPD_21064_SHIFT 4
  464. #define BIUCTL_BCRDSPD_21064_SHIFTMASK 0xF
  465. #define BIUCTL_BCWRSPD_21064_SHIFT 8
  466. #define BIUCTL_BCWRSPD_21064_SHIFTMASK 0xF
  467. #define BIUCTL_BCWECTL_21064_SHIFT 12
  468. #define BIUCTL_BCWECTL_21064_SHIFTMASK 0xFFFF
  469. #define BIUCTL_BCSIZE_21064_SHIFT 28
  470. #define BIUCTL_BCSIZE_21064_SHIFTMASK 0x7
  471. #define BIUCTL_BADTCP_21064_SHIFT 31
  472. #define BIUCTL_BCPADIS_21064_SHIFT 32
  473. #define BIUCTL_BCPADIS_21064_SHIFTMASK 0xF
  474. #define BIUCTL_BADDP_21064_SHIFT 36
  475. #define BIUCTL_ALL_21064(biuctl) (biuctl)
  476. #define BIUCTL_BCENA_21064(biuctl) ( (biuctl.LowPart >> BIUCTL_BCENA_21064_SHIFT) & 1)
  477. #define BIUCTL_ECC_21064(biuctl) ( (biuctl.LowPart >> BIUCTL_ECC_21064_SHIFT) & 1)
  478. #define BIUCTL_OE_21064(biuctl) ( (biuctl.LowPart >> BIUCTL_OE_21064_SHIFT) & 1)
  479. #define BIUCTL_BCFHIT_21064(biuctl) ( (biuctl.LowPart >> BIUCTL_BCFHIT_21064_SHIFT) & 1)
  480. #define BIUCTL_BCRDSPD_21064(biuctl) \
  481. ( (biuctl.LowPart >> BIUCTL_BCRDSPD_21064_SHIFT) & BIUCTL_BCRDSPD_21064_SHIFTMASK)
  482. #define BIUCTL_BCWRSPD_21064(biuctl) \
  483. ( (biuctl.LowPart >> BIUCTL_BCWRSPD_21064_SHIFT) & BIUCTL_BCWRSPD_21064_SHIFTMASK)
  484. #define BIUCTL_BCWECTL_21064(biuctl) \
  485. ( (biuctl.LowPart >> BIUCTL_BCWECTL_21064_SHIFT) & BIUCTL_BCWECTL_21064_SHIFTMASK)
  486. #define BIUCTL_BCSIZE_21064(biuctl) \
  487. ( (biuctl.LowPart >> BIUCTL_BCSIZE_21064_SHIFT) & BIUCTL_BCSIZE_21064_SHIFTMASK)
  488. #define BIUCTL_BADTCP_21064(biuctl) \
  489. ( (biuctl.LowPart >> BIUCTL_BADTCP_21064_SHIFT) & 1)
  490. #define BIUCTL_BCPADIS_21064(biuctl) \
  491. ( (biuctl.LowPart >> BIUCTL_BCPADIS_21064_SHIFT) & BIUCTL_BCPADIS_21064_SHIFTMASK)
  492. #define BIUCTL_BADDP_21064(biuctl) \
  493. ( (biuctl.LowPart >> BIUCTL_BADDP_21064_SHIFT) & 1)
  494. //
  495. // Internal Processor State record.
  496. // This is the structure of the data returned by the rdstate call pal.
  497. //
  498. typedef struct _PROCESSOR_STATE_21064{
  499. ITB_PTE_21064 ItbPte[ ITB_ENTRIES_21064 ];
  500. ICCSR_21064 Iccsr;
  501. PS_21064 Ps;
  502. EXC_SUM_21064 ExcSum;
  503. LARGE_INTEGER PalBase;
  504. IRR_21064 Hirr;
  505. IRR_21064 Sirr;
  506. IRR_21064 Astrr;
  507. IER_21064 Hier;
  508. IER_21064 Sier;
  509. IER_21064 Aster;
  510. ABOX_CTL_21064 AboxCtl;
  511. DTB_PTE_21064 DtbPte[ DTB_ENTRIES_21064 ];
  512. MMCSR_21064 MmCsr;
  513. LARGE_INTEGER Va;
  514. LARGE_INTEGER PalTemp[ PAL_TEMPS_21064 ];
  515. BIU_CTL_21064 BiuCtl;
  516. DC_STAT_21064 DcStat;
  517. BIU_STAT_21064 BiuStat;
  518. LARGE_INTEGER BiuAddr;
  519. LARGE_INTEGER FillAddr;
  520. FILL_SYNDROME_21064 FillSyndrome;
  521. } PROCESSOR_STATE_21064, *PPROCESSOR_STATE_21064;
  522. //
  523. // Machine-check logout frame.
  524. //
  525. typedef struct _LOGOUT_FRAME_21064{
  526. BIU_STAT_21064 BiuStat;
  527. LARGE_INTEGER BiuAddr;
  528. BC_TAG_21064 BcTag;
  529. LARGE_INTEGER ExcAddr;
  530. LARGE_INTEGER FillAddr;
  531. FILL_SYNDROME_21064 FillSyndrome;
  532. DC_STAT_21064 DcStat;
  533. ICCSR_21064 Iccsr;
  534. PS_21064 Ps;
  535. EXC_SUM_21064 ExcSum;
  536. LARGE_INTEGER PalBase;
  537. IRR_21064 Hirr;
  538. IER_21064 Hier;
  539. ABOX_CTL_21064 AboxCtl;
  540. BIU_CTL_21064 BiuCtl;
  541. MMCSR_21064 MmCsr;
  542. LARGE_INTEGER Va;
  543. LARGE_INTEGER PalTemp[ PAL_TEMPS_21064 ];
  544. } LOGOUT_FRAME_21064, *PLOGOUT_FRAME_21064;
  545. //
  546. // Correctable Machine-check logout frame.
  547. //
  548. typedef struct _CORRECTABLE_FRAME_21064{
  549. BIU_STAT_21064 BiuStat;
  550. LARGE_INTEGER BiuAddr;
  551. BC_TAG_21064 BcTag;
  552. LARGE_INTEGER FillAddr;
  553. FILL_SYNDROME_21064 FillSyndrome;
  554. DC_STAT_21064 DcStat;
  555. } CORRECTABLE_FRAME_21064;
  556. //
  557. // Define the physical and virtual address bits
  558. //
  559. #define EV4_PHYSICAL_ADDRESS_BITS 34
  560. #define EV4_VIRTUAL_ADDRESS_BITS 43
  561. #endif //!_AXP21064_