0001
0002
0003
0004
0005
0006
0007
0008 #ifndef __ASM_POWERPC_REG_A2_H__
0009 #define __ASM_POWERPC_REG_A2_H__
0010
0011 #include <asm/asm-const.h>
0012
0013 #define SPRN_TENSR 0x1b5
0014 #define SPRN_TENS 0x1b6
0015 #define SPRN_TENC 0x1b7
0016
0017 #define SPRN_A2_CCR0 0x3f0
0018 #define SPRN_A2_CCR1 0x3f1
0019 #define SPRN_A2_CCR2 0x3f2
0020 #define SPRN_MMUCR0 0x3fc
0021 #define SPRN_MMUCR1 0x3fd
0022 #define SPRN_MMUCR2 0x3fe
0023 #define SPRN_MMUCR3 0x3ff
0024
0025 #define SPRN_IAR 0x372
0026
0027 #define SPRN_IUCR0 0x3f3
0028 #define IUCR0_ICBI_ACK 0x1000
0029
0030 #define SPRN_XUCR0 0x3f6
0031
0032 #define A2_IERAT_SIZE 16
0033 #define A2_DERAT_SIZE 32
0034
0035
0036 #define MMUCR0_ECL 0x80000000
0037 #define MMUCR0_TID_NZ 0x40000000
0038 #define MMUCR0_TS 0x10000000
0039 #define MMUCR0_TGS 0x20000000
0040 #define MMUCR0_TLBSEL 0x0c000000
0041 #define MMUCR0_TLBSEL_U 0x00000000
0042 #define MMUCR0_TLBSEL_I 0x08000000
0043 #define MMUCR0_TLBSEL_D 0x0c000000
0044 #define MMUCR0_LOCKSRSH 0x02000000
0045 #define MMUCR0_TID_MASK 0x000000ff
0046
0047
0048 #define MMUCR1_IRRE 0x80000000
0049 #define MMUCR1_DRRE 0x40000000
0050 #define MMUCR1_REE 0x20000000
0051 #define MMUCR1_CEE 0x10000000
0052 #define MMUCR1_CSINV_ALL 0x00000000
0053 #define MMUCR1_CSINV_NISYNC 0x04000000
0054 #define MMUCR1_CSINV_NEVER 0x0c000000
0055 #define MMUCR1_ICTID 0x00080000
0056 #define MMUCR1_ITTID 0x00040000
0057 #define MMUCR1_DCTID 0x00020000
0058 #define MMUCR1_DTTID 0x00010000
0059 #define MMUCR1_DCCD 0x00008000
0060 #define MMUCR1_TLBWE_BINV 0x00004000
0061
0062
0063 #define MMUCR2_PSSEL_SHIFT 4
0064
0065
0066 #define MMUCR3_THID 0x0000000f
0067
0068
0069 #define TLB0_EPN_MASK ASM_CONST(0xfffffffffffff000)
0070 #define TLB0_CLASS_MASK ASM_CONST(0x0000000000000c00)
0071 #define TLB0_CLASS_00 ASM_CONST(0x0000000000000000)
0072 #define TLB0_CLASS_01 ASM_CONST(0x0000000000000400)
0073 #define TLB0_CLASS_10 ASM_CONST(0x0000000000000800)
0074 #define TLB0_CLASS_11 ASM_CONST(0x0000000000000c00)
0075 #define TLB0_V ASM_CONST(0x0000000000000200)
0076 #define TLB0_X ASM_CONST(0x0000000000000100)
0077 #define TLB0_SIZE_MASK ASM_CONST(0x00000000000000f0)
0078 #define TLB0_SIZE_4K ASM_CONST(0x0000000000000010)
0079 #define TLB0_SIZE_64K ASM_CONST(0x0000000000000030)
0080 #define TLB0_SIZE_1M ASM_CONST(0x0000000000000050)
0081 #define TLB0_SIZE_16M ASM_CONST(0x0000000000000070)
0082 #define TLB0_SIZE_1G ASM_CONST(0x00000000000000a0)
0083 #define TLB0_THDID_MASK ASM_CONST(0x000000000000000f)
0084 #define TLB0_THDID_0 ASM_CONST(0x0000000000000001)
0085 #define TLB0_THDID_1 ASM_CONST(0x0000000000000002)
0086 #define TLB0_THDID_2 ASM_CONST(0x0000000000000004)
0087 #define TLB0_THDID_3 ASM_CONST(0x0000000000000008)
0088 #define TLB0_THDID_ALL ASM_CONST(0x000000000000000f)
0089
0090 #define TLB1_RESVATTR ASM_CONST(0x00f0000000000000)
0091 #define TLB1_U0 ASM_CONST(0x0008000000000000)
0092 #define TLB1_U1 ASM_CONST(0x0004000000000000)
0093 #define TLB1_U2 ASM_CONST(0x0002000000000000)
0094 #define TLB1_U3 ASM_CONST(0x0001000000000000)
0095 #define TLB1_R ASM_CONST(0x0000800000000000)
0096 #define TLB1_C ASM_CONST(0x0000400000000000)
0097 #define TLB1_RPN_MASK ASM_CONST(0x000003fffffff000)
0098 #define TLB1_W ASM_CONST(0x0000000000000800)
0099 #define TLB1_I ASM_CONST(0x0000000000000400)
0100 #define TLB1_M ASM_CONST(0x0000000000000200)
0101 #define TLB1_G ASM_CONST(0x0000000000000100)
0102 #define TLB1_E ASM_CONST(0x0000000000000080)
0103 #define TLB1_VF ASM_CONST(0x0000000000000040)
0104 #define TLB1_UX ASM_CONST(0x0000000000000020)
0105 #define TLB1_SX ASM_CONST(0x0000000000000010)
0106 #define TLB1_UW ASM_CONST(0x0000000000000008)
0107 #define TLB1_SW ASM_CONST(0x0000000000000004)
0108 #define TLB1_UR ASM_CONST(0x0000000000000002)
0109 #define TLB1_SR ASM_CONST(0x0000000000000001)
0110
0111
0112 #define ERATIVAX_RS_IS_ALL 0x000
0113 #define ERATIVAX_RS_IS_TID 0x040
0114 #define ERATIVAX_RS_IS_CLASS 0x080
0115 #define ERATIVAX_RS_IS_FULLMATCH 0x0c0
0116 #define ERATIVAX_CLASS_00 0x000
0117 #define ERATIVAX_CLASS_01 0x010
0118 #define ERATIVAX_CLASS_10 0x020
0119 #define ERATIVAX_CLASS_11 0x030
0120 #define ERATIVAX_PSIZE_4K (TLB_PSIZE_4K >> 1)
0121 #define ERATIVAX_PSIZE_64K (TLB_PSIZE_64K >> 1)
0122 #define ERATIVAX_PSIZE_1M (TLB_PSIZE_1M >> 1)
0123 #define ERATIVAX_PSIZE_16M (TLB_PSIZE_16M >> 1)
0124 #define ERATIVAX_PSIZE_1G (TLB_PSIZE_1G >> 1)
0125
0126
0127 #define ERATILX_T_ALL 0
0128 #define ERATILX_T_TID 1
0129 #define ERATILX_T_TGS 2
0130 #define ERATILX_T_FULLMATCH 3
0131 #define ERATILX_T_CLASS0 4
0132 #define ERATILX_T_CLASS1 5
0133 #define ERATILX_T_CLASS2 6
0134 #define ERATILX_T_CLASS3 7
0135
0136
0137 #define XUCR0_TRACE_UM_T0 0x40000000
0138 #define XUCR0_TRACE_UM_T1 0x20000000
0139 #define XUCR0_TRACE_UM_T2 0x10000000
0140 #define XUCR0_TRACE_UM_T3 0x08000000
0141
0142
0143 #define A2_CCR0_PME_DISABLED 0x00000000
0144 #define A2_CCR0_PME_SLEEP 0x40000000
0145 #define A2_CCR0_PME_RVW 0x80000000
0146 #define A2_CCR0_PME_DISABLED2 0xc0000000
0147
0148
0149 #define A2_CCR2_ERAT_ONLY_MODE 0x00000001
0150 #define A2_CCR2_ENABLE_ICSWX 0x00000002
0151 #define A2_CCR2_ENABLE_PC 0x20000000
0152 #define A2_CCR2_ENABLE_TRACE 0x40000000
0153
0154 #endif