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.

1212 lines
26 KiB

  1. /*++ BUILD Version: 0000 Increment this if a change has global effects
  2. Copyright (c) 1994 Digital Euipment Corporation
  3. Module Name:
  4. axp21164.h
  5. Abstract:
  6. This module defines the DECchip 21164-specific structures that are
  7. defined in the PAL but must be visible to the HAL.
  8. Revision History:
  9. --*/
  10. #ifndef _AXP21164_
  11. #define _AXP21164_
  12. //
  13. // Define the "special" processor bus used by all machines that run a
  14. // DECchip 21164. The processor bus is used to access the internal
  15. // performance counters.
  16. //
  17. #define PROCESSOR_BUS_21164 21164
  18. //
  19. // Define the physical address bit that turns on user-mode access
  20. // to I/O space in the pfn of a pte. This bit is required because of
  21. // the current 36 bit physical address space limit on NT.
  22. //
  23. #define EV5_USER_IO_ADDRESS_SPACE (ULONGLONG)(0x800000000)
  24. #define EV5_IO_BASE_PHYSICAL 0x8000000000
  25. //
  26. // Define the number of entries for repeated internal processor registers.
  27. //
  28. #define ITB_ENTRIES_21164 32
  29. #define DTB_ENTRIES_21164 64
  30. #define PAL_TEMPS_21164 24
  31. //
  32. // Define the Ibox Internal Processor Register formats.
  33. //
  34. //
  35. // Define the ITB_PTE - write format.
  36. //
  37. typedef union _ITB_PTE_21164{
  38. struct {
  39. ULONG Ignore1: 4;
  40. ULONG Asm: 1;
  41. ULONG Gh: 2;
  42. ULONG Ignore2: 1;
  43. ULONG Kre: 1;
  44. ULONG Ere: 1;
  45. ULONG Sre: 1;
  46. ULONG Ure: 1;
  47. ULONG Ignore3: 20;
  48. ULONG Pfn: 27;
  49. ULONG Ignore4: 5;
  50. } ;
  51. ULONGLONG all;
  52. } ITB_PTE_21164, *PITB_PTE_21164;
  53. //
  54. // Define the ITB_PTE_TEMP - read format.
  55. //
  56. typedef union _ITB_PTE_TEMP_21164{
  57. struct {
  58. ULONG Raz1: 13;
  59. ULONG Asm: 1;
  60. ULONG Raz2: 4;
  61. ULONG Kre: 1;
  62. ULONG Ere: 1;
  63. ULONG Sre: 1;
  64. ULONG Ure: 1;
  65. ULONG Raz3: 7;
  66. ULONG Ghd: 3;
  67. ULONG Pfn: 27;
  68. ULONG Raz4: 5;
  69. } ;
  70. ULONGLONG all;
  71. } ITB_PTE_TEMP_21164, *PITB_PTE_TEMP_21164;
  72. //
  73. // Define the ITB_ASN.
  74. //
  75. typedef union _ITB_ASN_21164{
  76. struct {
  77. ULONG Raz1: 4;
  78. ULONG Asn: 7;
  79. ULONG Raz2: 21;
  80. ULONG Raz3: 32;
  81. } ;
  82. ULONGLONG all;
  83. } ITB_ASN_21164, *PITB_ASN_21164;
  84. //
  85. // Define the ICPERR_STAT.
  86. //
  87. typedef union _ICPERR_STAT_21164{
  88. struct {
  89. ULONG Raz1: 11;
  90. ULONG Dpe: 1;
  91. ULONG Tpe: 1;
  92. ULONG Tmr: 1;
  93. ULONG Raz2: 18;
  94. ULONG Raz3: 32;
  95. } ;
  96. ULONGLONG all;
  97. } ICPERR_STAT_21164, *PICPERR_STAT_21164;
  98. //
  99. // Define the EXC_SUM.
  100. //
  101. typedef union _EXC_SUM_21164{
  102. struct {
  103. ULONG Raz1: 10;
  104. ULONG Swc: 1;
  105. ULONG Inv: 1;
  106. ULONG Dze: 1;
  107. ULONG Fov: 1;
  108. ULONG Unf: 1;
  109. ULONG Ine: 1;
  110. ULONG Iov: 1;
  111. ULONG Raz2: 15;
  112. ULONG Raz3: 32;
  113. } ;
  114. ULONGLONG all;
  115. } EXC_SUM_21164, *PEXC_SUM_21164;
  116. //
  117. // Define the PS.
  118. //
  119. typedef union _PS_21164{
  120. struct {
  121. ULONG Raz1: 3;
  122. ULONG Cm0: 1;
  123. ULONG Cm1: 1;
  124. ULONG Raz2: 27;
  125. ULONG Raz3: 32;
  126. } ;
  127. ULONGLONG all;
  128. } PS_21164, *PPS_21164;
  129. //
  130. // Define the ICSR.
  131. //
  132. typedef union _ICSR_21164{
  133. struct {
  134. ULONG Raz1: 8;
  135. ULONG Pme: 2;
  136. ULONG Raz2: 7;
  137. ULONG Byte: 1;
  138. ULONG Raz3: 1;
  139. ULONG Mve: 1; // PCA56
  140. ULONG Imsk: 4;
  141. ULONG Tmm: 1;
  142. ULONG Tmd: 1;
  143. ULONG Fpe: 1;
  144. ULONG Hwe: 1;
  145. ULONG Sp32: 1;
  146. ULONG Sp43: 1;
  147. ULONG Sde: 1;
  148. ULONG Raz4: 1;
  149. ULONG Crde: 1;
  150. ULONG Sle: 1;
  151. ULONG Fms: 1;
  152. ULONG Fbt: 1;
  153. ULONG Fbd: 1;
  154. ULONG Dbs: 1;
  155. ULONG Ista: 1;
  156. ULONG Tst: 1;
  157. ULONG Raz5: 24;
  158. } ;
  159. ULONGLONG all;
  160. } ICSR_21164, *PICSR_21164;
  161. //
  162. // Define the SIRR.
  163. //
  164. typedef union _SIRR_21164{
  165. struct {
  166. ULONG Raz1: 4;
  167. ULONG Sir: 15;
  168. ULONG Raz2: 13;
  169. ULONG Raz3: 32;
  170. } ;
  171. ULONGLONG all;
  172. } SIRR_21164, *PSIRR_21164;
  173. //
  174. // Define the HWINT_CLR.
  175. //
  176. typedef union _HWINT_CLR_21164{
  177. struct {
  178. ULONG Raz1: 27;
  179. ULONG Pc0c: 1;
  180. ULONG Pc1c: 1;
  181. ULONG Pc2c: 1;
  182. ULONG Raz2: 2;
  183. ULONG Crdc: 1;
  184. ULONG Slc: 1;
  185. ULONG Raz3: 30;
  186. } ;
  187. ULONGLONG all;
  188. } HWINT_CLR_21164, *PHW_INTCLR_21164;
  189. //
  190. // Define the ISR.
  191. //
  192. typedef union _ISR_21164{
  193. struct {
  194. ULONG Ast: 4;
  195. ULONG Sirr: 15;
  196. ULONG Atr: 1;
  197. ULONG I20: 1;
  198. ULONG I21: 1;
  199. ULONG I22: 1;
  200. ULONG I23: 1;
  201. ULONG Raz1: 3;
  202. ULONG Pc0: 1;
  203. ULONG Pc1: 1;
  204. ULONG Pc2: 1;
  205. ULONG Pfl: 1;
  206. ULONG Mck: 1;
  207. ULONG Crd: 1;
  208. ULONG Sli: 1;
  209. ULONG Hlt: 1;
  210. ULONG Raz2: 29;
  211. } ;
  212. ULONGLONG all;
  213. } ISR_21164, *PISR_21164;
  214. //
  215. // Define the PMCTR.
  216. //
  217. typedef union _PMCTR_21164{
  218. struct {
  219. ULONG Sel2: 4;
  220. ULONG Sel1: 4;
  221. ULONG Kk: 1;
  222. ULONG Kp: 1;
  223. ULONG Ctl2: 2;
  224. ULONG Ctl1: 2;
  225. ULONG Ctl0: 2;
  226. ULONG Ctr2: 14;
  227. ULONG Ku: 1;
  228. ULONG Sel0: 1;
  229. ULONG Ctr1: 16;
  230. ULONG Ctr0: 16;
  231. } ;
  232. ULONGLONG all;
  233. } PMCTR_21164, *PPMCTR_21164;
  234. //
  235. // Define the Mbox and Dcache Internal Processor Register formats.
  236. //
  237. //
  238. // Define the DTB_ASN.
  239. //
  240. typedef union _DTB_ASN_21164{
  241. struct {
  242. ULONG Raz1: 32;
  243. ULONG Raz2: 25;
  244. ULONG Asn: 7;
  245. } ;
  246. ULONGLONG all;
  247. } DTB_ASN_21164, *PDTB_ASN_21164;
  248. //
  249. // Define the DTB_CM.
  250. //
  251. typedef union _DTB_CM_21164{
  252. struct {
  253. ULONG Raz1: 3;
  254. ULONG Cm0: 1;
  255. ULONG Cm1: 1;
  256. ULONG Raz2: 27;
  257. ULONG Raz3: 32;
  258. } ;
  259. ULONGLONG all;
  260. } DTB_CM_21164, *PDTB_CM_21164;
  261. //
  262. // Define the DTB_PTE.
  263. //
  264. typedef union _DTB_PTE_21164{
  265. struct {
  266. ULONG Ignore1: 1;
  267. ULONG For: 1;
  268. ULONG Fow: 1;
  269. ULONG Ignore2: 1;
  270. ULONG Asm: 1;
  271. ULONG Gh: 2;
  272. ULONG Ignore3: 1;
  273. ULONG Kre: 1;
  274. ULONG Ere: 1;
  275. ULONG Sre: 1;
  276. ULONG Ure: 1;
  277. ULONG Kwe: 1;
  278. ULONG Ewe: 1;
  279. ULONG Swe: 1;
  280. ULONG Uwe: 1;
  281. ULONG Ignore4: 16;
  282. ULONG Pfn: 27;
  283. ULONG Ignore5: 5;
  284. } ;
  285. ULONGLONG all;
  286. } DTB_PTE_21164, *PDTB_PTE_21164;
  287. //
  288. // Define the DTB_PTE_TEMP.
  289. //
  290. typedef union _DTB_PTE_TEMP_21164{
  291. struct {
  292. ULONG For: 1;
  293. ULONG Fow: 1;
  294. ULONG Kre: 1;
  295. ULONG Ere: 1;
  296. ULONG Sre: 1;
  297. ULONG Ure: 1;
  298. ULONG Kwe: 1;
  299. ULONG Ewe: 1;
  300. ULONG Swe: 1;
  301. ULONG Uwe: 1;
  302. ULONG Raz1: 3;
  303. ULONG Pfn31_13: 19;
  304. ULONG Pfn39_32: 8;
  305. ULONG Raz2: 24;
  306. } ;
  307. ULONGLONG all;
  308. } DTB_PTE_TEMP_21164, *PDTB_PTE_TEMP_21164;
  309. //
  310. // Define the MM_STAT.
  311. //
  312. typedef union _MM_STAT_21164{
  313. struct {
  314. ULONG Wr: 1;
  315. ULONG Acv: 1;
  316. ULONG For: 1;
  317. ULONG Fow: 1;
  318. ULONG DtbMiss: 1;
  319. ULONG BadVa: 1;
  320. ULONG Ra: 5;
  321. ULONG Opcode: 6;
  322. ULONG Raz1: 15;
  323. ULONG Raz2: 32;
  324. } ;
  325. ULONGLONG all;
  326. } MM_STAT_21164, *PMM_STAT_21164;
  327. //
  328. // Define the DC_PERR_STAT.
  329. //
  330. typedef union _DC_PERR_STAT_21164{
  331. struct {
  332. ULONG Seo: 1;
  333. ULONG Lock: 1;
  334. ULONG Dp0: 1;
  335. ULONG Dp1: 1;
  336. ULONG Tp0: 1;
  337. ULONG Tp1: 1;
  338. ULONG Raz1: 26;
  339. ULONG Raz2: 32;
  340. } ;
  341. ULONGLONG all;
  342. } DC_PERR_STAT_21164, *PDC_PERR_STAT_21164;
  343. //
  344. // Define the MCSR.
  345. //
  346. typedef union _MCSR_21164{
  347. struct {
  348. ULONG MBigEndian: 1;
  349. ULONG Sp32: 1;
  350. ULONG Sp43: 1;
  351. ULONG DbgTestSel0: 1;
  352. ULONG EBigEndian: 1;
  353. ULONG DbgTestSel1: 1;
  354. ULONG Raz1: 26;
  355. ULONG Raz2: 32;
  356. } ;
  357. ULONGLONG all;
  358. } MCSR_21164, *PMCSR_21164;
  359. //
  360. // Define the DC_MODE.
  361. //
  362. typedef union _DC_MODE_21164{
  363. struct {
  364. ULONG DcEna: 1;
  365. ULONG DcFhit: 1;
  366. ULONG DcBadParity: 1;
  367. ULONG DcPerrDisable: 1;
  368. ULONG DcDoa: 1;
  369. ULONG Raz1: 27;
  370. ULONG Raz2: 32;
  371. } ;
  372. ULONGLONG all;
  373. } DC_MODE_21164, *PDC_MODE_21164;
  374. //
  375. // Define the MAF_MODE.
  376. //
  377. typedef union _MAF_MODE_21164{
  378. struct {
  379. ULONG DreadNomerge: 1;
  380. ULONG WbFlushAlways: 1;
  381. ULONG WbNomerge: 1;
  382. ULONG IoNomerge: 1;
  383. ULONG WbCntDisable: 1;
  384. ULONG MafArbDisable: 1;
  385. ULONG DreadPending: 1;
  386. ULONG WbPending: 1;
  387. ULONG Raz1: 24;
  388. ULONG Raz2: 32;
  389. } ;
  390. ULONGLONG all;
  391. } MAF_MODE_21164, *PMAF_MODE_21164;
  392. //
  393. // Define the ALT_MODE.
  394. //
  395. typedef union _ALT_MODE_21164{
  396. struct {
  397. ULONG Ignore1: 3;
  398. ULONG Am: 2;
  399. ULONG Ignore2: 27;
  400. ULONG Ignore3: 32;
  401. } ;
  402. ULONGLONG all;
  403. } ALT_MODE_21164, *PALT_MODE_21164;
  404. //
  405. // Define the CC_CTL.
  406. //
  407. typedef union _CC_CTL_21164{
  408. struct {
  409. ULONG Count;
  410. ULONG CcEna: 1;
  411. ULONG Ignore: 31;
  412. } ;
  413. ULONGLONG all;
  414. } CC_CTL_21164, *PCC_CTL_21164;
  415. //
  416. // Define Cbox Internal Processor Registers.
  417. // (These IPRs are accessed via ld/st rather than mf/mt.)
  418. //
  419. //
  420. // Define physical and superpage addresses for the CBOX registers.
  421. //
  422. #define BASE_SUPERVA (ULONGLONG)(0xfffffc0000000000)
  423. #define SC_CTL_PA (ULONGLONG)(0xfffff000a8)
  424. #define SC_STAT_PA (ULONGLONG)(0xfffff000e8)
  425. #define SC_ADDR_PA (ULONGLONG)(0xfffff00188)
  426. #define BC_CONTROL_PA (ULONGLONG)(0xfffff00128)
  427. #define BC_CONFIG_PA (ULONGLONG)(0xfffff001c8)
  428. #define BC_TAG_ADDR_PA (ULONGLONG)(0xfffff00108)
  429. #define EI_STAT_PA (ULONGLONG)(0xfffff00168)
  430. #define EI_ADDR_PA (ULONGLONG)(0xfffff00148)
  431. #define FILL_SYN_PA (ULONGLONG)(0xfffff00068)
  432. #define LD_LOCK_PA (ULONGLONG)(0xfffff001e8)
  433. #define SC_CTL_SVA (ULONGLONG)( BASE_SUPERVA | SC_CTL_PA )
  434. #define SC_STAT_SVA (ULONGLONG)( BASE_SUPERVA | SC_STAT_PA )
  435. #define SC_ADDR_SVA (ULONGLONG)( BASE_SUPERVA | SC_ADDR_PA )
  436. #define BC_CONTROL_SVA (ULONGLONG)( BASE_SUPERVA | BC_CONTROL_PA )
  437. #define BC_CONFIG_SVA (ULONGLONG)( BASE_SUPERVA | BC_CONFIG_PA )
  438. #define BC_TAG_ADDR_SVA (ULONGLONG)( BASE_SUPERVA | BC_TAG_ADDR_PA )
  439. #define EI_STAT_SVA (ULONGLONG)( BASE_SUPERVA | EI_STAT_PA )
  440. #define EI_ADDR_SVA (ULONGLONG)( BASE_SUPERVA | EI_ADDR_PA )
  441. #define FILL_SYN_SVA (ULONGLONG)( BASE_SUPERVA | FILL_SYN_PA )
  442. #define LD_LOCK_SVA (ULONGLONG)( BASE_SUPERVA | LD_LOCK_PA )
  443. //
  444. // Define the offsets for the Cbox IPRs to be used with specialized
  445. // read/write ipr routines for EV5.
  446. //
  447. typedef struct _CBOX_IPRS_21164{
  448. UCHAR FillSyn;
  449. UCHAR Unused1;
  450. UCHAR ScCtl;
  451. UCHAR Unused2;
  452. UCHAR ScStat;
  453. UCHAR BcTagAddr;
  454. UCHAR BcControl;
  455. UCHAR EiAddr;
  456. UCHAR EiStat;
  457. UCHAR ScAddr;
  458. UCHAR Unused3;
  459. UCHAR BcConfig;
  460. UCHAR LdLock;
  461. } CBOX_IPRS_21164, *PCBOX_IPRS_21164;
  462. //
  463. // Define the SC_CTL.
  464. //
  465. typedef union _SC_CTL_21164{
  466. struct {
  467. ULONG ScFhit: 1;
  468. ULONG ScFlush: 1;
  469. ULONG ScTagStat: 6;
  470. ULONG ScFbDp: 4;
  471. ULONG ScBlkSize: 1;
  472. ULONG ScSetEn: 3;
  473. ULONG Raz1: 16;
  474. ULONG Raz2: 32;
  475. } ;
  476. ULONGLONG all;
  477. } SC_CTL_21164, *PSC_CTL_21164;
  478. //
  479. // Define the SC_ADDR.
  480. //
  481. typedef union _SC_ADDR_21164{
  482. struct {
  483. ULONGLONG Rao1: 4;
  484. ULONGLONG ScAddr: 35;
  485. ULONGLONG Raz1: 1;
  486. ULONGLONG Rao2: 24;
  487. };
  488. ULONGLONG all;
  489. } SC_ADDR_21164, *PSC_ADDR_21164;
  490. //
  491. // Define the SC_STAT.
  492. //
  493. typedef union _SC_STAT_21164{
  494. struct {
  495. ULONG ScTperr: 3;
  496. ULONG ScDperr: 8;
  497. ULONG CboxCmd: 5;
  498. ULONG ScScndErr: 1;
  499. ULONG Raz1: 15;
  500. ULONG Raz2: 32;
  501. } ;
  502. ULONGLONG all;
  503. } SC_STAT_21164, *PSC_STAT_21164;
  504. //
  505. // Define the BC_CONTROL.
  506. //
  507. typedef union _BC_CONTROL_21164{
  508. struct {
  509. ULONG BcEnabled: 1;
  510. ULONG AllocCyc: 1;
  511. ULONG EiCmdGrp1: 1;
  512. ULONG EiCmdGrp2: 1;
  513. ULONG CorrFillDat: 1;
  514. ULONG VtmFirst: 1;
  515. ULONG EiEccOrParity: 1;
  516. ULONG BcFhit: 1;
  517. ULONG BcTagStat: 5;
  518. ULONG BcBadDat: 2;
  519. ULONG EiDisErr: 1;
  520. ULONG TlPipeLatch: 1;
  521. ULONG BcWave: 2;
  522. ULONG PmMuxSel1: 3;
  523. ULONG PmMuxSel2: 3;
  524. ULONG Mbz1: 1;
  525. ULONG FlushScVtm: 1;
  526. ULONG Mbz2: 1;
  527. ULONG DisSysPar: 1;
  528. ULONG Mbz3: 3;
  529. ULONG Raz1: 1;
  530. ULONG NoByteIo: 1;
  531. ULONG Raz2: 30;
  532. } ;
  533. ULONGLONG all;
  534. } BC_CONTROL_21164, *PBC_CONTROL_21164;
  535. //
  536. // Define the BC_CONFIG.
  537. //
  538. typedef union _BC_CONFIG_21164{
  539. struct {
  540. ULONG BcSize: 3;
  541. ULONG Reserved1: 1;
  542. ULONG BcRdSpd: 4;
  543. ULONG BcWrSpd: 4;
  544. ULONG BcRdWrSpc: 3;
  545. ULONG Reserved2: 1;
  546. ULONG FillWeOffset: 3;
  547. ULONG Reserved3: 1;
  548. ULONG BcWeCtl: 9;
  549. ULONG Reserved4: 3;
  550. ULONG Reserved5: 32;
  551. } ;
  552. ULONGLONG all;
  553. } BC_CONFIG_21164, *PBC_CONFIG_21164;
  554. //
  555. // Define the EI_STAT.
  556. //
  557. typedef union _EI_STAT_21164{
  558. struct {
  559. ULONG Ra01: 24;
  560. ULONG ChipId: 4;
  561. ULONG BcTperr: 1;
  562. ULONG BcTcperr: 1;
  563. ULONG EiEs: 1;
  564. ULONG CorEccErr: 1;
  565. ULONG UncEccErr: 1;
  566. ULONG EiParErr: 1;
  567. ULONG FilIrd: 1;
  568. ULONG SeoHrdErr: 1;
  569. ULONG Ra02: 28;
  570. } ;
  571. ULONGLONG all;
  572. } EI_STAT_21164, *PEI_STAT_21164;
  573. //
  574. // Define the EI_ADDR.
  575. //
  576. typedef union _EI_ADDR_21164{
  577. struct {
  578. ULONGLONG Rao1: 4;
  579. ULONGLONG EiAddr: 36;
  580. ULONGLONG Rao2: 24;
  581. };
  582. ULONGLONG all;
  583. } EI_ADDR_21164, *PEI_ADDR_21164;
  584. //
  585. // Define the BC_TAG_ADDR.
  586. //
  587. typedef union _BC_TAG_ADDR_21164{
  588. struct {
  589. ULONG Ra01: 12;
  590. ULONG Hit: 1;
  591. ULONG TagCtlP: 1;
  592. ULONG TagCtlD: 1;
  593. ULONG TagCtlS: 1;
  594. ULONG TagCtlV: 1;
  595. ULONG TagP: 1;
  596. ULONG Ra02: 2;
  597. ULONG Tag0: 12;
  598. ULONG Tag1: 7;
  599. ULONG Ra03: 25;
  600. } ;
  601. ULONGLONG all;
  602. } BC_TAG_ADDR_21164, *PBC_TAG_ADDR_21164;
  603. //
  604. // Define the FILL_SYN.
  605. //
  606. typedef union _FILL_SYN_21164{
  607. struct {
  608. ULONG Lo: 8;
  609. ULONG Hi: 8;
  610. ULONG Raz1: 16;
  611. ULONG Raz2: 32;
  612. } ;
  613. ULONGLONG all;
  614. } FILL_SYN_21164, *PFILL_SYN_21164;
  615. //++
  616. // 21164PC Definitions
  617. //--
  618. //
  619. // CBOX Register addresses
  620. //
  621. #define CBOX_CONFIG_PA (ULONGLONG)(0xfffff00008)
  622. #define CBOX_ADDRESS_PA (ULONGLONG)(0xfffff00088)
  623. #define CBOX_STATUS_PA (ULONGLONG)(0xfffff00108)
  624. #define CBOX_CONFIG2_PA (ULONGLONG)(0xfffff00188)
  625. #define CBOX_CONFIG_SVA (ULONGLONG)( BASE_SUPERVA | CBOX_CONFIG_PA )
  626. #define CBOX_ADDRESS_SVA (ULONGLONG)( BASE_SUPERVA | CBOX_ADDRESS_PA )
  627. #define CBOX_STATUS_SVA (ULONGLONG)( BASE_SUPERVA | CBOX_STATUS_PA )
  628. #define CBOX_CONFIG2_SVA (ULONGLONG)( BASE_SUPERVA | CBOX_CONFIG2_PA )
  629. //
  630. // Define the offsets for the Cbox IPRs to be used with specialized
  631. // read/write ipr routines for PCA56.
  632. //
  633. typedef struct _CBOX_IPRS_21164PC{
  634. UCHAR CboxConfig;
  635. UCHAR CboxAddress;
  636. UCHAR CboxStatus;
  637. UCHAR CboxConfig2;
  638. } CBOX_IPRS_21164PC, *PCBOX_IPRS_21164PC;
  639. //
  640. // Define CBOX_CONFIG
  641. //
  642. typedef union _CBOX_CONFIG_21164PC{
  643. struct {
  644. ULONG Mbz1: 4;
  645. ULONG BcClkRatio: 4;
  646. ULONG BcLatencyOff: 4;
  647. ULONG BcSize: 2;
  648. ULONG BcClkDelay: 2;
  649. ULONG BcRwOff: 3;
  650. ULONG BcProbeDuringFill: 1;
  651. ULONG BcFillDelay: 3;
  652. ULONG IoParityEnable: 1;
  653. ULONG MemParityEnable: 1;
  654. ULONG BcForceHit: 1;
  655. ULONG BcForceErr: 1;
  656. ULONG BcBigDrv: 1;
  657. ULONG BcTagData: 3;
  658. ULONG BcEnable: 1;
  659. ULONG Mbz2: 32;
  660. };
  661. ULONGLONG all;
  662. } CBOX_CONFIG_21164PC, *PCBOX_CONFIG_21164PC;
  663. //
  664. // Define CBOX_ADDRESS
  665. //
  666. typedef union _CBOX_ADDRESS_21164PC{
  667. struct {
  668. ULONGLONG Mbz1: 4;
  669. ULONGLONG Address36_4: 33;
  670. ULONGLONG Mbz2: 2;
  671. ULONGLONG Address39: 1;
  672. ULONGLONG Mbz3: 24;
  673. };
  674. ULONGLONG all;
  675. } CBOX_ADDRESS_21164PC, *PCBOX_ADDRESS_21164PC;
  676. //
  677. // Define CBOX_STATUS
  678. //
  679. typedef union _CBOX_STATUS_21164PC{
  680. struct {
  681. ULONGLONG Mbz1: 4;
  682. ULONGLONG SysClkRatio: 4;
  683. ULONGLONG ChipRev: 4;
  684. ULONGLONG DataParErr: 4;
  685. ULONGLONG TagParErr: 1;
  686. ULONGLONG TagDirty: 1;
  687. ULONGLONG Memory: 1;
  688. ULONGLONG MultiErr: 1;
  689. ULONGLONG Mbz2: 44;
  690. };
  691. ULONGLONG all;
  692. } CBOX_STATUS_21164PC, *PCBOX_STATUS_21164PC;
  693. //
  694. // Define CBOX_CONFIG2
  695. //
  696. typedef union _CBOX_CONFIG2_21164PC{
  697. struct {
  698. ULONGLONG Mbz1: 4;
  699. ULONGLONG BcRegReg: 1;
  700. ULONGLONG DbgSel: 1;
  701. ULONGLONG BcThreeMiss: 1;
  702. ULONGLONG Mbz2: 1;
  703. ULONGLONG Pm0Mux: 3;
  704. ULONGLONG Pm1Mux: 3;
  705. ULONGLONG Mbz3: 50;
  706. };
  707. ULONGLONG all;
  708. } CBOX_CONFIG2_21164PC, *PCBOX_CONFIG2_21164PC;
  709. //++
  710. // End of 21164PC definitions
  711. //--
  712. //
  713. // Define EV5 IPLs (interrupt priority levels.
  714. //
  715. #define EV5_IPL0 (0)
  716. #define EV5_IPL1 (1)
  717. #define EV5_IPL2 (2)
  718. #define EV5_IPL3 (3)
  719. #define EV5_IPL4 (4)
  720. #define EV5_IPL5 (5)
  721. #define EV5_IPL6 (6)
  722. #define EV5_IPL7 (7)
  723. #define EV5_IPL8 (8)
  724. #define EV5_IPL9 (9)
  725. #define EV5_IPL10 (10)
  726. #define EV5_IPL11 (11)
  727. #define EV5_IPL12 (12)
  728. #define EV5_IPL13 (13)
  729. #define EV5_IPL14 (14)
  730. #define EV5_IPL15 (15)
  731. #define EV5_IPL16 (16)
  732. #define EV5_IPL17 (17)
  733. #define EV5_IPL18 (18)
  734. #define EV5_IPL19 (19)
  735. #define EV5_IPL20 (20)
  736. #define EV5_IPL21 (21)
  737. #define EV5_IPL22 (22)
  738. #define EV5_IPL23 (23)
  739. #define EV5_IPL24 (24)
  740. #define EV5_IPL25 (25)
  741. #define EV5_IPL26 (26)
  742. #define EV5_IPL27 (27)
  743. #define EV5_IPL28 (28)
  744. #define EV5_IPL29 (29)
  745. #define EV5_IPL30 (30)
  746. #define EV5_IPL31 (31)
  747. //
  748. // Define interrupt vector values for EV5.
  749. //
  750. #define EV5_IPL20_VECTOR (20)
  751. #define EV5_IPL21_VECTOR (21)
  752. #define EV5_IPL22_VECTOR (22)
  753. #define EV5_IPL23_VECTOR (23)
  754. #define EV5_IRQ0_VECTOR EV5_IPL20_VECTOR
  755. #define EV5_IRQ1_VECTOR EV5_IPL21_VECTOR
  756. #define EV5_IRQ2_VECTOR EV5_IPL22_VECTOR
  757. #define EV5_IRQ3_VECTOR EV5_IPL23_VECTOR
  758. #define EV5_HALT_VECTOR (14)
  759. #define EV5_PFL_VECTOR (24)
  760. #define EV5_MCHK_VECTOR (12)
  761. #define EV5_CRD_VECTOR (25)
  762. #define EV5_PC0_VECTOR (6)
  763. #define EV5_PC1_VECTOR (8)
  764. #define EV5_PC2_VECTOR (15)
  765. //
  766. // Define the Interrupt Mask structure communicated between the
  767. // HAL and PALcode.
  768. //
  769. typedef union _IMSK_21164{
  770. struct{
  771. ULONG Irq0Mask: 1;
  772. ULONG Irq1Mask: 1;
  773. ULONG Irq2Mask: 1;
  774. ULONG Irq3Mask: 1;
  775. ULONG Reserved: 28;
  776. };
  777. ULONG all;
  778. } IMSK_21164, *PIMSK_21164;
  779. //
  780. // PALcode Event Counters for the 21164
  781. // This is the structure of the data returned by the rdcounters call pal.
  782. //
  783. typedef struct _COUNTERS_21164{
  784. ULONGLONG MachineCheckCount;
  785. ULONGLONG ArithmeticExceptionCount;
  786. ULONGLONG InterruptCount;
  787. ULONGLONG ItbMissCount;
  788. ULONGLONG DtbMissSingleCount;
  789. ULONGLONG DtbMissDoubleCount;
  790. ULONGLONG IAccvioCount;
  791. ULONGLONG DfaultCount;
  792. ULONGLONG UnalignedCount;
  793. ULONGLONG OpcdecCount;
  794. ULONGLONG FenCount;
  795. ULONGLONG ItbTnvCount;
  796. ULONGLONG DtbTnvCount;
  797. ULONGLONG PdeTnvCount;
  798. ULONGLONG HardwareInterruptCount;
  799. ULONGLONG SoftwareInterruptCount;
  800. ULONGLONG SpecialInterruptCount;
  801. ULONGLONG HaltCount;
  802. ULONGLONG RestartCount;
  803. ULONGLONG DrainaCount;
  804. ULONGLONG RebootCount;
  805. ULONGLONG InitpalCount;
  806. ULONGLONG WrentryCount;
  807. ULONGLONG SwpirqlCount;
  808. ULONGLONG RdirqlCount;
  809. ULONGLONG DiCount;
  810. ULONGLONG EiCount;
  811. ULONGLONG SwppalCount;
  812. ULONGLONG SsirCount;
  813. ULONGLONG CsirCount;
  814. ULONGLONG RfeCount;
  815. ULONGLONG RetsysCount;
  816. ULONGLONG SwpctxCount;
  817. ULONGLONG SwpprocessCount;
  818. ULONGLONG RdmcesCount;
  819. ULONGLONG WrmcesCount;
  820. ULONGLONG TbiaCount;
  821. ULONGLONG TbisCount;
  822. ULONGLONG TbisasnCount;
  823. ULONGLONG DtbisCount;
  824. ULONGLONG RdkspCount;
  825. ULONGLONG SwpkspCount;
  826. ULONGLONG RdpsrCount;
  827. ULONGLONG RdpcrCount;
  828. ULONGLONG RdthreadCount;
  829. ULONGLONG TbimCount;
  830. ULONGLONG TbimasnCount;
  831. ULONGLONG RdcountersCount;
  832. ULONGLONG RdstateCount;
  833. ULONGLONG WrperfmonCount;
  834. ULONGLONG InitpcrCount;
  835. ULONGLONG BptCount;
  836. ULONGLONG CallsysCount;
  837. ULONGLONG ImbCount;
  838. ULONGLONG GentrapCount;
  839. ULONGLONG RdtebCount;
  840. ULONGLONG KbptCount;
  841. ULONGLONG CallkdCount;
  842. ULONGLONG AddressSpaceSwapCount;
  843. ULONGLONG AsnWrapCount;
  844. ULONGLONG Misc1Count;
  845. ULONGLONG Misc2Count;
  846. ULONGLONG Misc3Count;
  847. ULONGLONG Misc4Count;
  848. ULONGLONG Misc5Count;
  849. ULONGLONG Misc6Count;
  850. ULONGLONG Misc7Count;
  851. ULONGLONG Misc8Count;
  852. ULONGLONG Misc9Count;
  853. ULONGLONG Misc10Count;
  854. ULONGLONG Misc11Count;
  855. ULONGLONG Misc12Count;
  856. ULONGLONG Misc13Count;
  857. ULONGLONG Misc14Count;
  858. ULONGLONG Misc15Count;
  859. ULONGLONG Misc16Count;
  860. ULONGLONG Misc17Count;
  861. ULONGLONG Misc18Count;
  862. ULONGLONG Misc19Count;
  863. ULONGLONG Misc20Count;
  864. ULONGLONG SleepCount;
  865. ULONGLONG EalnfixCount;
  866. ULONGLONG DalnfixCount;
  867. } COUNTERS_21164, *PCOUNTERS_21164;
  868. //
  869. // Types of performance counters.
  870. //
  871. typedef enum _AXP21164_PCCOUNTER{
  872. Ev5PerformanceCounter0 = 0,
  873. Ev5PerformanceCounter1 = 1,
  874. Ev5PerformanceCounter2 = 2
  875. } AXP21164_PCCOUNTER, *PAXP21164_PCCOUNTER;
  876. //
  877. // Mux control values
  878. //
  879. typedef enum _AXP21164_PCMUXCONTROL{
  880. Ev5Cycles = 0x0,
  881. Ev5Instructions = 0x1,
  882. Ev5NonIssue = 0x0,
  883. Ev5SplitIssue = 0x1,
  884. Ev5PipeDry = 0x2,
  885. Ev5ReplayTrap = 0x3,
  886. Ev5SingleIssue = 0x4,
  887. Ev5DualIssue = 0x5,
  888. Ev5TripleIssue = 0x6,
  889. Ev5QuadIssue = 0x7,
  890. Ev5FlowChangeInst = 0x8,
  891. Ev5IntOpsIssued = 0x9,
  892. Ev5FPOpsIssued = 0xa,
  893. Ev5LoadsIssued = 0xb,
  894. Ev5StoresIssued = 0xc,
  895. Ev5IcacheIssued = 0xd,
  896. Ev5DcacheAccesses = 0xe,
  897. Ev5CBOXInput1 = 0xf,
  898. Ev5LongStalls = 0x0,
  899. Ev5PCMispredicts = 0x2,
  900. Ev5BRMispredicts = 0x3,
  901. Ev5IcacheRFBMisses = 0x4,
  902. Ev5ITBMisses = 0x5,
  903. Ev5DcacheLDMisses = 0x6,
  904. Ev5DTBMisses = 0x7,
  905. Ev5LDMergedMAF = 0x8,
  906. Ev5LDUReplayTraps = 0x9,
  907. Ev5WBMAFReplayTraps = 0xa,
  908. Ev5ExternPerfmonhInput = 0xb,
  909. Ev5CPUCycles = 0xc,
  910. Ev5MBStallCycles = 0xd,
  911. Ev5LDxLInstIssued = 0xe,
  912. Ev5CBOXInput2 = 0xf,
  913. //
  914. // Special MUX controls
  915. //
  916. Ev5PcSpecial = 0x10,
  917. Ev5JsrRetIssued = 0x10,
  918. Ev5CondBrIssued = 0x11,
  919. Ev5AllFlowIssued = 0x12,
  920. Ev5ScMux1 = 0x20,
  921. Ev5ScAccesses = 0x20,
  922. Ev5ScReads = 0x21,
  923. Ev5ScWrites = 0x22,
  924. Ev5ScVictims = 0x23,
  925. Ev5ScUndefined = 0x24,
  926. Ev5ScBcacheAccesses = 0x25,
  927. Ev5ScBcacheVictims = 0x26,
  928. Ev5ScSystemCmdReq = 0x27,
  929. Ev5ScMux2 = 0x28,
  930. Ev5ScMisses = 0x28,
  931. Ev5ScReadMisses = 0x29,
  932. Ev5ScWriteMisses = 0x2a,
  933. Ev5ScSharedWrites = 0x2b,
  934. Ev5ScWrites2 = 0x2c,
  935. Ev5ScBcacheMisses = 0x2d,
  936. Ev5ScSysInvalidate = 0x2e,
  937. Ev5ScSysReadReq = 0x2f,
  938. } AXP21164_PCMUXCONTROL, *PAXP21164_PCMUXCONTROL;
  939. //
  940. // Counter control values.
  941. //
  942. typedef enum _AXP21164_PCEVENTCOUNT{
  943. Ev5CountEvents2xx8 = 0x100,
  944. Ev5CountEvents2xx14 = 0x4000,
  945. Ev5CountEvents2xx16 = 0x10000
  946. } AXP21164_PCEVENTCOUNT, *PAXP21164_PCEVENTCOUNT;
  947. //
  948. // Event count selection values
  949. //
  950. typedef enum _COUNTER_CONTROL{
  951. Ev5CounterDisable = 0x0,
  952. Ev5InterruptDisable = 0x1,
  953. Ev5EventCountLow=0x2,
  954. Ev5EventCountHigh=0x3
  955. } COUNTER_CONTROL, *PCOUNTER_CONTROL;
  956. //
  957. // Internal processor state record.
  958. // This is the structure of the data returned by the rdstate call pal.
  959. //
  960. typedef struct _PROCESSOR_STATE_21164{
  961. ITB_PTE_TEMP_21164 ItbPte[ ITB_ENTRIES_21164 ];
  962. ITB_ASN_21164 ItbAsn;
  963. ULONGLONG Ivptbr;
  964. ICPERR_STAT_21164 IcPerrStat;
  965. EXC_SUM_21164 ExcSum;
  966. ULONGLONG ExcMask;
  967. ULONGLONG PalBase;
  968. PS_21164 Ps;
  969. ICSR_21164 Icsr;
  970. ULONGLONG Ipl;
  971. ULONGLONG IntId;
  972. ULONGLONG Astrr;
  973. ULONGLONG Aster;
  974. SIRR_21164 Sirr;
  975. ISR_21164 Isr;
  976. PMCTR_21164 Pmctr;
  977. ULONGLONG PalTemp[ PAL_TEMPS_21164 ];
  978. DTB_PTE_TEMP_21164 DtbPte[ DTB_ENTRIES_21164 ];
  979. MM_STAT_21164 MmStat;
  980. ULONGLONG Va;
  981. DC_PERR_STAT_21164 DcPerrStat;
  982. MCSR_21164 Mcsr;
  983. DC_MODE_21164 DcMode;
  984. MAF_MODE_21164 MafMode;
  985. union {
  986. struct { // EV5
  987. SC_CTL_21164 ScCtl;
  988. SC_ADDR_21164 ScAddr;
  989. SC_STAT_21164 ScStat;
  990. BC_CONTROL_21164 BcControl;
  991. BC_CONFIG_21164 BcConfig;
  992. EI_STAT_21164 EiStat;
  993. EI_ADDR_21164 EiAddr;
  994. BC_TAG_ADDR_21164 BcTagAddr;
  995. FILL_SYN_21164 FillSyn;
  996. };
  997. struct { // PCA56
  998. CBOX_CONFIG_21164PC CboxConfig;
  999. CBOX_ADDRESS_21164PC CboxAddress;
  1000. CBOX_STATUS_21164PC CboxStatus;
  1001. CBOX_CONFIG2_21164PC CboxConfig2;
  1002. ULONGLONG Reserved1;
  1003. ULONGLONG Reserved2;
  1004. ULONGLONG Reserved3;
  1005. ULONGLONG Reserved4;
  1006. ULONGLONG Reserved5;
  1007. };
  1008. };
  1009. } PROCESSOR_STATE_21164, *PPROCESSOR_STATE_21164;
  1010. //
  1011. // Machine-check logout frame.
  1012. //
  1013. typedef struct _LOGOUT_FRAME_21164{
  1014. ULONGLONG ExcAddr;
  1015. ULONGLONG PalBase;
  1016. ULONGLONG Ps;
  1017. ULONGLONG Va;
  1018. ULONGLONG VaForm;
  1019. ICSR_21164 Icsr;
  1020. ICPERR_STAT_21164 IcPerrStat;
  1021. ISR_21164 Isr;
  1022. ULONGLONG Ipl;
  1023. ULONGLONG IntId;
  1024. MM_STAT_21164 MmStat;
  1025. MCSR_21164 Mcsr;
  1026. DC_PERR_STAT_21164 DcPerrStat;
  1027. union {
  1028. struct { // EV5
  1029. SC_CTL_21164 ScCtl;
  1030. SC_STAT_21164 ScStat;
  1031. SC_ADDR_21164 ScAddr;
  1032. BC_CONTROL_21164 BcControl;
  1033. BC_CONFIG_21164 BcConfig;
  1034. BC_TAG_ADDR_21164 BcTagAddr;
  1035. EI_STAT_21164 EiStat;
  1036. EI_ADDR_21164 EiAddr;
  1037. FILL_SYN_21164 FillSyn;
  1038. };
  1039. struct { // PCA56
  1040. CBOX_CONFIG_21164PC CboxConfig;
  1041. CBOX_ADDRESS_21164PC CboxAddress;
  1042. CBOX_STATUS_21164PC CboxStatus;
  1043. CBOX_CONFIG2_21164PC CboxConfig2;
  1044. ULONGLONG Reserved1;
  1045. ULONGLONG Reserved2;
  1046. ULONGLONG Reserved3;
  1047. ULONGLONG Reserved4;
  1048. ULONGLONG Reserved5;
  1049. };
  1050. };
  1051. ULONGLONG PalTemp[ PAL_TEMPS_21164 ];
  1052. } LOGOUT_FRAME_21164, *PLOGOUT_FRAME_21164;
  1053. //
  1054. // Correctable Machine-check logout frame.
  1055. //
  1056. typedef struct _CORRECTABLE_FRAME_21164{
  1057. union {
  1058. struct { // EV5
  1059. EI_STAT_21164 EiStat;
  1060. EI_ADDR_21164 EiAddr;
  1061. FILL_SYN_21164 FillSyn;
  1062. };
  1063. struct { // PCA56
  1064. CBOX_STATUS_21164PC CboxStatus;
  1065. CBOX_ADDRESS_21164PC CboxAddress;
  1066. ULONGLONG Reserved;
  1067. };
  1068. };
  1069. ISR_21164 Isr;
  1070. } CORRECTABLE_FRAME_21164;
  1071. //
  1072. // Define the number of physical and virtual address bits
  1073. //
  1074. #define EV5_PHYSICAL_ADDRESS_BITS 40
  1075. #define EV5_VIRTUAL_ADDRESS_BITS 43
  1076. #endif //!_AXP21164_