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.

754 lines
21 KiB

  1. /*++ BUILD Version: 0000 Increment this if a change has global effects
  2. Copyright (c) 1993 Digital Euipment Corporation
  3. Module Name:
  4. axp21066.h
  5. Abstract:
  6. This module defines the DECchip 21066-specific structures that are
  7. defined in the PAL but must be visible to the HAL.
  8. Revision History:
  9. --*/
  10. #ifndef _AXP21066_
  11. #define _AXP21066_
  12. #ifndef CORE_21064
  13. #define CORE_21064
  14. //
  15. // Define the "special" processor bus used by all machines that run a
  16. // DECchip 21064. The processor bus is used to access the internal
  17. // performance counters.
  18. //
  19. #define PROCESSOR_BUS_21064 21064
  20. //
  21. // Define the number of entries for repeated internal processor registers.
  22. //
  23. #define ITB_ENTRIES_21064 12
  24. #define DTB_ENTRIES_21064 32
  25. #define PAL_TEMPS_21064 32
  26. //
  27. // Define an interrupt enable table entry.
  28. //
  29. typedef struct _IETEntry_21064{
  30. ULONG ApcEnable: 1;
  31. ULONG DispatchEnable: 1;
  32. ULONG PerformanceCounter0Enable: 1;
  33. ULONG PerformanceCounter1Enable: 1;
  34. ULONG CorrectableReadEnable: 1;
  35. ULONG Irq0Enable: 1;
  36. ULONG Irq1Enable: 1;
  37. ULONG Irq2Enable: 1;
  38. ULONG Irq3Enable: 1;
  39. ULONG Irq4Enable: 1;
  40. ULONG Irq5Enable: 1;
  41. ULONG Reserved: 21;
  42. } IETEntry_21064, *PIETEntry_21064;
  43. //
  44. // Define the offsets and sizes of the mask sub-tables within the interrupt
  45. // mask table in the PCR.
  46. //
  47. #define IRQLMASK_HDW_SUBTABLE_21064 (8)
  48. #define IRQLMASK_HDW_SUBTABLE_21064_ENTRIES (64)
  49. #define IRQLMASK_SFW_SUBTABLE_21064 (0)
  50. #define IRQLMASK_SFW_SUBTABLE_21064_ENTRIES (4)
  51. #define IRQLMASK_PC_SUBTABLE_21064 (4)
  52. #define IRQLMASK_PC_SUBTABLE_21064_ENTRIES (4)
  53. //
  54. // PALcode Event Counters for the 21064
  55. // This is the structure of the data returned by the rdcounters call pal.
  56. //
  57. typedef struct _COUNTERS_21064{
  58. LARGE_INTEGER MachineCheckCount;
  59. LARGE_INTEGER ArithmeticExceptionCount;
  60. LARGE_INTEGER InterruptCount;
  61. LARGE_INTEGER ItbMissCount;
  62. LARGE_INTEGER NativeDtbMissCount;
  63. LARGE_INTEGER PalDtbMissCount;
  64. LARGE_INTEGER ItbAcvCount;
  65. LARGE_INTEGER DtbAcvCount;
  66. LARGE_INTEGER UnalignedCount;
  67. LARGE_INTEGER OpcdecCount;
  68. LARGE_INTEGER FenCount;
  69. LARGE_INTEGER ItbTnvCount;
  70. LARGE_INTEGER DtbTnvCount;
  71. LARGE_INTEGER PteMissCount;
  72. LARGE_INTEGER KspMissCount;
  73. LARGE_INTEGER PdeTnvCount;
  74. LARGE_INTEGER HaltCount;
  75. LARGE_INTEGER RestartCount;
  76. LARGE_INTEGER DrainaCount;
  77. LARGE_INTEGER InitpalCount;
  78. LARGE_INTEGER WrentryCount;
  79. LARGE_INTEGER SwpirqlCount;
  80. LARGE_INTEGER RdirqlCount;
  81. LARGE_INTEGER DiCount;
  82. LARGE_INTEGER EiCount;
  83. LARGE_INTEGER SwppalCount;
  84. LARGE_INTEGER SsirCount;
  85. LARGE_INTEGER CsirCount;
  86. LARGE_INTEGER RfeCount;
  87. LARGE_INTEGER RetsysCount;
  88. LARGE_INTEGER SwpctxCount;
  89. LARGE_INTEGER SwpprocessCount;
  90. LARGE_INTEGER RdmcesCount;
  91. LARGE_INTEGER WrmcesCount;
  92. LARGE_INTEGER TbiaCount;
  93. LARGE_INTEGER TbisCount;
  94. LARGE_INTEGER DtbisCount;
  95. LARGE_INTEGER RdkspCount;
  96. LARGE_INTEGER SwpkspCount;
  97. LARGE_INTEGER RdpsrCount;
  98. LARGE_INTEGER RdpcrCount;
  99. LARGE_INTEGER RdthreadCount;
  100. LARGE_INTEGER RdcountersCount;
  101. LARGE_INTEGER RdstateCount;
  102. LARGE_INTEGER WrperfmonCount;
  103. LARGE_INTEGER InitpcrCount;
  104. LARGE_INTEGER BptCount;
  105. LARGE_INTEGER CallsysCount;
  106. LARGE_INTEGER ImbCount;
  107. LARGE_INTEGER GentrapCount;
  108. LARGE_INTEGER RdtebCount;
  109. LARGE_INTEGER KbptCount;
  110. LARGE_INTEGER CallkdCount;
  111. LARGE_INTEGER TbisasnCount;
  112. LARGE_INTEGER Misc1Count;
  113. LARGE_INTEGER Misc2Count;
  114. LARGE_INTEGER Misc3Count;
  115. } COUNTERS_21064, *PCOUNTERS_21064;
  116. typedef enum _AXP21064_PCCOUNTER{
  117. Ev4PerformanceCounter0 = 0,
  118. Ev4PerformanceCounter1 = 1
  119. } AXP21064_PCCOUNTER, *PAXP21064_PCCOUNTER;
  120. typedef enum _AXP21064_PCMUXCONTROL{
  121. Ev4TotalIssues = 0x0,
  122. Ev4PipelineDry = 0x2,
  123. Ev4LoadInstruction = 0x4,
  124. Ev4PipelineFrozen = 0x6,
  125. Ev4BranchInstructions = 0x8,
  126. Ev4PalMode = 0xb,
  127. Ev4TotalCycles = 0xa,
  128. Ev4TotalNonIssues = 0xc,
  129. Ev4ExternalCounter0 = 0xe,
  130. Ev4DcacheMiss = 0x0,
  131. Ev4IcacheMiss = 0x1,
  132. Ev4DualIssues = 0x2,
  133. Ev4BranchMispredicts = 0x3,
  134. Ev4FPInstructions = 0x4,
  135. Ev4IntegerOperate = 0x5,
  136. Ev4StoreInstructions = 0x6,
  137. Ev4ExternalCounter1 = 0x7
  138. } AXP21064_PCMUXCONTROL, *PAXP21064_PCMUXCONTROL;
  139. typedef enum _AXP21064_PCEVENTCOUNT{
  140. Ev4CountEvents2xx8 = 0x100,
  141. Ev4CountEvents2xx12 = 0x1000,
  142. Ev4CountEvents2xx16 = 0x10000
  143. } AXP21064_PCEVENTCOUNT, *PAXP21064_PCEVENTCOUNT;
  144. typedef enum _AXP21064_EVENTCOUNT{
  145. Ev4EventCountHigh = 1,
  146. Ev4EventCountLow = 0
  147. } AXP21064_EVENTCOUNT, *PAXP21064_EVENTCOUNT;
  148. //
  149. // Internal Processor Register definitions (read format).
  150. //
  151. //
  152. // Pte formats
  153. //
  154. typedef LARGE_INTEGER ITB_PTE_21064;
  155. typedef ITB_PTE_21064 *PITB_PTE_21064;
  156. typedef LARGE_INTEGER DTB_PTE_21064;
  157. typedef DTB_PTE_21064 *PDTB_PTE_21064;
  158. #define PTE_FOR_21064_SHIFT 3
  159. #define PTE_FOW_21064_SHIFT 4
  160. #define PTE_KWE_21064_SHIFT 5
  161. #define PTE_EWE_21064_SHIFT 6
  162. #define PTE_SWE_21064_SHIFT 7
  163. #define PTE_UWE_21064_SHIFT 8
  164. #define PTE_KRE_21064_SHIFT 9
  165. #define PTE_ERE_21064_SHIFT 10
  166. #define PTE_SRE_21064_SHIFT 11
  167. #define PTE_URE_21064_SHIFT 12
  168. #define PTE_PFN_21064_SHIFT 13
  169. #define PTE_PFN_21064_SHIFTMASK 0x1FFFF
  170. #define PTE_ASM_21064_SHIFT 34
  171. #define PTE_ALL_21064(itbpte) (itbpte)
  172. #define PTE_FOR_21064(itbpte) ( (itbpte.LowPart >> PTE_FOR_21064_SHIFT) & 1)
  173. #define PTE_FOW_21064(itbpte) ( (itbpte.LowPart >> PTE_FOW_21064_SHIFT) & 1)
  174. #define PTE_KWE_21064(itbpte) ( (itbpte.LowPart >> PTE_KWE_21064_SHIFT) & 1)
  175. #define PTE_EWE_21064(itbpte) ( (itbpte.LowPart >> PTE_EWE_21064_SHIFT) & 1)
  176. #define PTE_SWE_21064(itbpte) ( (itbpte.LowPart >> PTE_SWE_21064_SHIFT) & 1)
  177. #define PTE_UWE_21064(itbpte) ( (itbpte.LowPart >> PTE_UWE_21064_SHIFT) & 1)
  178. #define PTE_KRE_21064(itbpte) ( (itbpte.LowPart >> PTE_KRE_21064_SHIFT) & 1)
  179. #define PTE_ERE_21064(itbpte) ( (itbpte.LowPart >> PTE_ERE_21064_SHIFT) & 1)
  180. #define PTE_SRE_21064(itbpte) ( (itbpte.LowPart >> PTE_SRE_21064_SHIFT) & 1)
  181. #define PTE_URE_21064(itbpte) ( (itbpte.LowPart >> PTE_URE_21064_SHIFT) & 1)
  182. #define PTE_ASM_21064(itbpte) ( (itbpte.LowPart >> PTE_ASM_21064_SHIFT) & 1)
  183. #define PTE_PFN_21064(itbpte) ( (itbpte.LowPart >> PTE_PFN_21064_SHIFT) & PTE_PFN_21064_SHIFTMASK)
  184. //
  185. // Instruction Cache Control and Status Register format
  186. //
  187. typedef LARGE_INTEGER ICCSR_21064;
  188. typedef ICCSR_21064 *PICCSR_21064;
  189. #define ICCSR_PC0_21064_SHIFT 1
  190. #define ICCSR_PC1_21064_SHIFT 2
  191. #define ICCSR_PCMUX0_21064_SHIFT 9
  192. #define ICCSR_PCMUX0_21064_SHIFTMASK 0xF
  193. #define ICCSR_PCMUX1_21064_SHIFT 13
  194. #define ICCSR_PCMUX1_21064_SHIFTMASK 0x7
  195. #define ICCSR_PIPE_21064_SHIFT 16
  196. #define ICCSR_BPE_21064_SHIFT 17
  197. #define ICCSR_JSE_21064_SHIFT 18
  198. #define ICCSR_BHE_21064_SHIFT 19
  199. #define ICCSR_DI_21064_SHIFT 20
  200. #define ICCSR_HWE_21064_SHIFT 21
  201. #define ICCSR_MAP_21064_SHIFT 22
  202. #define ICCSR_FPE_21064_SHIFT 23
  203. #define ICCSR_ASN_21064_SHIFT 28
  204. #define ICCSR_ASN_21064_SHIFTMASK 0x3F
  205. #define ICCSR_ALL_21064(iccsr) (iccsr)
  206. #define ICCSR_PC0_21064(iccsr) ( (iccsr.LowPart >> ICCSR_PC0_21064_SHIFT) & 1)
  207. #define ICCSR_PC1_21064(iccsr) ( (iccsr.LowPart >> ICCSR_PC1_21064_SHIFT) & 1)
  208. #define ICCSR_PCMUX0_21064(iccsr) \
  209. ( (iccsr.LowPart >> ICCSR_PCMUX0_21064_SHIFT) & ICCSR_PCMUX0_21064_SHIFTMASK)
  210. #define ICCSR_PCMUX1_21064(iccsr) \
  211. ( (iccsr.LowPart >> ICCSR_PCMUX1_21064_SHIFT) & ICCSR_PCMUX1_21064_SHIFTMASK)
  212. #define ICCSR_PIPE_21064(iccsr) ( (iccsr.LowPart >> ICCSR_PIPE_21064_SHIFT) & 1)
  213. #define ICCSR_BPE_21064(iccsr) ( (iccsr.LowPart >> ICCSR_BPE_21064_SHIFT) & 1)
  214. #define ICCSR_JSE_21064(iccsr) ( (iccsr.LowPart >> ICCSR_JSE_21064_SHIFT) & 1)
  215. #define ICCSR_BHE_21064(iccsr) ( (iccsr.LowPart >> ICCSR_BHE_21064_SHIFT) & 1)
  216. #define ICCSR_DI_21064(iccsr) ( (iccsr.LowPart >> ICCSR_DI_21064_SHIFT) & 1)
  217. #define ICCSR_HWE_21064(iccsr) ( (iccsr.LowPart >> ICCSR_HWE_21064_SHIFT) & 1)
  218. #define ICCSR_MAP_21064(iccsr) ( (iccsr.LowPart >> ICCSR_MAP_21064_SHIFT) & 1)
  219. #define ICCSR_FPE_21064(iccsr) ( (iccsr.LowPart >> ICCSR_FPE_21064_SHIFT) & 1)
  220. #define ICCSR_ASN_21064(iccsr) \
  221. (ULONG)( (iccsr.LowPart >> ICCSR_ASN_21064_SHIFT) & ICCSR_ASN_21064_SHIFTMASK)
  222. //
  223. // Processor Status (PS) format.
  224. //
  225. typedef LARGE_INTEGER PS_21064;
  226. typedef PS_21064 *PPS_21064;
  227. #define PS_CM0_21064_SHIFT 1
  228. #define PS_CM1_21064_SHIFT 34
  229. #define PS_ALL_21064(ps) (ps)
  230. #define PS_CM_21064(ps) \
  231. ( (((ps).LowPart >> PS_CM0_21064_SHIFT) & 1) || \
  232. (((ps).LowPart >> (PS_CM1_21064_SHIFT-1)) & 1) )
  233. //
  234. // Exception Summary (EXC_SUM) format.
  235. //
  236. typedef LARGE_INTEGER EXC_SUM_21064;
  237. typedef EXC_SUM_21064 *PEXC_SUM_21064;
  238. #define EXCSUM_SWC_21064_SHIFT 2
  239. #define EXCSUM_INV_21064_SHIFT 3
  240. #define EXCSUM_DZE_21064_SHIFT 4
  241. #define EXCSUM_FOV_21064_SHIFT 5
  242. #define EXCSUM_UNF_21064_SHIFT 6
  243. #define EXCSUM_INE_21064_SHIFT 7
  244. #define EXCSUM_IOV_21064_SHIFT 8
  245. #define EXCSUM_MSK_21064_SHIFT 33
  246. #define EXCSUM_ALL_21064(excsum) (excsum)
  247. #define EXCSUM_SWC_21064(excsum) ((excsum.LowPart >> EXCSUM_SWC_21064_SHIFT) & 0x1)
  248. #define EXCSUM_INV_21064(excsum) ( (excsum.LowPart >> EXCSUM_INV_21064_SHIFT) & 0x1)
  249. #define EXCSUM_DZE_21064(excsum) ( (excsum.LowPart >> EXCSUM_DZE_21064_SHIFT) & 0x1)
  250. #define EXCSUM_FOV_21064(excsum) ( (excsum.LowPart >> EXCSUM_FOV_21064_SHIFT) & 0x1)
  251. #define EXCSUM_UNF_21064(excsum) ( (excsum.LowPart >> EXCSUM_UNF_21064_SHIFT) & 0x1)
  252. #define EXCSUM_INE_21064(excsum) ( (excsum.LowPart >> EXCSUM_INE_21064_SHIFT) & 0x1)
  253. #define EXCSUM_IOV_21064(excsum) ( (excsum.LowPart >> EXCSUM_IOV_21064_SHIFT) & 0x1)
  254. #define EXCSUM_MSK_21064(excsum) ( (excsum.LowPart >> EXCSUM_MSK_21064_SHIFT) & 0x1)
  255. //
  256. // Interrupt Request (HIRR, SIRR, ASTRR) format.
  257. //
  258. typedef LARGE_INTEGER IRR_21064;
  259. typedef IRR_21064 *PIRR_21064;
  260. #define IRR_HWR_21064_SHIFT 1
  261. #define IRR_SWR_21064_SHIFT 2
  262. #define IRR_ATR_21064_SHIFT 3
  263. #define IRR_CRR_21064_SHIFT 4
  264. #define IRR_HIRR53_21064_SHIFT 5
  265. #define IRR_HIRR53_21064_SHIFTMASK 0x7
  266. #define IRR_PC1_21064_SHIFT 8
  267. #define IRR_PC0_21064_SHIFT 9
  268. #define IRR_HIRR20_21064_SHIFT 10
  269. #define IRR_HIRR20_21064_SHIFTMASK 0x7
  270. #define IRR_SLR_21064_SHIFT 13
  271. #define IRR_SIRR_21064_SHIFT 14
  272. #define IRR_SIRR_21064_SHIFTMASK 0x7FFF
  273. #define IRR_ASTRR_21064_SHIFT 29
  274. #define IRR_ASTRR_21064_SHIFTMASK 0xF
  275. #define IRR_ALL_21064(irr) (irr)
  276. #define IRR_HWR_21064(irr) ( (irr.LowPart >> IRR_HWR_21064_SHIFT) & 0x1)
  277. #define IRR_SWR_21064(irr) ( (irr.LowPart >> IRR_SWR_21064_SHIFT) & 0x1)
  278. #define IRR_ATR_21064(irr) ( (irr.LowPart >> IRR_ATR_21064_SHIFT) & 0x1)
  279. #define IRR_CRR_21064(irr) ( (irr.LowPart >> IRR_CRR_21064_SHIFT) & 0x1)
  280. #define IRR_HIRR_21064(irr) \
  281. ( ((irr.LowPart >> (IRR_HIRR53_21064_SHIFT-3)) & IRR_HIRR53_21064_SHIFTMASK) || \
  282. ( (irr.LowPart >> IRR_HIRR20_21064_SHIFT) & IRR_HIRR20_21064_SHIFTMASK) )
  283. #define IRR_PC1_21064(irr) ( (irr.LowPart >> IRR_PC1_21064_SHIFT) & 0x1)
  284. #define IRR_PC0_21064(irr) ( (irr.LowPart >> IRR_PC0_21064_SHIFT) & 0x1)
  285. #define IRR_SLR_21064(irr) ( (irr.LowPart >> IRR_SLR_21064_SHIFT) & 0x1)
  286. #define IRR_SIRR_21064(irr) \
  287. ( (irr.LowPart >> IRR_SIRR_21064_SHIFT) & IRR_SIRR_21064_SHIFTMASK)
  288. #define IRR_ASTRR_21064(irr) \
  289. ( (irr.LowPart >> IRR_ASTRR_21064_SHIFT) & IRR_ASTRR_21064_SHIFTMASK)
  290. //
  291. // Interrupt Enable (HIER, SIER, ASTER) format.
  292. //
  293. typedef LARGE_INTEGER IER_21064;
  294. typedef IER_21064 *PIER_21064;
  295. #define IER_CRR_21064_SHIFT 4
  296. #define IER_HIER53_21064_SHIFT 5
  297. #define IER_HIER53_21064_SHIFTMASK 0x7
  298. #define IER_PC1_21064_SHIFT 8
  299. #define IER_PC0_21064_SHIFT 9
  300. #define IER_HIER20_21064_SHIFT 10
  301. #define IER_HIER20_21064_SHIFTMASK 0x7
  302. #define IER_SLR_21064_SHIFT 13
  303. #define IER_SIER_21064_SHIFT 14
  304. #define IER_SIER_21064_SHIFTMASK 0x7FFF
  305. #define IER_ASTER_21064_SHIFT 29
  306. #define IER_ASTER_21064_SHIFTMASK 0xF
  307. #define IER_ALL_21064(ier) (ier)
  308. #define IER_CRR_21064(ier) ( (ier.LowPart >> IER_CRR_21064_SHIFT) & 0x1)
  309. #define IER_HIER_21064(ier) \
  310. ( ( (ier.LowPart >> (IER_HIER53_21064_SHIFT-3)) & IER_HIER53_21064_SHIFTMASK) || \
  311. ( (ier.LowPart >> IER_HIER20_21064_SHIFT) & IER_HIER20_21064_SHIFTMASK) )
  312. #define IER_PC1_21064(ier) ( (ier.LowPart >> IER_PC1_21064_SHIFT) & 0x1)
  313. #define IER_PC0_21064(ier) ( (ier.LowPart >> IER_PC0_21064_SHIFT) & 0x1)
  314. #define IER_SLR_21064(ier) ( (ier.LowPart >> IER_SLR_21064_SHIFT) & 0x1)
  315. #define IER_SIER_21064(ier) \
  316. ( (ier.LowPart >> IER_SIER_21064_SHIFT) & IER_SIER_21064_SHIFTMASK)
  317. #define IER_ASTER_21064(ier) \
  318. ( (ier.LowPart >> IER_ASTER_21064_SHIFT) & IER_ASTER_21064_SHIFTMASK)
  319. //
  320. // Abox Control Register (ABOX_CTL) format.
  321. //
  322. typedef union _ABOX_CTL_21064{
  323. struct {
  324. ULONG wb_dis: 1;
  325. ULONG mchk_en: 1;
  326. ULONG crd_en: 1;
  327. ULONG ic_sbuf_en: 1;
  328. ULONG spe_1: 1;
  329. ULONG spe_2: 1;
  330. ULONG emd_en: 1;
  331. ULONG mbz1: 3;
  332. ULONG dc_ena: 1;
  333. ULONG dc_fhit: 1;
  334. } bits;
  335. LARGE_INTEGER all;
  336. } ABOX_CTL_21064, *PABOX_CTL_21064;
  337. #define ABOXCTL_ALL_21064(aboxctl) ((aboxctl).all)
  338. #define ABOXCTL_WBDIS_21064(aboxctl) ((aboxctl).bits.wb_dis)
  339. #define ABOXCTL_MCHKEN_21064(aboxctl) ((aboxctl).bits.mchk_en)
  340. #define ABOXCTL_CRDEN_21064(aboxctl) ((aboxctl).bits.crd_en)
  341. #define ABOXCTL_ICSBUFEN_21064(aboxctl) ((aboxctl).bits.ic_sbuf_en)
  342. #define ABOXCTL_SPE1_21064(aboxctl) ((aboxctl).bits.spe_1)
  343. #define ABOXCTL_SPE2_21064(aboxctl) ((aboxctl).bits.spe_2)
  344. #define ABOXCTL_EMDEN_21064(aboxctl) ((aboxctl).bits.emd_en)
  345. #define ABOXCTL_DCENA_21064(aboxctl) ((aboxctl).bits.dc_ena)
  346. #define ABOXCTL_DCFHIT_21064(aboxctl) ((aboxctl).bits.dc_fhit)
  347. //
  348. // Memory Management Control and Status Register (MMCSR) format.
  349. //
  350. typedef union _MMCSR_21064{
  351. struct {
  352. ULONG Wr: 1;
  353. ULONG Acv: 1;
  354. ULONG For: 1;
  355. ULONG Fow: 1;
  356. ULONG Ra: 5;
  357. ULONG Opcode: 6;
  358. } bits;
  359. LARGE_INTEGER all;
  360. } MMCSR_21064, *PMMCSR_21064;
  361. #define MMCSR_ALL_21064(mmcsr) ((mmcsr).all)
  362. #define MMCSR_WR_21064(mmcsr) ((mmcsr).bits.Wr)
  363. #define MMCSR_ACV_21064(mmcsr) ((mmcsr).bits.Acv)
  364. #define MMCSR_FOR_21064(mmcsr) ((mmcsr).bits.For)
  365. #define MMCSR_FOW_21064(mmcsr) ((mmcsr).bits.Fow)
  366. #define MMCSR_RA_21064(mmcsr) ((mmcsr).bits.Ra)
  367. #define MMCSR_OPCODE_21064(mmcsr) ((mmcsr).bits.Opcode)
  368. //
  369. // Dcache Status (DC_STAT) format.
  370. //
  371. typedef union _DC_STAT_21064{
  372. struct {
  373. ULONG Reserved: 3;
  374. ULONG DcHit: 1;
  375. ULONG DCacheParityError: 1;
  376. ULONG ICacheParityError: 1;
  377. } bits;
  378. LARGE_INTEGER all;
  379. } DC_STAT_21064, *PDC_STAT_21064;
  380. #define DCSTAT_ALL_21064(dcstat) ((dcstat).all)
  381. #define DCSTAT_DCHIT_21064(dcstat) ((dcstat).bits.DcHit)
  382. #define DCSTAT_DCPARITY_ERROR_21064(dcstat) ((dcstat).bits.DCacheParityError)
  383. #define DCSTAT_ICPARITY_ERROR_21064(dcstat) ((dcstat).bits.ICacheParityError)
  384. #endif //!CORE_21064
  385. //end_axp21064
  386. //
  387. // Define the number of banks in the memory controller.
  388. //
  389. #define MEMORY_BANKS_21066 (4)
  390. //
  391. // Define the base physical addresses for the integrated
  392. // memory and I/O controllers.
  393. //
  394. #define MEMORY_CONTROLLER_PHYSICAL_21066 (0x120000000)
  395. #define IO_CONTROLLER_PHYSICAL_21066 (0x180000000)
  396. //
  397. // Define the memory controller CSR structure.
  398. //
  399. typedef struct _MEMC_CSRS_21066{
  400. LARGE_INTEGER Bcr0;
  401. LARGE_INTEGER Bcr1;
  402. LARGE_INTEGER Bcr2;
  403. LARGE_INTEGER Bcr3;
  404. LARGE_INTEGER Bmr0;
  405. LARGE_INTEGER Bmr1;
  406. LARGE_INTEGER Bmr2;
  407. LARGE_INTEGER Bmr3;
  408. LARGE_INTEGER Btr0;
  409. LARGE_INTEGER Btr1;
  410. LARGE_INTEGER Btr2;
  411. LARGE_INTEGER Btr3;
  412. LARGE_INTEGER Gtr;
  413. LARGE_INTEGER Esr;
  414. LARGE_INTEGER Ear;
  415. LARGE_INTEGER Car;
  416. LARGE_INTEGER Vgr;
  417. LARGE_INTEGER Plm;
  418. LARGE_INTEGER For;
  419. } MEMC_CSRS_21066, *PMEMC_CSRS_21066;
  420. //
  421. // Define the i/o controller CSR structure.
  422. //
  423. typedef struct _IOC_CSRS_21066{
  424. LARGE_INTEGER Hae;
  425. LARGE_INTEGER Filler1[3];
  426. LARGE_INTEGER Cct;
  427. LARGE_INTEGER Filler2[3];
  428. LARGE_INTEGER IoStat0;
  429. LARGE_INTEGER Filler3[3];
  430. LARGE_INTEGER IoStat1;
  431. LARGE_INTEGER Filler4[3];
  432. LARGE_INTEGER Tbia;
  433. LARGE_INTEGER Filler5[3];
  434. LARGE_INTEGER Tben;
  435. LARGE_INTEGER Filler6[3];
  436. LARGE_INTEGER PciSoftReset;
  437. LARGE_INTEGER Filler7[3];
  438. LARGE_INTEGER PciParityDisable;
  439. LARGE_INTEGER Filler8[3];
  440. LARGE_INTEGER Wbase0;
  441. LARGE_INTEGER Filler9[3];
  442. LARGE_INTEGER Wbase1;
  443. LARGE_INTEGER Filler10[3];
  444. LARGE_INTEGER Wmask0;
  445. LARGE_INTEGER Filler11[3];
  446. LARGE_INTEGER Wmask1;
  447. LARGE_INTEGER Filler12[3];
  448. LARGE_INTEGER Tbase0;
  449. LARGE_INTEGER Filler13[3];
  450. LARGE_INTEGER Tbase1;
  451. LARGE_INTEGER Filler14[3];
  452. } IOC_CSRS_21066, *PIOC_CSRS_21066;
  453. //
  454. // Bank Configuration Registers (BCR0 - BCR3)
  455. //
  456. typedef union _BCR_21066{
  457. struct {
  458. ULONG Reserved1: 6;
  459. ULONG Ras: 4;
  460. ULONG Erm: 1;
  461. ULONG Wrm: 1;
  462. ULONG Bwe: 1;
  463. ULONG Sbe: 1;
  464. ULONG Bav: 1;
  465. ULONG Reserved2: 5;
  466. ULONG BankBase: 9;
  467. ULONG Reserved3: 3;
  468. } ;
  469. LARGE_INTEGER all;
  470. } BCR_21066, *PBCR_21066;
  471. //
  472. // Bank Address Mask Registers (BMR0 - BMR3)
  473. //
  474. typedef union _BMR_21066{
  475. struct {
  476. ULONG Reserved1: 20;
  477. ULONG BankAddressMask: 9;
  478. ULONG Reserved2: 3;
  479. } ;
  480. LARGE_INTEGER all;
  481. } BMR_21066, *PBMR_21066;
  482. //
  483. // Global Timing Register (GTR)
  484. //
  485. typedef union _GTR_21066{
  486. struct {
  487. ULONG Precharge: 5;
  488. ULONG MinimumRas: 5;
  489. ULONG MaximumRas: 8;
  490. ULONG RefreshEnable: 1;
  491. ULONG RefreshInterval: 8;
  492. ULONG RefreshDivideSelect: 1;
  493. ULONG Setup: 4;
  494. } ;
  495. LARGE_INTEGER all;
  496. } GTR_21066, *PGTR_21066;
  497. //
  498. // Error Status Register (ESR)
  499. //
  500. typedef union _ESR_21066{
  501. struct {
  502. ULONG Eav: 1;
  503. ULONG Cee: 1;
  504. ULONG Uee: 1;
  505. ULONG Wre: 1;
  506. ULONG Sor: 1;
  507. ULONG Reserved1: 2;
  508. ULONG Cte: 1;
  509. ULONG Reserved2: 1;
  510. ULONG Mse: 1;
  511. ULONG Mhe: 1;
  512. ULONG Ice: 1;
  513. ULONG Nxm: 1;
  514. ULONG Reserved3: 19;
  515. ULONG Ecc0: 1;
  516. ULONG Wec6: 1;
  517. ULONG Wec3: 1;
  518. ULONG Reserved4: 1;
  519. ULONG Ecc1: 1;
  520. ULONG Reserved5: 3;
  521. ULONG Wec7: 1;
  522. ULONG Ecc2: 1;
  523. ULONG Wec2: 1;
  524. ULONG Reserved6: 2;
  525. ULONG Ecc3: 1;
  526. ULONG Reserved7: 2;
  527. ULONG Wec4: 1;
  528. ULONG Wec1: 1;
  529. ULONG Ecc4: 1;
  530. ULONG Wec0: 1;
  531. ULONG Reserved8: 2;
  532. ULONG Ecc5: 1;
  533. ULONG Reserved9: 4;
  534. ULONG Ecc6: 1;
  535. ULONG Wec5: 1;
  536. ULONG Reserved10: 2;
  537. ULONG Ecc7: 1;
  538. } ;
  539. LARGE_INTEGER all;
  540. } ESR_21066, *PESR_21066;
  541. //
  542. // Error Address Register (EAR)
  543. //
  544. typedef union _EAR_21066{
  545. struct {
  546. ULONG PerfCntMux0: 3;
  547. ULONG ErrorAddress: 26;
  548. ULONG PerfCntMux1: 3;
  549. } ;
  550. LARGE_INTEGER all;
  551. } EAR_21066, *PEAR_21066;
  552. //
  553. // Cache Register (CAR)
  554. //
  555. typedef union _CAR_21066{
  556. struct {
  557. ULONG Bce: 1;
  558. ULONG Reserved1: 1;
  559. ULONG Etp: 1;
  560. ULONG Wwp: 1;
  561. ULONG Ece: 1;
  562. ULONG BCacheSize: 3;
  563. ULONG ReadCycles: 3;
  564. ULONG WriteCycles: 3;
  565. ULONG Whd: 1;
  566. ULONG Pwr: 1;
  567. ULONG Tag: 15;
  568. ULONG Hit: 1;
  569. } ;
  570. LARGE_INTEGER all;
  571. } CAR_21066, *PCAR_21066;
  572. //
  573. // IOC Status 0 Registers (IOC_STAT0)
  574. //
  575. typedef union _IOC_STAT0_21066{
  576. struct {
  577. ULONG Cmd: 4;
  578. ULONG Err: 1;
  579. ULONG Lost: 1;
  580. ULONG Thit: 1;
  581. ULONG Tref: 1;
  582. ULONG Code: 3;
  583. ULONG Reserved1: 2;
  584. ULONG PageNumber: 19;
  585. } ;
  586. LARGE_INTEGER all;
  587. } IOC_STAT0_21066, *PIOC_STAT0_21066;
  588. //
  589. // IOC Status 1 Register (IOC_STAT1)
  590. //
  591. typedef union _IOC_STAT1_21066{
  592. struct {
  593. ULONG Address: 32;
  594. } ;
  595. LARGE_INTEGER all;
  596. } IOC_STAT1_21066, *PIOC_STAT1_21066;
  597. //
  598. // Internal Processor State record.
  599. // This is the structure of the data returned by the rdstate call pal.
  600. //
  601. typedef struct _PROCESSOR_STATE_21066{
  602. ABOX_CTL_21064 AboxCtl;
  603. IER_21064 Aster;
  604. IRR_21064 Astrr;
  605. BCR_21066 BankConfig[ MEMORY_BANKS_21066 ];
  606. BMR_21066 BankMask[ MEMORY_BANKS_21066 ];
  607. DC_STAT_21064 DcStat;
  608. DTB_PTE_21064 DtbPte[ DTB_ENTRIES_21064 ];
  609. EXC_SUM_21064 ExcSum;
  610. IER_21064 Hier;
  611. IRR_21064 Hirr;
  612. ICCSR_21064 Iccsr;
  613. ITB_PTE_21064 ItbPte[ ITB_ENTRIES_21064 ];
  614. MMCSR_21064 MmCsr;
  615. LARGE_INTEGER PalBase;
  616. LARGE_INTEGER PalTemp[ PAL_TEMPS_21064 ];
  617. PS_21064 Ps;
  618. IER_21064 Sier;
  619. IRR_21064 Sirr;
  620. LARGE_INTEGER Va;
  621. } PROCESSOR_STATE_21066, *PPROCESSOR_STATE_21066;
  622. //
  623. // Machine-check logout frame.
  624. //
  625. typedef struct _LOGOUT_FRAME_21066{
  626. ABOX_CTL_21064 AboxCtl;
  627. BCR_21066 BankConfig[ MEMORY_BANKS_21066 ];
  628. BMR_21066 BankMask[ MEMORY_BANKS_21066 ];
  629. DC_STAT_21064 DcStat;
  630. LARGE_INTEGER ExcAddr;
  631. EXC_SUM_21064 ExcSum;
  632. IER_21064 Hier;
  633. IRR_21064 Hirr;
  634. ICCSR_21064 Iccsr;
  635. MMCSR_21064 MmCsr;
  636. LARGE_INTEGER PalBase;
  637. LARGE_INTEGER PalTemp[ PAL_TEMPS_21064 ];
  638. PS_21064 Ps;
  639. LARGE_INTEGER Va;
  640. } LOGOUT_FRAME_21066, *PLOGOUT_FRAME_21066;
  641. //
  642. // Correctable Machine-check logout frame.
  643. //
  644. typedef struct _CORRECTABLE_FRAME_21066{
  645. BCR_21066 BankConfig[ MEMORY_BANKS_21066 ];
  646. BMR_21066 BankMask[ MEMORY_BANKS_21066 ];
  647. DC_STAT_21064 DcStat;
  648. } CORRECTABLE_FRAME_21066;
  649. //
  650. // Define the physical and virtual address bits
  651. //
  652. #define LCA_PHYSICAL_ADDRESS_BITS 34
  653. #define LCA_VIRTUAL_ADDRESS_BITS 43
  654. #endif //!_AXP21066_