Home | History | Annotate | Line # | Download | only in include
      1  1.14   andvar /*	$NetBSD: mipsNN.h,v 1.14 2023/05/06 21:53:26 andvar Exp $	*/
      2   1.1   simonb 
      3   1.1   simonb /*
      4   1.1   simonb  * Copyright 2000, 2001
      5   1.1   simonb  * Broadcom Corporation. All rights reserved.
      6   1.3      cgd  *
      7   1.1   simonb  * This software is furnished under license and may be used and copied only
      8   1.1   simonb  * in accordance with the following terms and conditions.  Subject to these
      9   1.1   simonb  * conditions, you may download, copy, install, use, modify and distribute
     10   1.1   simonb  * modified or unmodified copies of this software in source and/or binary
     11   1.1   simonb  * form. No title or ownership is transferred hereby.
     12   1.3      cgd  *
     13   1.1   simonb  * 1) Any source code used, modified or distributed must reproduce and
     14   1.1   simonb  *    retain this copyright notice and list of conditions as they appear in
     15   1.1   simonb  *    the source file.
     16   1.3      cgd  *
     17   1.1   simonb  * 2) No right is granted to use any trade name, trademark, or logo of
     18   1.3      cgd  *    Broadcom Corporation.  The "Broadcom Corporation" name may not be
     19   1.3      cgd  *    used to endorse or promote products derived from this software
     20   1.3      cgd  *    without the prior written permission of Broadcom Corporation.
     21   1.3      cgd  *
     22   1.1   simonb  * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED
     23   1.1   simonb  *    WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
     24   1.1   simonb  *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
     25   1.1   simonb  *    NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE
     26   1.1   simonb  *    FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE
     27   1.1   simonb  *    LIABLE FOR DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     28   1.1   simonb  *    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     29   1.1   simonb  *    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
     30   1.1   simonb  *    BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     31   1.1   simonb  *    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
     32   1.1   simonb  *    OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     33   1.1   simonb  */
     34   1.1   simonb 
     35   1.1   simonb /*
     36   1.1   simonb  * Values related to the MIPS32/MIPS64 Privileged Resource Architecture.
     37   1.1   simonb  */
     38   1.1   simonb 
     39   1.1   simonb #define	_MIPSNN_SHIFT(reg)	__MIPSNN_SHIFT(reg)
     40   1.1   simonb #define	__MIPSNN_SHIFT(reg)	MIPSNN_ ## reg ## _SHIFT
     41   1.1   simonb #define	_MIPSNN_MASK(reg)	__MIPSNN_MASK(reg)
     42   1.1   simonb #define	__MIPSNN_MASK(reg)	MIPSNN_ ## reg ## _MASK
     43   1.1   simonb 
     44   1.1   simonb #define	MIPSNN_GET(reg, x)						\
     45   1.1   simonb     ((unsigned)((x) & _MIPSNN_MASK(reg)) >> _MIPSNN_SHIFT(reg))
     46   1.1   simonb #define	MIPSNN_PUT(reg, val)						\
     47   1.1   simonb     (((x) << _MIPSNN_SHIFT(reg)) & _MIPSNN_MASK(reg))
     48   1.1   simonb 
     49   1.1   simonb /*
     50   1.1   simonb  * Values in Configuration Register (CP0 Register 16, Select 0)
     51   1.1   simonb  */
     52   1.1   simonb 
     53   1.1   simonb /* "M" (R): Configuration Register 1 present if set.  Defined as always set. */
     54   1.1   simonb #define	MIPSNN_CFG_M		0x80000000
     55   1.1   simonb 
     56   1.1   simonb /* Reserved for CPU implementations. */
     57   1.1   simonb //	reserved		0x7fff0000
     58   1.1   simonb 
     59   1.1   simonb /* "BE" (R): Big endian if set, little endian if clear. */
     60   1.1   simonb #define	MIPSNN_CFG_BE		0x00008000
     61   1.1   simonb 
     62   1.1   simonb /* "AT" (R): architecture type implemented by processor */
     63   1.1   simonb #define	MIPSNN_CFG_AT_MASK	0x00006000
     64   1.1   simonb #define	MIPSNN_CFG_AT_SHIFT	13
     65   1.1   simonb 
     66   1.1   simonb #define	MIPSNN_CFG_AT_MIPS32	0		/* MIPS32 */
     67   1.1   simonb #define	MIPSNN_CFG_AT_MIPS64S	1		/* MIPS64S */
     68   1.1   simonb #define	MIPSNN_CFG_AT_MIPS64	2		/* MIPS64 */
     69   1.1   simonb //	reserved		3
     70   1.1   simonb 
     71   1.1   simonb /* "AR" (R): Architecture revision level implemented by proc. */
     72   1.1   simonb #define	MIPSNN_CFG_AR_MASK	0x00001c00
     73   1.1   simonb #define	MIPSNN_CFG_AR_SHIFT	10
     74   1.1   simonb 
     75   1.1   simonb #define	MIPSNN_CFG_AR_REV1	0		/* Revision 1 */
     76   1.4  gdamore #define	MIPSNN_CFG_AR_REV2	1		/* Revision 2 */
     77   1.1   simonb //	reserved		other values
     78   1.1   simonb 
     79   1.1   simonb /* "MT" (R): MMU type implemented by processor */
     80   1.1   simonb #define	MIPSNN_CFG_MT_MASK	0x00000380
     81   1.1   simonb #define	MIPSNN_CFG_MT_SHIFT	7
     82   1.1   simonb 
     83   1.1   simonb #define	MIPSNN_CFG_MT_NONE	0		/* No MMU */
     84   1.1   simonb #define	MIPSNN_CFG_MT_TLB	1		/* Std TLB */
     85   1.1   simonb #define	MIPSNN_CFG_MT_BAT	2		/* Std BAT */
     86   1.1   simonb #define	MIPSNN_CFG_MT_FIXED	3		/* Std Fixed mapping */
     87   1.1   simonb //	reserved		other values
     88   1.1   simonb 
     89   1.1   simonb /* Reserved.  Write as 0, reads as 0. */
     90   1.2   simonb //	reserved		0x00000070
     91   1.2   simonb 
     92   1.2   simonb /* "M" (R): Virtual instruction cache if set. */
     93   1.2   simonb #define	MIPSNN_CFG_VI		0x00000008
     94   1.1   simonb 
     95   1.1   simonb /* "K0" (RW): Kseg0 coherency algorithm.  (values are TLB_ATTRs) */
     96   1.1   simonb #define	MIPSNN_CFG_K0_MASK	0x00000007
     97   1.1   simonb #define	MIPSNN_CFG_K0_SHIFT	0
     98   1.1   simonb 
     99   1.1   simonb 
    100   1.1   simonb /*
    101   1.1   simonb  * Values in Configuration Register 1 (CP0 Register 16, Select 1)
    102   1.1   simonb  */
    103   1.1   simonb 
    104   1.4  gdamore /* M (R): Configuration Register 2 present. */
    105   1.4  gdamore #define	MIPSNN_CFG1_M		0x80000000
    106   1.1   simonb 
    107   1.1   simonb /* MS (R): Number of TLB entries - 1. */
    108   1.1   simonb #define	MIPSNN_CFG1_MS_MASK	0x7e000000
    109   1.1   simonb #define	MIPSNN_CFG1_MS_SHIFT	25
    110   1.1   simonb 
    111   1.1   simonb #define	MIPSNN_CFG1_MS(x)	(MIPSNN_GET(CFG1_MS, (x)) + 1)
    112   1.1   simonb 
    113   1.1   simonb /* "IS" (R): (Primary) I-cache sets per way. */
    114   1.1   simonb #define	MIPSNN_CFG1_IS_MASK	0x01c00000
    115   1.1   simonb #define	MIPSNN_CFG1_IS_SHIFT	22
    116   1.1   simonb 
    117   1.1   simonb #define	MIPSNN_CFG1_IS_RSVD	7		/* rsvd value, otherwise: */
    118   1.1   simonb #define	MIPSNN_CFG1_IS(x)	(64 << MIPSNN_GET(CFG1_IS, (x)))
    119   1.1   simonb 
    120   1.1   simonb /* "IL" (R): (Primary) I-cache line size. */
    121   1.1   simonb #define	MIPSNN_CFG1_IL_MASK	0x00380000
    122   1.1   simonb #define	MIPSNN_CFG1_IL_SHIFT	19
    123   1.1   simonb 
    124   1.1   simonb #define	MIPSNN_CFG1_IL_NONE	0		/* No I-cache, */
    125   1.1   simonb #define	MIPSNN_CFG1_IL_RSVD	7		/* rsvd value, otherwise: */
    126   1.1   simonb #define	MIPSNN_CFG1_IL(x)	(2 << MIPSNN_GET(CFG1_IL, (x)))
    127   1.1   simonb 
    128   1.1   simonb /* "IA" (R): (Primary) I-cache associativity (ways - 1). */
    129   1.1   simonb #define	MIPSNN_CFG1_IA_MASK	0x00070000
    130   1.1   simonb #define	MIPSNN_CFG1_IA_SHIFT	16
    131   1.1   simonb 
    132   1.1   simonb #define	MIPSNN_CFG1_IA(x)	MIPSNN_GET(CFG1_IA, (x))
    133   1.1   simonb 
    134   1.1   simonb /* "DS" (R): (Primary) D-cache sets per way. */
    135   1.1   simonb #define	MIPSNN_CFG1_DS_MASK	0x0000e000
    136   1.1   simonb #define	MIPSNN_CFG1_DS_SHIFT	13
    137   1.1   simonb 
    138   1.1   simonb #define	MIPSNN_CFG1_DS_RSVD	7		/* rsvd value, otherwise: */
    139   1.1   simonb #define	MIPSNN_CFG1_DS(x)	(64 << MIPSNN_GET(CFG1_DS, (x)))
    140   1.1   simonb 
    141   1.1   simonb /* "DL" (R): (Primary) D-cache line size. */
    142   1.1   simonb #define	MIPSNN_CFG1_DL_MASK	0x00001c00
    143   1.1   simonb #define	MIPSNN_CFG1_DL_SHIFT	10
    144   1.1   simonb 
    145   1.1   simonb #define	MIPSNN_CFG1_DL_NONE	0		/* No D-cache, */
    146   1.1   simonb #define	MIPSNN_CFG1_DL_RSVD	7		/* rsvd value, otherwise: */
    147   1.1   simonb #define	MIPSNN_CFG1_DL(x)	(2 << MIPSNN_GET(CFG1_DL, (x)))
    148   1.1   simonb 
    149   1.1   simonb /* "DA" (R): (Primary) D-cache associativity (ways - 1). */
    150   1.1   simonb #define	MIPSNN_CFG1_DA_MASK	0x00000380
    151   1.1   simonb #define	MIPSNN_CFG1_DA_SHIFT	7
    152   1.1   simonb 
    153   1.1   simonb #define	MIPSNN_CFG1_DA(x)	MIPSNN_GET(CFG1_DA, (x))
    154   1.1   simonb 
    155   1.4  gdamore /* "C2" (R): Coprocessor 2 implemented if set. */
    156   1.9   simonb #define	MIPSNN_CFG1_C2		0x00000040
    157   1.4  gdamore 
    158   1.4  gdamore /* "MD" (R): MDMX ASE implemented if set. */
    159   1.9   simonb #define	MIPSNN_CFG1_MD		0x00000020
    160   1.1   simonb 
    161   1.1   simonb /* "PC" (R): Performance Counters implemented if set. */
    162   1.1   simonb #define	MIPSNN_CFG1_PC		0x00000010
    163   1.1   simonb 
    164   1.1   simonb /* "WR" (R): Watch registers implemented if set. */
    165   1.1   simonb #define	MIPSNN_CFG1_WR		0x00000008
    166   1.1   simonb 
    167   1.1   simonb /* "CA" (R): Code compressiong (MIPS16) implemented if set. */
    168   1.1   simonb #define	MIPSNN_CFG1_CA		0x00000004
    169   1.1   simonb 
    170   1.1   simonb /* "EP" (R): EJTAG implemented if set. */
    171   1.1   simonb #define	MIPSNN_CFG1_EP		0x00000002
    172   1.1   simonb 
    173   1.1   simonb /* "FP" (R): FPU implemented if set. */
    174   1.1   simonb #define	MIPSNN_CFG1_FP		0x00000001
    175   1.4  gdamore 
    176   1.4  gdamore /*
    177   1.4  gdamore  * Values in Configuration Register 2 (CP0 Register 16, Select 2)
    178   1.4  gdamore  */
    179   1.4  gdamore 
    180   1.4  gdamore /* "M" (R): Configuration Register 3 present. */
    181   1.4  gdamore #define	MIPSNN_CFG2_M		0x80000000
    182   1.4  gdamore 
    183   1.4  gdamore /* "TU" (RW): Implementation specific tertiary cache status and control. */
    184   1.4  gdamore #define	MIPSNN_CFG2_TU_MASK	0x70000000
    185   1.4  gdamore #define	MIPSNN_CFG2_TU_SHIFT	28
    186   1.4  gdamore 
    187   1.4  gdamore /* "TS" (R): Tertiary cache sets per way. */
    188   1.4  gdamore #define	MIPSNN_CFG2_TS_MASK	0x07000000
    189   1.4  gdamore #define	MIPSNN_CFG2_TS_SHIFT	24
    190   1.4  gdamore 
    191   1.4  gdamore #define	MIPSNN_CFG2_TS(x)	(64 << MIPSNN_GET(CFG2_TS, (x)))
    192   1.4  gdamore 
    193   1.4  gdamore /* "TL" (R): Tertiary cache line size. */
    194   1.4  gdamore #define	MIPSNN_CFG2_TL_MASK	0x00700000
    195   1.4  gdamore #define	MIPSNN_CFG2_TL_SHIFT	20
    196   1.4  gdamore 
    197   1.4  gdamore #define	MIPSNN_CFG2_TL_NONE	0		/* No Tertiary cache */
    198   1.4  gdamore #define	MIPSNN_CFG2_TL(x)	(2 << MIPSNN_GET(CFG2_TL, (x)))
    199   1.4  gdamore 
    200   1.4  gdamore /* "TA" (R): Tertiary cache associativity (ways - 1). */
    201   1.4  gdamore #define	MIPSNN_CFG2_TA_MASK	0x00070000
    202   1.4  gdamore #define	MIPSNN_CFG2_TA_SHIFT	16
    203   1.4  gdamore 
    204   1.4  gdamore #define	MIPSNN_CFG2_TA(x)	MIPSNN_GET(CFG2_TA, (x))
    205   1.4  gdamore 
    206   1.4  gdamore /* "SU" (RW): Implementation specific secondary cache status and control. */
    207   1.4  gdamore #define	MIPSNN_CFG2_SU_MASK	0x0000f000
    208   1.4  gdamore #define	MIPSNN_CFG2_SU_SHIFT	12
    209   1.4  gdamore 
    210   1.4  gdamore /* "SS" (R): Secondary cache sets per way. */
    211   1.4  gdamore #define	MIPSNN_CFG2_SS_MASK	0x00000700
    212   1.4  gdamore #define	MIPSNN_CFG2_SS_SHIFT	8
    213   1.4  gdamore 
    214   1.4  gdamore #define	MIPSNN_CFG2_SS(x)	(64 << MIPSNN_GET(CFG2_SS, (x)))
    215   1.4  gdamore 
    216   1.4  gdamore /* "SL" (R): Secdonary cache line size. */
    217   1.4  gdamore #define	MIPSNN_CFG2_SL_MASK	0x00000070
    218   1.4  gdamore #define	MIPSNN_CFG2_SL_SHIFT	4
    219   1.4  gdamore 
    220   1.4  gdamore #define	MIPSNN_CFG2_SL_NONE	0		/* No Secondary cache */
    221   1.4  gdamore #define	MIPSNN_CFG2_SL(x)	(2 << MIPSNN_GET(CFG2_SL, (x)))
    222   1.4  gdamore 
    223   1.4  gdamore /* "SA" (R): Secondary cache associativity (ways - 1). */
    224   1.4  gdamore #define	MIPSNN_CFG2_SA_MASK	0x00000007
    225   1.4  gdamore #define	MIPSNN_CFG2_SA_SHIFT	0
    226   1.4  gdamore 
    227   1.4  gdamore #define	MIPSNN_CFG2_SA(x)	MIPSNN_GET(CFG2_SA, (x))
    228   1.4  gdamore 
    229   1.4  gdamore /*
    230   1.4  gdamore  * Values in Configuration Register 3 (CP0 Register 16, Select 3)
    231   1.4  gdamore  */
    232   1.4  gdamore 
    233   1.4  gdamore /* "M" (R): Configuration Register 4 present. */
    234   1.4  gdamore #define	MIPSNN_CFG3_M		0x80000000
    235   1.4  gdamore 
    236   1.6     matt /* "BPG" (R): Big Pages feature is implemented (PageMask is 64-bits wide). */
    237   1.6     matt #define	MIPSNN_CFG3_BPG		0x40000000
    238   1.6     matt 
    239   1.6     matt /* "CMGCR" (R): Coherency Manager memory-mapped Global Configuration Register Space is implemented. */
    240   1.6     matt #define	MIPSNN_CFG3_CMGCR	0x20000000
    241   1.6     matt 
    242   1.6     matt /* "IPLW" (R): Width of Status[IPL] and Cause[RIPL] fields. */
    243   1.6     matt #define	MIPSNN_CFG3_IPLW_MASK	0x00600000
    244   1.6     matt #define	MIPSNN_CFG3_IPLW_SHIFT	21
    245   1.6     matt 
    246   1.6     matt #define	MIPSNN_CFG3_IPLW_6BITS	0	/* IPL and RIPL fields are 6-bits in width. */
    247   1.6     matt #define	MIPSNN_CFG3_IPLW_8BITS	1	/* IPL and RIPL fields are 8-bits in width. */
    248   1.6     matt //	reserved		other values
    249   1.6     matt 
    250   1.6     matt #define	MIPSNN_CFG3_MMAR_MASK	0x001c0000
    251   1.6     matt #define	MIPSNN_CFG3_MMAR_SHIFT	18
    252   1.6     matt 
    253   1.6     matt #define	MIPSNN_CFG3_MMAR_REV1	0		/* Revision 1 */
    254   1.6     matt //	reserved		other values
    255   1.6     matt 
    256   1.6     matt /* "MCU" (R): MCU ASE extension present. */
    257   1.6     matt #define	MIPSNN_CFG3_MCU		0x00020000
    258   1.6     matt 
    259  1.10   simonb /* "ISAOnExc" (R/RW): ISA used on exception. */
    260   1.6     matt #define	MIPSNN_CFG3_ISAOnExc	0x00010000	/* microMIPS used on entrance to exception vector */
    261   1.6     matt 
    262   1.6     matt /* "ISA" (R): Instruction Set Availability. */
    263   1.6     matt #define	MIPSNN_CFG3_ISA_MASK	0x0000c000
    264   1.6     matt #define	MIPSNN_CFG3_ISA_SHIFT	14
    265   1.6     matt 
    266   1.6     matt #define	MIPSNN_CFG3_ISA_MIPS64		0	/* only MIPS64 */
    267   1.6     matt #define	MIPSNN_CFG3_ISA_microMIPS64	1	/* only microMIPS64 */
    268   1.6     matt #define	MIPSNN_CFG3_ISA_MIPS64_OOR	2	/* both, MIPS64 out of reset */
    269   1.6     matt #define	MIPSNN_CFG3_ISA_microMIPS64_OOR	3	/* both, microMIPS64 OOR */
    270   1.6     matt 
    271   1.8   simonb /* "ULRI" (R): UserLocal register is implemented. */
    272   1.8   simonb #define	MIPSNN_CFG3_ULRI	0x00002000
    273   1.8   simonb 
    274   1.5     matt /* "DSP2P" (R): DSP v2 ASE extension present. */
    275   1.5     matt #define	MIPSNN_CFG3_DSP2P	0x00000800
    276   1.5     matt 
    277   1.5     matt /* "DSPP" (R): DSP ASE extension present. */
    278   1.4  gdamore #define	MIPSNN_CFG3_DSPP	0x00000400
    279   1.4  gdamore 
    280   1.4  gdamore /* "LPA" (R): Large physical addresses implemented. (MIPS64 rev 2 only). */
    281   1.4  gdamore #define	MIPSNN_CFG3_LPA		0x00000080
    282   1.4  gdamore 
    283   1.4  gdamore /* "VEIC" (R): External interrupt controller present. (rev 2 only). */
    284   1.4  gdamore #define	MIPSNN_CFG3_VEIC	0x00000040
    285   1.4  gdamore 
    286   1.4  gdamore /* "VINT" (R): Vectored interrupts implemented. (rev 2 only). */
    287   1.4  gdamore #define	MIPSNN_CFG3_VINT	0x00000020
    288   1.4  gdamore 
    289   1.4  gdamore /* "SP" (R): Small (1K) page support implemented. (rev 2 only). */
    290   1.4  gdamore #define	MIPSNN_CFG3_SP		0x00000010
    291   1.4  gdamore 
    292   1.4  gdamore /* "MT" (R): MT ASE extension implemented. */
    293   1.4  gdamore #define	MIPSNN_CFG3_MT		0x00000004
    294   1.4  gdamore 
    295   1.4  gdamore /* "SM" (R): SmartMIPS ASE extension implemented. */
    296   1.4  gdamore #define	MIPSNN_CFG3_SM		0x00000002
    297   1.4  gdamore 
    298   1.4  gdamore /* "TL" (R): Trace Logic implemented. */
    299   1.4  gdamore #define	MIPSNN_CFG3_TL		0x00000001
    300   1.6     matt 
    301   1.6     matt /*
    302  1.10   simonb  * Values in Configuration Register 4 (CP0 Register 16, Select 4)
    303  1.10   simonb  */
    304  1.10   simonb 
    305  1.10   simonb /* "M" (R): Configuration Register 5 present. */
    306  1.10   simonb #define	MIPSNN_CFG4_M					__BIT(31)
    307  1.10   simonb 
    308  1.10   simonb /* "IE" (R): TLB invalidate instruction support/configuration. */
    309  1.10   simonb #define	MIPSNN_CFG4_IE					__BITS(30,29)
    310  1.10   simonb 
    311  1.10   simonb /* "AE" (R): Extend EntryHi[ASID] to 10 bits. */
    312  1.10   simonb #define	MIPSNN_CFG4_AE					__BIT(28)
    313  1.10   simonb 
    314  1.10   simonb /* "VTLBSizeExt" (R): TLB invalidate instruction support/configuration. */
    315  1.10   simonb #define	MIPSNN_CFG4_VTLB_SE				__BITS(27,24)
    316  1.10   simonb 
    317  1.10   simonb /* "KScrExist" (R): Number of kernel mode scratch registers available. */
    318  1.10   simonb #define	MIPSNN_CFG4_KSCR_EXIST				__BITS(23,16)
    319  1.10   simonb 
    320  1.10   simonb /* "MMUExtDef" (R): MMU extension definition. */
    321  1.10   simonb #define	MIPSNN_CFG4_MMU_EXT_DEF				__BITS(15,14)
    322  1.10   simonb #define	  MIPSNN_CFG4_MMU_EXT_DEF_MMU			  1
    323  1.10   simonb #define	  MIPSNN_CFG4_MMU_EXT_DEF_FLTB			  2
    324  1.10   simonb #define	  MIPSNN_CFG4_MMU_EXT_DEF_VTLB			  3
    325  1.10   simonb 
    326  1.10   simonb /* "MMUSizeExt" (R): Extension of Config1[MMUSize-1] field. */
    327  1.11   simonb #define	MIPSNN_CFG4_MMU_SIZE_EXT		__BITS(7,0)
    328  1.10   simonb 
    329  1.10   simonb /* "FTLBPageSize" (R/RW): Indicates the Page Size of the FTLB Array Entries. */
    330  1.10   simonb #define	MIPSNN_CFG4_FTLB_FTLB_PAGE_SIZE		__BITS(10,8)
    331  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_PAGE_SIZE_1K	  0
    332  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_PAGE_SIZE_4K	  1
    333  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_PAGE_SIZE_16K	  2
    334  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_PAGE_SIZE_64K	  3
    335  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_PAGE_SIZE_256K	  4
    336  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_PAGE_SIZE_1G	  5
    337  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_PAGE_SIZE_4G	  6
    338  1.10   simonb /* "FTLBWays" (R): Indicates the Set Associativity of the FTLB Array. */
    339  1.10   simonb #define	MIPSNN_CFG4_FTLB_FTLB_WAYS		__BITS(7,4)
    340  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_WAYS_2		  0
    341  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_WAYS_3		  1
    342  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_WAYS_4		  2
    343  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_WAYS_5		  3
    344  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_WAYS_6		  4
    345  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_WAYS_7		  5
    346  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_WAYS_8		  6
    347  1.10   simonb /* "FTLBSets" (R): Indicates the number of Set per Way within the FTLB Array. */
    348  1.10   simonb #define	MIPSNN_CFG4_FTLB_FTLB_SETS		__BITS(3,0)
    349  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_1		  0
    350  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_2		  1
    351  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_4		  2
    352  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_8		  3
    353  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_16		  4
    354  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_32		  5
    355  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_64		  6
    356  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_128	  7
    357  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_256	  8
    358  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_512	  9
    359  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_1024	  10
    360  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_2048	  11
    361  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_4096	  12
    362  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_8192	  13
    363  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_16384	  14
    364  1.10   simonb #define	  MIPSNN_CFG4_FTLB_FTLB_SETS_32768	  15
    365  1.10   simonb 
    366  1.10   simonb /* "MMUSizeExt" (R): Extension of Config1[MMUSize-1] field. */
    367  1.10   simonb #define	MIPSNN_CFG4_FVTLB_VTLB_SIZE_EXT		__BITS(27,24)
    368  1.10   simonb /* "FTLBPageSize" (R/RW): Indicates the Page Size of the FTLB Array Entries. */
    369  1.10   simonb #define	MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE	__BITS(12,8)
    370  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_1K	  0
    371  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_4K	  1
    372  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_16K	  2
    373  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_64K	  3
    374  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_256K	  4
    375  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_1M	  5
    376  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_4M	  6
    377  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_16M	  7
    378  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_64M	  8
    379  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_256M	  9
    380  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_1G	  10
    381  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_4G	  11
    382  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_16G	  12
    383  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_64G	  13
    384  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_256G	  14
    385  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_1T	  15
    386  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_4T	  16
    387  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_16T	  17
    388  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_64T	  18
    389  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_PAGE_SIZE_256T	  19
    390  1.10   simonb /* "FTLBWays" (R): Indicates the Set Associativity of the FTLB Array. */
    391  1.10   simonb #define	MIPSNN_CFG4_FVTLB_FTLB_WAYS		__BITS(7,4)
    392  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_WAYS_2		  0
    393  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_WAYS_3		  1
    394  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_WAYS_4		  2
    395  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_WAYS_5		  3
    396  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_WAYS_6		  4
    397  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_WAYS_7		  5
    398  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_WAYS_8		  6
    399  1.10   simonb /* "FTLBSets" (R): Indicates the number of Set per Way within the FTLB Array. */
    400  1.10   simonb #define	MIPSNN_CFG4_FVTLB_FTLB_SETS		__BITS(3,0)
    401  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_1		  0
    402  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_2		  1
    403  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_4		  2
    404  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_8		  3
    405  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_16	  4
    406  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_32	  5
    407  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_64	  6
    408  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_128	  7
    409  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_256	  8
    410  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_512	  9
    411  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_1024	  10
    412  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_2048	  11
    413  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_4096	  12
    414  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_8192	  13
    415  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_16384	  14
    416  1.10   simonb #define	  MIPSNN_CFG4_FVTLB_FTLB_SETS_32768	  15
    417  1.10   simonb 
    418  1.10   simonb 
    419  1.10   simonb /*
    420  1.10   simonb  * Values in Configuration Register 5 (CP0 Register 16, Select 5)
    421  1.10   simonb  */
    422  1.10   simonb 
    423  1.10   simonb /* "M" (R): Reserved for undefined configuration present. */
    424  1.10   simonb #define	MIPSNN_CFG5_M					__BIT(31)
    425  1.10   simonb 
    426  1.10   simonb /* "K" (RW): Enable/disable Config K0/Ku/K23 if segmentation is implemented. */
    427  1.10   simonb #define	MIPSNN_CFG5_K					__BIT(30)
    428  1.10   simonb 
    429  1.10   simonb /* "CV" (RW): Cache Error Exception Vector control disable. */
    430  1.10   simonb #define	MIPSNN_CFG5_CV					__BIT(29)
    431  1.10   simonb 
    432  1.10   simonb /* "EVA" (R): Enhanced Virtual Addressing instructions implemented. */
    433  1.10   simonb #define	MIPSNN_CFG5_EVA					__BIT(28)
    434  1.10   simonb 
    435  1.10   simonb /* "MSAEn" (RW): MIPS SIMD Architecture (MSA) enable. */
    436  1.10   simonb #define	MIPSNN_CFG5_MSAEn				__BIT(27)
    437  1.10   simonb 
    438  1.10   simonb /* "XNP" (R): Extended LL/SC instructions non present. */
    439  1.10   simonb #define	MIPSNN_CFG5_XNP					__BIT(13)
    440  1.10   simonb 
    441  1.10   simonb /* "DEC" (R): Dual Endian Capability. */
    442  1.10   simonb #define	MIPSNN_CFG5_DEC					__BIT(11)
    443  1.10   simonb 
    444  1.10   simonb /* "L2C" (R): Indicates presense of COP0 Config2. */
    445  1.10   simonb #define	MIPSNN_CFG5_L2C					__BIT(10)
    446  1.10   simonb 
    447  1.10   simonb /* "UFE" (RW): Enable for user mode access to Config5[FRE]. */
    448  1.10   simonb #define	MIPSNN_CFG5_UFE					__BIT(9)
    449  1.10   simonb 
    450  1.10   simonb /* "FRE" (RW): Enable for user mode to emulate Status[FR]=0 handling. */
    451  1.10   simonb #define	MIPSNN_CFG5_FRE					__BIT(8)
    452  1.10   simonb 
    453  1.10   simonb /* "VP" (R): Virtual Processor - multi-threading features supported. */
    454  1.10   simonb #define	MIPSNN_CFG5_VP					__BIT(7)
    455  1.10   simonb 
    456  1.10   simonb /* "SBRI" (RW): SDBBP instruction Reserved Instruction control. */
    457  1.10   simonb #define	MIPSNN_CFG5_SBRI				__BIT(6)
    458  1.10   simonb 
    459  1.10   simonb /* "MVH" (R): Move To/From High COP0 (MTHCO/MFHCO) instructions implemented. */
    460  1.10   simonb #define	MIPSNN_CFG5_MVH					__BIT(5)
    461  1.10   simonb 
    462  1.10   simonb /* "LLB" (R): Load-Linked Bit (LLB) is present in COP0 LLAddr. */
    463  1.10   simonb #define	MIPSNN_CFG5_LLB					__BIT(4)
    464  1.10   simonb 
    465  1.14   andvar /* "MRP" (R): COP0 Memory Accessibility Attributes Registers are present. */
    466  1.10   simonb #define	MIPSNN_CFG5_MRP					__BIT(3)
    467  1.10   simonb 
    468  1.10   simonb /* "UFR" (R): Allows user-mode access to Status[FR] using CTC1/CFC1. */
    469  1.10   simonb #define	MIPSNN_CFG5_UFR					__BIT(2)
    470  1.10   simonb 
    471  1.10   simonb /* "NFExists" (R): Nested Fault feature exists. */
    472  1.10   simonb #define	MIPSNN_CFG5_NF_EXISTS				__BIT(0)
    473  1.10   simonb 
    474  1.10   simonb 
    475  1.10   simonb /*
    476  1.12   simonb  * Values in PerfCntCrl Register (CP0 Register 25, Selects 0, 2, 4, 6)
    477  1.12   simonb  */
    478  1.12   simonb 
    479  1.12   simonb /* "M" (R): next PerCntCtl register present. */
    480  1.12   simonb #define	MIPSNN_PERFCTL_M				__BIT(31)
    481  1.12   simonb 
    482  1.12   simonb /* "W" (R): Width - is a 64-bit counter. */
    483  1.12   simonb #define	MIPSNN_PERFCTL_W				__BIT(30)
    484  1.12   simonb 
    485  1.12   simonb /* "Impl" (RAZ): Impl - implementation dependent field. */
    486  1.12   simonb #define	MIPSNN_PERFCTL_IMPL				__BITS(29,25)
    487  1.12   simonb 
    488  1.12   simonb /* "EC" (Z): Reserved for Virtualisation Mode. */
    489  1.12   simonb #define	MIPSNN_PERFCTL_EC				__BITS(24,23)
    490  1.12   simonb 
    491  1.12   simonb /* "PCTD" (RW): Performance Counter Trace Disable. */
    492  1.12   simonb #define	MIPSNN_PERFCTL_PCTD				__BIT(15)
    493  1.12   simonb 
    494  1.12   simonb /*
    495  1.12   simonb  * "EVENT" (RW): Event number.  Note: The MIPS32/MIPS64 PRA specs define
    496  1.12   simonb  * EventExt from 14:11 and Event from 10:5.  For ease of use, we define a
    497  1.12   simonb  * single 10 bit Event field.
    498  1.12   simonb  */
    499  1.12   simonb #define	MIPSNN_PERFCTL_EVENT				__BITS(14,5)
    500  1.12   simonb 
    501  1.12   simonb /* "IE" (RW): Interrupt Enable. */
    502  1.12   simonb #define	MIPSNN_PERFCTL_IE				__BIT(4)
    503  1.12   simonb 
    504  1.12   simonb /* "U" (RW): Enables event counting in user mode. */
    505  1.12   simonb #define	MIPSNN_PERFCTL_U				__BIT(3)
    506  1.12   simonb 
    507  1.12   simonb /* "S" (RW): Enables event counting in supervisor mode. */
    508  1.12   simonb #define	MIPSNN_PERFCTL_S				__BIT(2)
    509  1.12   simonb 
    510  1.12   simonb /* "K" (RW): Enables event counting in kernel mode. */
    511  1.12   simonb #define	MIPSNN_PERFCTL_K				__BIT(1)
    512  1.12   simonb 
    513  1.12   simonb /* "EXL" (RW): Enables event counting when EXL bit in Status is one. */
    514  1.12   simonb #define	MIPSNN_PERFCTL_EXL				__BIT(0)
    515  1.12   simonb 
    516  1.12   simonb 
    517  1.12   simonb /*
    518   1.6     matt  * Values in Configuration Register 6 (CP0 Register 16, Select 6)
    519   1.6     matt  * for RMI XLP processors
    520   1.6     matt  */
    521   1.6     matt 
    522   1.6     matt /* "CTLB_SIZE" (R): Number of Combined TLB entries - 1. */
    523   1.9   simonb #define	MIPSNN_RMIXLP_CFG6_CTLB_SIZE_MASK	0xffff0000
    524   1.9   simonb #define	MIPSNN_RMIXLP_CFG6_CTLB_SIZE_SHIFT	16
    525   1.6     matt 
    526   1.6     matt /* "VTLB_SIZE" (R): Number of Variable TLB entries - 1. */
    527   1.9   simonb #define	MIPSNN_RMIXLP_CFG6_VTLB_SIZE_MASK	0x0000ffc0
    528   1.9   simonb #define	MIPSNN_RMIXLP_CFG6_VTLB_SIZE_SHIFT	6
    529   1.6     matt 
    530   1.6     matt /* "ELVT" (RW): Enable Large Variable TLB. */
    531   1.9   simonb #define	MIPSNN_RMIXLP_CFG6_ELVT			0x00000020
    532   1.6     matt 
    533   1.6     matt /* "EPW" (RW): Enable PageWalker. */
    534   1.9   simonb #define	MIPSNN_RMIXLP_CFG6_EPW			0x00000008
    535   1.6     matt 
    536   1.6     matt /* "EFT" (RW): Enable Fixed TLB. */
    537   1.9   simonb #define	MIPSNN_RMIXLP_CFG6_EFT			0x00000004
    538   1.6     matt 
    539   1.6     matt /* "PWI" (R): PageWalker implemented. */
    540   1.9   simonb #define	MIPSNN_RMIXLP_CFG6_PWI			0x00000001
    541   1.6     matt 
    542   1.6     matt /* "FTI" (R): Fixed TLB implemented. */
    543   1.9   simonb #define	MIPSNN_RMIXLP_CFG6_FTI			0x00000001
    544   1.6     matt 
    545   1.6     matt /*
    546   1.6     matt  * Values in Configuration Register 7 (CP0 Register 16, Select 7)
    547   1.6     matt  * for RMI XLP processors
    548   1.6     matt  */
    549   1.6     matt 
    550   1.6     matt /* "LG" (RW): Small or Large Page. */
    551   1.9   simonb #define	MIPSNN_RMIXLP_CFG7_LG_MASK	__BIT(61)
    552   1.6     matt 
    553   1.6     matt /* "MASKLG" (RW): large page size supported in CAM only. */
    554   1.9   simonb #define	MIPSNN_RMIXLP_CFG7_MASKLG_MASK	0x0000ff00
    555   1.9   simonb #define	MIPSNN_RMIXLP_CFG7_MASKLG_SHIFT	8
    556   1.6     matt 
    557   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKLG_4KB	(0xff >> 8)
    558   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKLG_16KB	(0xff >> 7)
    559   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKLG_64KB	(0xff >> 6)
    560   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKLG_256KB	(0xff >> 5)
    561   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKLG_1MB	(0xff >> 4)
    562   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKLG_4MB	(0xff >> 3)
    563   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKLG_16MB	(0xff >> 2)
    564   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKLG_64MB	(0xff >> 1)
    565   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKLG_256MB	(0xff >> 0)
    566   1.6     matt 
    567   1.6     matt /* "MASKSM" (RW): small page size supported in CAM/RAM. */
    568   1.9   simonb #define	MIPSNN_RMIXLP_CFG7_MASKSM_MASK	0x000000ff
    569   1.9   simonb #define	MIPSNN_RMIXLP_CFG7_MASKSM_SHIFT	0
    570   1.6     matt 
    571   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKSM_4KB	(0xff >> 8)
    572   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKSM_16KB	(0xff >> 7)
    573   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKSM_64KB	(0xff >> 6)
    574   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKSM_256KB	(0xff >> 5)
    575   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKSM_1MB	(0xff >> 4)
    576   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKSM_4MB	(0xff >> 3)
    577   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKSM_16MB	(0xff >> 2)
    578   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKSM_64MB	(0xff >> 1)
    579   1.6     matt #define	MIPSNN_RMIXLP_CFG7_MASKSM_256MB	(0xff >> 0)
    580   1.6     matt 
    581  1.10   simonb 
    582   1.6     matt /*
    583   1.6     matt  * Values in Configuration Register 6 (CP0 Register 16, Select 6)
    584   1.6     matt  * for the MTI 74K and 1074K cores.
    585   1.6     matt  */
    586   1.6     matt /* "SPCD" (R/W): Sleep state Perforance Counter Disable. */
    587   1.9   simonb #define	MIPSNN_MTI_CFG6_SPCD		__BIT(14)
    588   1.6     matt 
    589   1.6     matt /* "SYND" (R/W): SYNonym tag update Disable. */
    590   1.9   simonb #define	MIPSNN_MTI_CFG6_SYND		__BIT(13)
    591   1.6     matt 
    592   1.6     matt /* "IFUPerfCtl" (R/W): IFU Performance Control. */
    593   1.9   simonb #define	MIPSNN_MTI_CFG6_IFU_PERF_CTL_MASK			__BIT(12:10)
    594   1.9   simonb #define	MIPSNN_MTI_CFG6_IFU_PERF_CTL_STALL			0
    595   1.9   simonb #define	MIPSNN_MTI_CFG6_IFU_PERF_CTL_JUMP			1
    596   1.9   simonb #define	MIPSNN_MTI_CFG6_IFU_PERF_CTL_STALLED_INSN		2
    597   1.9   simonb #define	MIPSNN_MTI_CFG6_IFU_PERF_CTL_CACHE_MISPREDICTION	3
    598   1.9   simonb #define	MIPSNN_MTI_CFG6_IFU_PERF_CTL_CACHE_PREDICTION		4
    599   1.9   simonb #define	MIPSNN_MTI_CFG6_IFU_PERF_CTL_BAD_JR_CACHE_ENTRY		5
    600   1.9   simonb #define	MIPSNN_MTI_CFG6_IFU_PERF_CTL_UNIMPL			6
    601   1.9   simonb #define	MIPSNN_MTI_CFG6_IFU_PERF_CTL_CBRACH_TAKEN		7
    602   1.6     matt 
    603   1.6     matt /* "NMRUP" (R): Most Recently Used JTLB Replacement scheme Present. */
    604   1.9   simonb #define	MIPSNN_MTI_CFG6_NMRUP		__BIT(9)	/* 1: implemented */
    605   1.6     matt 
    606   1.6     matt /* "NMRUD" (R/W): NMRU Disable. */
    607   1.9   simonb #define	MIPSNN_MTI_CFG6_NMRUD		__BIT(8)	/* 1: TLBWR is random */
    608   1.6     matt 
    609   1.6     matt /* "JRCP" (R): JR Cache Present. */
    610   1.9   simonb #define	MIPSNN_MTI_CFG6_JRCP		__BIT(1)	/* 1: implemented */
    611   1.6     matt 
    612   1.6     matt /* "JRCD" (R/W): JR Cache prediction Disable. */
    613   1.9   simonb #define	MIPSNN_MTI_CFG6_JRCD		__BIT(0)	/* 1: disabled */
    614   1.6     matt 
    615   1.6     matt 
    616   1.6     matt /*
    617   1.6     matt  * Values in Configuration Register 7 (CP0 Register 16, Select 7)
    618   1.6     matt  * for the MTI 24K, 34K, 74K, 1004K, and 1074K cores
    619   1.6     matt  */
    620   1.6     matt 
    621   1.6     matt /* "WII" (R): Wait IE Ignore. */
    622   1.9   simonb #define	MIPSNN_MTI_CFG7_WII		__BIT(31)
    623   1.6     matt 
    624   1.6     matt /* "FPFS" (R/W): Fast Prepare For Store (74K, 1074K) */
    625   1.9   simonb #define	MIPSNN_MTI_CFG7_FPFS		__BIT(30)
    626   1.6     matt 
    627   1.6     matt /* "IHB" (R/W): Implicit HB (74K, 1074K) */
    628   1.9   simonb #define	MIPSNN_MTI_CFG7_IHB		__BIT(29)
    629   1.6     matt 
    630   1.6     matt /* "FPR1" (R): Float Point Ratio 1 (74K, 1074K). */
    631   1.9   simonb #define	MIPSNN_MTI_CFG7_FPR1		__BIT(28)	/* 1: 3:2 */
    632   1.6     matt 
    633   1.6     matt /* "SEHB" (R/W): slow EHB (74K, 1074K) */
    634   1.9   simonb #define	MIPSNN_MTI_CFG7_SEHB		__BIT(27)
    635   1.6     matt 
    636   1.6     matt /* "CP2IO" (R/W): Force COP2 data to be in-order (74K, 1074K) */
    637   1.9   simonb #define	MIPSNN_MTI_CFG7_CP2IO		__BIT(26)
    638   1.6     matt 
    639   1.6     matt /* "IAGN" (R/W): Issue LSU-side instructions in program order (74K, 1074K) */
    640   1.9   simonb #define	MIPSNN_MTI_CFG7_IAGN		__BIT(25)
    641   1.6     matt 
    642   1.6     matt /* "IAGN" (R/W): Issue LSU-side instructions in program order (74K, 1074K) */
    643   1.9   simonb #define	MIPSNN_MTI_CFG7_IAGN		__BIT(25)
    644   1.6     matt 
    645   1.6     matt /* "IALU" (R/W): Issue ALU-side instructions in program order (74K, 1074K) */
    646   1.9   simonb #define	MIPSNN_MTI_CFG7_IALU		__BIT(24)
    647   1.6     matt 
    648   1.6     matt /* "DGHR" (R/W): disable global history in branch prediction (74K, 1074K). */
    649   1.9   simonb #define	MIPSNN_MTI_CFG7_DGHR		__BIT(23)	/* 1: disable */
    650   1.6     matt 
    651   1.6     matt /* "SG" (R/W): Single Graduation per cycle (74K, 1074K). */
    652   1.9   simonb #define	MIPSNN_MTI_CFG7_SG		__BIT(22)	/* 1: no superscalar */
    653   1.6     matt 
    654   1.6     matt /* "SUI" (R/W): Strict Uncached Instruction (SUI) policy control (74K, 1074K). */
    655   1.9   simonb #define	MIPSNN_MTI_CFG7_SUI		__BIT(21)
    656   1.6     matt 
    657   1.6     matt /* "NCWB" (R/W): Non-Choerent WriteBack (1004K). */
    658   1.9   simonb #define	MIPSNN_MTI_CFG7_NCWB		__BIT(20)
    659   1.6     matt 
    660   1.6     matt /* "PCT" (R): Performance Counters per TC (34K, 1004K). */
    661   1.9   simonb #define	MIPSNN_MTI_CFG7_PCT		__BIT(19)
    662   1.6     matt 
    663   1.6     matt /* "HCI" (R): Hardware Cache Initialization. */
    664   1.9   simonb #define	MIPSNN_MTI_CFG7_HCI		__BIT(18)
    665   1.6     matt 
    666   1.6     matt /* "FPR" (R): Float Point Ratio. */
    667   1.9   simonb #define	MIPSNN_MTI_CFG7_FPR0		__BIT(17)	/* 1: half speed */
    668   1.6     matt 
    669   1.6     matt #define	MIPSNN_MTI_CFG7_FPR_MASK	(MIPSNN_MTI_CFG7_FPR1|MIPSNN_MTI_CFG7_FPR0)
    670   1.6     matt #define	MIPSNN_MTI_CFG7_FPR_SHIFT	0
    671   1.6     matt #define	MIPSNN_MTI_CFG7_FPR_1to1	0
    672   1.6     matt #define	MIPSNN_MTI_CFG7_FPR_2to1	MIPSNN_MTI_CFG7_FPR0
    673   1.6     matt #define	MIPSNN_MTI_CFG7_FPR_3to2	MIPSNN_MTI_CFG7_FPR1
    674   1.6     matt #define	MIPSNN_MTI_CFG7_FPR_RESERVED	MIPSNN_MTI_CFG7_FPR_MASK
    675   1.6     matt 
    676   1.6     matt /* "AR" (R): Alias Removal. */
    677   1.9   simonb #define	MIPSNN_MTI_CFG7_AR		__BIT(16)	/* 1: no virt aliases */
    678   1.6     matt 
    679   1.6     matt /* "PREF" (R/W): Instruction Prefetching (74K, 1074K). */
    680  1.13   simonb #define	MIPSNN_MTI_CFG7_PREF_MASK	__BITS(12,11)
    681   1.6     matt #define	MIPSNN_MTI_CFG7_PREF_SHIFT	11
    682   1.6     matt #define	MIPSNN_MTI_CFG7_PREF_DISABLE	0
    683   1.6     matt #define	MIPSNN_MTI_CFG7_PREF_ONELINE	1
    684   1.6     matt #define	MIPSNN_MTI_CFG7_PREF_RESERVED	2
    685   1.6     matt #define	MIPSNN_MTI_CFG7_PREF_TWOLINES	3
    686   1.6     matt 
    687   1.6     matt /* "IAR" (R): Instruction Alias Removal. */
    688   1.9   simonb #define	MIPSNN_MTI_CFG7_IAR		__BIT(10)	/* 1: no virt aliases */
    689   1.6     matt 
    690   1.6     matt /* "IVA" (R or RW): Instruction Virtual Alias fix disable. */
    691   1.9   simonb #define	MIPSNN_MTI_CFG7_IVA		__BIT(9)	/* 1: fix disable */
    692   1.6     matt 
    693   1.6     matt /* "ES" (RW): External Sync. */
    694   1.9   simonb #define	MIPSNN_MTI_CFG7_ES		__BIT(8)
    695   1.6     matt 
    696   1.6     matt /* "BTLM" (RW): Block TC on Load Miss. */
    697   1.9   simonb #define	MIPSNN_MTI_CFG7_BTLM		__BIT(7)
    698   1.6     matt 
    699   1.6     matt /* "CPOOO" (RW): Out-Of-Order on Coprocessor interfaces (COP0/COP1). */
    700   1.9   simonb #define	MIPSNN_MTI_CFG7_CPOOO		__BIT(6)	/* 1: disable OOO */
    701   1.6     matt 
    702   1.6     matt /* "NBLSU" (RW): Non-Blocking LSU. (24K, 34K) */
    703   1.9   simonb #define	MIPSNN_MTI_CFG7_NBLSU		__BIT(5)	/* 1: stalls pipeline */
    704   1.6     matt 
    705   1.6     matt /* "UBL" (RW): Uncached Loads Blocking. */
    706   1.9   simonb #define	MIPSNN_MTI_CFG7_UBL		__BIT(4)	/* 1: blocking loads */
    707   1.6     matt 
    708   1.6     matt /* "BP" (RW): Branch Prediction. */
    709   1.9   simonb #define	MIPSNN_MTI_CFG7_BP		__BIT(3)	/* 1: disabled */
    710   1.6     matt 
    711   1.6     matt /* "RPS" (RW): Return Prediction Stack. */
    712   1.9   simonb #define	MIPSNN_MTI_CFG7_RPS		__BIT(2)	/* 1: disabled */
    713   1.6     matt 
    714   1.6     matt /* "BHT" (RW): Branch History Table. */
    715   1.9   simonb #define	MIPSNN_MTI_CFG7_BHT		__BIT(1)	/* 1: disabled */
    716   1.6     matt 
    717   1.6     matt /* "SL" (RW): Scheduled Loads. */
    718   1.9   simonb #define	MIPSNN_MTI_CFG7_SL		__BIT(0)	/* 1: load misses block */
    719