0001
0002
0003
0004
0005 #ifndef __ARCH_ARM_MACH_MSM_IOMMU_HW_8XXX_H
0006 #define __ARCH_ARM_MACH_MSM_IOMMU_HW_8XXX_H
0007
0008 #define CTX_SHIFT 12
0009
0010 #define GET_GLOBAL_REG(reg, base) (readl((base) + (reg)))
0011 #define GET_CTX_REG(reg, base, ctx) \
0012 (readl((base) + (reg) + ((ctx) << CTX_SHIFT)))
0013
0014 #define SET_GLOBAL_REG(reg, base, val) writel((val), ((base) + (reg)))
0015
0016 #define SET_CTX_REG(reg, base, ctx, val) \
0017 writel((val), ((base) + (reg) + ((ctx) << CTX_SHIFT)))
0018
0019
0020 #define SET_GLOBAL_REG_N(b, n, r, v) SET_GLOBAL_REG(b, ((r) + (n << 2)), (v))
0021 #define GET_GLOBAL_REG_N(b, n, r) GET_GLOBAL_REG(b, ((r) + (n << 2)))
0022
0023
0024 #define GET_GLOBAL_FIELD(b, r, F) GET_FIELD(((b) + (r)), F##_MASK, F##_SHIFT)
0025 #define GET_CONTEXT_FIELD(b, c, r, F) \
0026 GET_FIELD(((b) + (r) + ((c) << CTX_SHIFT)), F##_MASK, F##_SHIFT)
0027
0028 #define SET_GLOBAL_FIELD(b, r, F, v) \
0029 SET_FIELD(((b) + (r)), F##_MASK, F##_SHIFT, (v))
0030 #define SET_CONTEXT_FIELD(b, c, r, F, v) \
0031 SET_FIELD(((b) + (r) + ((c) << CTX_SHIFT)), F##_MASK, F##_SHIFT, (v))
0032
0033 #define GET_FIELD(addr, mask, shift) ((readl(addr) >> (shift)) & (mask))
0034
0035 #define SET_FIELD(addr, mask, shift, v) \
0036 do { \
0037 int t = readl(addr); \
0038 writel((t & ~((mask) << (shift))) + (((v) & (mask)) << (shift)), addr);\
0039 } while (0)
0040
0041
0042 #define NUM_FL_PTE 4096
0043 #define NUM_SL_PTE 256
0044 #define NUM_TEX_CLASS 8
0045
0046
0047 #define FL_BASE_MASK 0xFFFFFC00
0048 #define FL_TYPE_TABLE (1 << 0)
0049 #define FL_TYPE_SECT (2 << 0)
0050 #define FL_SUPERSECTION (1 << 18)
0051 #define FL_AP_WRITE (1 << 10)
0052 #define FL_AP_READ (1 << 11)
0053 #define FL_SHARED (1 << 16)
0054 #define FL_BUFFERABLE (1 << 2)
0055 #define FL_CACHEABLE (1 << 3)
0056 #define FL_TEX0 (1 << 12)
0057 #define FL_OFFSET(va) (((va) & 0xFFF00000) >> 20)
0058 #define FL_NG (1 << 17)
0059
0060
0061 #define SL_BASE_MASK_LARGE 0xFFFF0000
0062 #define SL_BASE_MASK_SMALL 0xFFFFF000
0063 #define SL_TYPE_LARGE (1 << 0)
0064 #define SL_TYPE_SMALL (2 << 0)
0065 #define SL_AP0 (1 << 4)
0066 #define SL_AP1 (2 << 4)
0067 #define SL_SHARED (1 << 10)
0068 #define SL_BUFFERABLE (1 << 2)
0069 #define SL_CACHEABLE (1 << 3)
0070 #define SL_TEX0 (1 << 6)
0071 #define SL_OFFSET(va) (((va) & 0xFF000) >> 12)
0072 #define SL_NG (1 << 11)
0073
0074
0075 #define MT_SO 0
0076 #define MT_DEV 1
0077 #define MT_NORMAL 2
0078 #define CP_NONCACHED 0
0079 #define CP_WB_WA 1
0080 #define CP_WT 2
0081 #define CP_WB_NWA 3
0082
0083
0084 #define SET_M2VCBR_N(b, N, v) SET_GLOBAL_REG_N(M2VCBR_N, N, (b), (v))
0085 #define SET_CBACR_N(b, N, v) SET_GLOBAL_REG_N(CBACR_N, N, (b), (v))
0086 #define SET_TLBRSW(b, v) SET_GLOBAL_REG(TLBRSW, (b), (v))
0087 #define SET_TLBTR0(b, v) SET_GLOBAL_REG(TLBTR0, (b), (v))
0088 #define SET_TLBTR1(b, v) SET_GLOBAL_REG(TLBTR1, (b), (v))
0089 #define SET_TLBTR2(b, v) SET_GLOBAL_REG(TLBTR2, (b), (v))
0090 #define SET_TESTBUSCR(b, v) SET_GLOBAL_REG(TESTBUSCR, (b), (v))
0091 #define SET_GLOBAL_TLBIALL(b, v) SET_GLOBAL_REG(GLOBAL_TLBIALL, (b), (v))
0092 #define SET_TLBIVMID(b, v) SET_GLOBAL_REG(TLBIVMID, (b), (v))
0093 #define SET_CR(b, v) SET_GLOBAL_REG(CR, (b), (v))
0094 #define SET_EAR(b, v) SET_GLOBAL_REG(EAR, (b), (v))
0095 #define SET_ESR(b, v) SET_GLOBAL_REG(ESR, (b), (v))
0096 #define SET_ESRRESTORE(b, v) SET_GLOBAL_REG(ESRRESTORE, (b), (v))
0097 #define SET_ESYNR0(b, v) SET_GLOBAL_REG(ESYNR0, (b), (v))
0098 #define SET_ESYNR1(b, v) SET_GLOBAL_REG(ESYNR1, (b), (v))
0099 #define SET_RPU_ACR(b, v) SET_GLOBAL_REG(RPU_ACR, (b), (v))
0100
0101 #define GET_M2VCBR_N(b, N) GET_GLOBAL_REG_N(M2VCBR_N, N, (b))
0102 #define GET_CBACR_N(b, N) GET_GLOBAL_REG_N(CBACR_N, N, (b))
0103 #define GET_TLBTR0(b) GET_GLOBAL_REG(TLBTR0, (b))
0104 #define GET_TLBTR1(b) GET_GLOBAL_REG(TLBTR1, (b))
0105 #define GET_TLBTR2(b) GET_GLOBAL_REG(TLBTR2, (b))
0106 #define GET_TESTBUSCR(b) GET_GLOBAL_REG(TESTBUSCR, (b))
0107 #define GET_GLOBAL_TLBIALL(b) GET_GLOBAL_REG(GLOBAL_TLBIALL, (b))
0108 #define GET_TLBIVMID(b) GET_GLOBAL_REG(TLBIVMID, (b))
0109 #define GET_CR(b) GET_GLOBAL_REG(CR, (b))
0110 #define GET_EAR(b) GET_GLOBAL_REG(EAR, (b))
0111 #define GET_ESR(b) GET_GLOBAL_REG(ESR, (b))
0112 #define GET_ESRRESTORE(b) GET_GLOBAL_REG(ESRRESTORE, (b))
0113 #define GET_ESYNR0(b) GET_GLOBAL_REG(ESYNR0, (b))
0114 #define GET_ESYNR1(b) GET_GLOBAL_REG(ESYNR1, (b))
0115 #define GET_REV(b) GET_GLOBAL_REG(REV, (b))
0116 #define GET_IDR(b) GET_GLOBAL_REG(IDR, (b))
0117 #define GET_RPU_ACR(b) GET_GLOBAL_REG(RPU_ACR, (b))
0118
0119
0120
0121 #define SET_SCTLR(b, c, v) SET_CTX_REG(SCTLR, (b), (c), (v))
0122 #define SET_ACTLR(b, c, v) SET_CTX_REG(ACTLR, (b), (c), (v))
0123 #define SET_CONTEXTIDR(b, c, v) SET_CTX_REG(CONTEXTIDR, (b), (c), (v))
0124 #define SET_TTBR0(b, c, v) SET_CTX_REG(TTBR0, (b), (c), (v))
0125 #define SET_TTBR1(b, c, v) SET_CTX_REG(TTBR1, (b), (c), (v))
0126 #define SET_TTBCR(b, c, v) SET_CTX_REG(TTBCR, (b), (c), (v))
0127 #define SET_PAR(b, c, v) SET_CTX_REG(PAR, (b), (c), (v))
0128 #define SET_FSR(b, c, v) SET_CTX_REG(FSR, (b), (c), (v))
0129 #define SET_FSRRESTORE(b, c, v) SET_CTX_REG(FSRRESTORE, (b), (c), (v))
0130 #define SET_FAR(b, c, v) SET_CTX_REG(FAR, (b), (c), (v))
0131 #define SET_FSYNR0(b, c, v) SET_CTX_REG(FSYNR0, (b), (c), (v))
0132 #define SET_FSYNR1(b, c, v) SET_CTX_REG(FSYNR1, (b), (c), (v))
0133 #define SET_PRRR(b, c, v) SET_CTX_REG(PRRR, (b), (c), (v))
0134 #define SET_NMRR(b, c, v) SET_CTX_REG(NMRR, (b), (c), (v))
0135 #define SET_TLBLKCR(b, c, v) SET_CTX_REG(TLBLCKR, (b), (c), (v))
0136 #define SET_V2PSR(b, c, v) SET_CTX_REG(V2PSR, (b), (c), (v))
0137 #define SET_TLBFLPTER(b, c, v) SET_CTX_REG(TLBFLPTER, (b), (c), (v))
0138 #define SET_TLBSLPTER(b, c, v) SET_CTX_REG(TLBSLPTER, (b), (c), (v))
0139 #define SET_BFBCR(b, c, v) SET_CTX_REG(BFBCR, (b), (c), (v))
0140 #define SET_CTX_TLBIALL(b, c, v) SET_CTX_REG(CTX_TLBIALL, (b), (c), (v))
0141 #define SET_TLBIASID(b, c, v) SET_CTX_REG(TLBIASID, (b), (c), (v))
0142 #define SET_TLBIVA(b, c, v) SET_CTX_REG(TLBIVA, (b), (c), (v))
0143 #define SET_TLBIVAA(b, c, v) SET_CTX_REG(TLBIVAA, (b), (c), (v))
0144 #define SET_V2PPR(b, c, v) SET_CTX_REG(V2PPR, (b), (c), (v))
0145 #define SET_V2PPW(b, c, v) SET_CTX_REG(V2PPW, (b), (c), (v))
0146 #define SET_V2PUR(b, c, v) SET_CTX_REG(V2PUR, (b), (c), (v))
0147 #define SET_V2PUW(b, c, v) SET_CTX_REG(V2PUW, (b), (c), (v))
0148 #define SET_RESUME(b, c, v) SET_CTX_REG(RESUME, (b), (c), (v))
0149
0150 #define GET_SCTLR(b, c) GET_CTX_REG(SCTLR, (b), (c))
0151 #define GET_ACTLR(b, c) GET_CTX_REG(ACTLR, (b), (c))
0152 #define GET_CONTEXTIDR(b, c) GET_CTX_REG(CONTEXTIDR, (b), (c))
0153 #define GET_TTBR0(b, c) GET_CTX_REG(TTBR0, (b), (c))
0154 #define GET_TTBR1(b, c) GET_CTX_REG(TTBR1, (b), (c))
0155 #define GET_TTBCR(b, c) GET_CTX_REG(TTBCR, (b), (c))
0156 #define GET_PAR(b, c) GET_CTX_REG(PAR, (b), (c))
0157 #define GET_FSR(b, c) GET_CTX_REG(FSR, (b), (c))
0158 #define GET_FSRRESTORE(b, c) GET_CTX_REG(FSRRESTORE, (b), (c))
0159 #define GET_FAR(b, c) GET_CTX_REG(FAR, (b), (c))
0160 #define GET_FSYNR0(b, c) GET_CTX_REG(FSYNR0, (b), (c))
0161 #define GET_FSYNR1(b, c) GET_CTX_REG(FSYNR1, (b), (c))
0162 #define GET_PRRR(b, c) GET_CTX_REG(PRRR, (b), (c))
0163 #define GET_NMRR(b, c) GET_CTX_REG(NMRR, (b), (c))
0164 #define GET_TLBLCKR(b, c) GET_CTX_REG(TLBLCKR, (b), (c))
0165 #define GET_V2PSR(b, c) GET_CTX_REG(V2PSR, (b), (c))
0166 #define GET_TLBFLPTER(b, c) GET_CTX_REG(TLBFLPTER, (b), (c))
0167 #define GET_TLBSLPTER(b, c) GET_CTX_REG(TLBSLPTER, (b), (c))
0168 #define GET_BFBCR(b, c) GET_CTX_REG(BFBCR, (b), (c))
0169 #define GET_CTX_TLBIALL(b, c) GET_CTX_REG(CTX_TLBIALL, (b), (c))
0170 #define GET_TLBIASID(b, c) GET_CTX_REG(TLBIASID, (b), (c))
0171 #define GET_TLBIVA(b, c) GET_CTX_REG(TLBIVA, (b), (c))
0172 #define GET_TLBIVAA(b, c) GET_CTX_REG(TLBIVAA, (b), (c))
0173 #define GET_V2PPR(b, c) GET_CTX_REG(V2PPR, (b), (c))
0174 #define GET_V2PPW(b, c) GET_CTX_REG(V2PPW, (b), (c))
0175 #define GET_V2PUR(b, c) GET_CTX_REG(V2PUR, (b), (c))
0176 #define GET_V2PUW(b, c) GET_CTX_REG(V2PUW, (b), (c))
0177 #define GET_RESUME(b, c) GET_CTX_REG(RESUME, (b), (c))
0178
0179
0180
0181
0182
0183 #define SET_RWVMID(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWVMID, v)
0184 #define SET_RWE(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWE, v)
0185 #define SET_RWGE(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWGE, v)
0186 #define SET_CBVMID(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), CBVMID, v)
0187 #define SET_IRPTNDX(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), IRPTNDX, v)
0188
0189
0190
0191 #define SET_VMID(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), VMID, v)
0192 #define SET_CBNDX(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), CBNDX, v)
0193 #define SET_BYPASSD(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BYPASSD, v)
0194 #define SET_BPRCOSH(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCOSH, v)
0195 #define SET_BPRCISH(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCISH, v)
0196 #define SET_BPRCNSH(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCNSH, v)
0197 #define SET_BPSHCFG(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPSHCFG, v)
0198 #define SET_NSCFG(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), NSCFG, v)
0199 #define SET_BPMTCFG(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPMTCFG, v)
0200 #define SET_BPMEMTYPE(b, n, v) \
0201 SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPMEMTYPE, v)
0202
0203
0204
0205 #define SET_RPUE(b, v) SET_GLOBAL_FIELD(b, CR, RPUE, v)
0206 #define SET_RPUERE(b, v) SET_GLOBAL_FIELD(b, CR, RPUERE, v)
0207 #define SET_RPUEIE(b, v) SET_GLOBAL_FIELD(b, CR, RPUEIE, v)
0208 #define SET_DCDEE(b, v) SET_GLOBAL_FIELD(b, CR, DCDEE, v)
0209 #define SET_CLIENTPD(b, v) SET_GLOBAL_FIELD(b, CR, CLIENTPD, v)
0210 #define SET_STALLD(b, v) SET_GLOBAL_FIELD(b, CR, STALLD, v)
0211 #define SET_TLBLKCRWE(b, v) SET_GLOBAL_FIELD(b, CR, TLBLKCRWE, v)
0212 #define SET_CR_TLBIALLCFG(b, v) SET_GLOBAL_FIELD(b, CR, CR_TLBIALLCFG, v)
0213 #define SET_TLBIVMIDCFG(b, v) SET_GLOBAL_FIELD(b, CR, TLBIVMIDCFG, v)
0214 #define SET_CR_HUME(b, v) SET_GLOBAL_FIELD(b, CR, CR_HUME, v)
0215
0216
0217
0218 #define SET_CFG(b, v) SET_GLOBAL_FIELD(b, ESR, CFG, v)
0219 #define SET_BYPASS(b, v) SET_GLOBAL_FIELD(b, ESR, BYPASS, v)
0220 #define SET_ESR_MULTI(b, v) SET_GLOBAL_FIELD(b, ESR, ESR_MULTI, v)
0221
0222
0223
0224 #define SET_ESYNR0_AMID(b, v) SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_AMID, v)
0225 #define SET_ESYNR0_APID(b, v) SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_APID, v)
0226 #define SET_ESYNR0_ABID(b, v) SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_ABID, v)
0227 #define SET_ESYNR0_AVMID(b, v) SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_AVMID, v)
0228 #define SET_ESYNR0_ATID(b, v) SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_ATID, v)
0229
0230
0231
0232 #define SET_ESYNR1_AMEMTYPE(b, v) \
0233 SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AMEMTYPE, v)
0234 #define SET_ESYNR1_ASHARED(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ASHARED, v)
0235 #define SET_ESYNR1_AINNERSHARED(b, v) \
0236 SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AINNERSHARED, v)
0237 #define SET_ESYNR1_APRIV(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_APRIV, v)
0238 #define SET_ESYNR1_APROTNS(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_APROTNS, v)
0239 #define SET_ESYNR1_AINST(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AINST, v)
0240 #define SET_ESYNR1_AWRITE(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AWRITE, v)
0241 #define SET_ESYNR1_ABURST(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ABURST, v)
0242 #define SET_ESYNR1_ALEN(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ALEN, v)
0243 #define SET_ESYNR1_ASIZE(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ASIZE, v)
0244 #define SET_ESYNR1_ALOCK(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ALOCK, v)
0245 #define SET_ESYNR1_AOOO(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AOOO, v)
0246 #define SET_ESYNR1_AFULL(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AFULL, v)
0247 #define SET_ESYNR1_AC(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AC, v)
0248 #define SET_ESYNR1_DCD(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_DCD, v)
0249
0250
0251
0252 #define SET_TBE(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, TBE, v)
0253 #define SET_SPDMBE(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, SPDMBE, v)
0254 #define SET_WGSEL(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, WGSEL, v)
0255 #define SET_TBLSEL(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, TBLSEL, v)
0256 #define SET_TBHSEL(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, TBHSEL, v)
0257 #define SET_SPDM0SEL(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, SPDM0SEL, v)
0258 #define SET_SPDM1SEL(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, SPDM1SEL, v)
0259 #define SET_SPDM2SEL(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, SPDM2SEL, v)
0260 #define SET_SPDM3SEL(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, SPDM3SEL, v)
0261
0262
0263
0264 #define SET_TLBIVMID_VMID(b, v) SET_GLOBAL_FIELD(b, TLBIVMID, TLBIVMID_VMID, v)
0265
0266
0267
0268 #define SET_TLBRSW_INDEX(b, v) SET_GLOBAL_FIELD(b, TLBRSW, TLBRSW_INDEX, v)
0269 #define SET_TLBBFBS(b, v) SET_GLOBAL_FIELD(b, TLBRSW, TLBBFBS, v)
0270
0271
0272
0273 #define SET_PR(b, v) SET_GLOBAL_FIELD(b, TLBTR0, PR, v)
0274 #define SET_PW(b, v) SET_GLOBAL_FIELD(b, TLBTR0, PW, v)
0275 #define SET_UR(b, v) SET_GLOBAL_FIELD(b, TLBTR0, UR, v)
0276 #define SET_UW(b, v) SET_GLOBAL_FIELD(b, TLBTR0, UW, v)
0277 #define SET_XN(b, v) SET_GLOBAL_FIELD(b, TLBTR0, XN, v)
0278 #define SET_NSDESC(b, v) SET_GLOBAL_FIELD(b, TLBTR0, NSDESC, v)
0279 #define SET_ISH(b, v) SET_GLOBAL_FIELD(b, TLBTR0, ISH, v)
0280 #define SET_SH(b, v) SET_GLOBAL_FIELD(b, TLBTR0, SH, v)
0281 #define SET_MT(b, v) SET_GLOBAL_FIELD(b, TLBTR0, MT, v)
0282 #define SET_DPSIZR(b, v) SET_GLOBAL_FIELD(b, TLBTR0, DPSIZR, v)
0283 #define SET_DPSIZC(b, v) SET_GLOBAL_FIELD(b, TLBTR0, DPSIZC, v)
0284
0285
0286
0287 #define SET_TLBTR1_VMID(b, v) SET_GLOBAL_FIELD(b, TLBTR1, TLBTR1_VMID, v)
0288 #define SET_TLBTR1_PA(b, v) SET_GLOBAL_FIELD(b, TLBTR1, TLBTR1_PA, v)
0289
0290
0291
0292 #define SET_TLBTR2_ASID(b, v) SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_ASID, v)
0293 #define SET_TLBTR2_V(b, v) SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_V, v)
0294 #define SET_TLBTR2_NSTID(b, v) SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_NSTID, v)
0295 #define SET_TLBTR2_NV(b, v) SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_NV, v)
0296 #define SET_TLBTR2_VA(b, v) SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_VA, v)
0297
0298
0299
0300
0301 #define GET_RWVMID(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWVMID)
0302 #define GET_RWE(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWE)
0303 #define GET_RWGE(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWGE)
0304 #define GET_CBVMID(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), CBVMID)
0305 #define GET_IRPTNDX(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), IRPTNDX)
0306
0307
0308
0309 #define GET_VMID(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), VMID)
0310 #define GET_CBNDX(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), CBNDX)
0311 #define GET_BYPASSD(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BYPASSD)
0312 #define GET_BPRCOSH(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCOSH)
0313 #define GET_BPRCISH(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCISH)
0314 #define GET_BPRCNSH(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCNSH)
0315 #define GET_BPSHCFG(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPSHCFG)
0316 #define GET_NSCFG(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), NSCFG)
0317 #define GET_BPMTCFG(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPMTCFG)
0318 #define GET_BPMEMTYPE(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPMEMTYPE)
0319
0320
0321
0322 #define GET_RPUE(b) GET_GLOBAL_FIELD(b, CR, RPUE)
0323 #define GET_RPUERE(b) GET_GLOBAL_FIELD(b, CR, RPUERE)
0324 #define GET_RPUEIE(b) GET_GLOBAL_FIELD(b, CR, RPUEIE)
0325 #define GET_DCDEE(b) GET_GLOBAL_FIELD(b, CR, DCDEE)
0326 #define GET_CLIENTPD(b) GET_GLOBAL_FIELD(b, CR, CLIENTPD)
0327 #define GET_STALLD(b) GET_GLOBAL_FIELD(b, CR, STALLD)
0328 #define GET_TLBLKCRWE(b) GET_GLOBAL_FIELD(b, CR, TLBLKCRWE)
0329 #define GET_CR_TLBIALLCFG(b) GET_GLOBAL_FIELD(b, CR, CR_TLBIALLCFG)
0330 #define GET_TLBIVMIDCFG(b) GET_GLOBAL_FIELD(b, CR, TLBIVMIDCFG)
0331 #define GET_CR_HUME(b) GET_GLOBAL_FIELD(b, CR, CR_HUME)
0332
0333
0334
0335 #define GET_CFG(b) GET_GLOBAL_FIELD(b, ESR, CFG)
0336 #define GET_BYPASS(b) GET_GLOBAL_FIELD(b, ESR, BYPASS)
0337 #define GET_ESR_MULTI(b) GET_GLOBAL_FIELD(b, ESR, ESR_MULTI)
0338
0339
0340
0341 #define GET_ESYNR0_AMID(b) GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_AMID)
0342 #define GET_ESYNR0_APID(b) GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_APID)
0343 #define GET_ESYNR0_ABID(b) GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_ABID)
0344 #define GET_ESYNR0_AVMID(b) GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_AVMID)
0345 #define GET_ESYNR0_ATID(b) GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_ATID)
0346
0347
0348
0349 #define GET_ESYNR1_AMEMTYPE(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AMEMTYPE)
0350 #define GET_ESYNR1_ASHARED(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ASHARED)
0351 #define GET_ESYNR1_AINNERSHARED(b) \
0352 GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AINNERSHARED)
0353 #define GET_ESYNR1_APRIV(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_APRIV)
0354 #define GET_ESYNR1_APROTNS(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_APROTNS)
0355 #define GET_ESYNR1_AINST(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AINST)
0356 #define GET_ESYNR1_AWRITE(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AWRITE)
0357 #define GET_ESYNR1_ABURST(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ABURST)
0358 #define GET_ESYNR1_ALEN(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ALEN)
0359 #define GET_ESYNR1_ASIZE(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ASIZE)
0360 #define GET_ESYNR1_ALOCK(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ALOCK)
0361 #define GET_ESYNR1_AOOO(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AOOO)
0362 #define GET_ESYNR1_AFULL(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AFULL)
0363 #define GET_ESYNR1_AC(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AC)
0364 #define GET_ESYNR1_DCD(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_DCD)
0365
0366
0367
0368 #define GET_NM2VCBMT(b) GET_GLOBAL_FIELD(b, IDR, NM2VCBMT)
0369 #define GET_HTW(b) GET_GLOBAL_FIELD(b, IDR, HTW)
0370 #define GET_HUM(b) GET_GLOBAL_FIELD(b, IDR, HUM)
0371 #define GET_TLBSIZE(b) GET_GLOBAL_FIELD(b, IDR, TLBSIZE)
0372 #define GET_NCB(b) GET_GLOBAL_FIELD(b, IDR, NCB)
0373 #define GET_NIRPT(b) GET_GLOBAL_FIELD(b, IDR, NIRPT)
0374
0375
0376
0377 #define GET_MAJOR(b) GET_GLOBAL_FIELD(b, REV, MAJOR)
0378 #define GET_MINOR(b) GET_GLOBAL_FIELD(b, REV, MINOR)
0379
0380
0381
0382 #define GET_TBE(b) GET_GLOBAL_FIELD(b, TESTBUSCR, TBE)
0383 #define GET_SPDMBE(b) GET_GLOBAL_FIELD(b, TESTBUSCR, SPDMBE)
0384 #define GET_WGSEL(b) GET_GLOBAL_FIELD(b, TESTBUSCR, WGSEL)
0385 #define GET_TBLSEL(b) GET_GLOBAL_FIELD(b, TESTBUSCR, TBLSEL)
0386 #define GET_TBHSEL(b) GET_GLOBAL_FIELD(b, TESTBUSCR, TBHSEL)
0387 #define GET_SPDM0SEL(b) GET_GLOBAL_FIELD(b, TESTBUSCR, SPDM0SEL)
0388 #define GET_SPDM1SEL(b) GET_GLOBAL_FIELD(b, TESTBUSCR, SPDM1SEL)
0389 #define GET_SPDM2SEL(b) GET_GLOBAL_FIELD(b, TESTBUSCR, SPDM2SEL)
0390 #define GET_SPDM3SEL(b) GET_GLOBAL_FIELD(b, TESTBUSCR, SPDM3SEL)
0391
0392
0393
0394 #define GET_TLBIVMID_VMID(b) GET_GLOBAL_FIELD(b, TLBIVMID, TLBIVMID_VMID)
0395
0396
0397
0398 #define GET_PR(b) GET_GLOBAL_FIELD(b, TLBTR0, PR)
0399 #define GET_PW(b) GET_GLOBAL_FIELD(b, TLBTR0, PW)
0400 #define GET_UR(b) GET_GLOBAL_FIELD(b, TLBTR0, UR)
0401 #define GET_UW(b) GET_GLOBAL_FIELD(b, TLBTR0, UW)
0402 #define GET_XN(b) GET_GLOBAL_FIELD(b, TLBTR0, XN)
0403 #define GET_NSDESC(b) GET_GLOBAL_FIELD(b, TLBTR0, NSDESC)
0404 #define GET_ISH(b) GET_GLOBAL_FIELD(b, TLBTR0, ISH)
0405 #define GET_SH(b) GET_GLOBAL_FIELD(b, TLBTR0, SH)
0406 #define GET_MT(b) GET_GLOBAL_FIELD(b, TLBTR0, MT)
0407 #define GET_DPSIZR(b) GET_GLOBAL_FIELD(b, TLBTR0, DPSIZR)
0408 #define GET_DPSIZC(b) GET_GLOBAL_FIELD(b, TLBTR0, DPSIZC)
0409
0410
0411
0412 #define GET_TLBTR1_VMID(b) GET_GLOBAL_FIELD(b, TLBTR1, TLBTR1_VMID)
0413 #define GET_TLBTR1_PA(b) GET_GLOBAL_FIELD(b, TLBTR1, TLBTR1_PA)
0414
0415
0416
0417 #define GET_TLBTR2_ASID(b) GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_ASID)
0418 #define GET_TLBTR2_V(b) GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_V)
0419 #define GET_TLBTR2_NSTID(b) GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_NSTID)
0420 #define GET_TLBTR2_NV(b) GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_NV)
0421 #define GET_TLBTR2_VA(b) GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_VA)
0422
0423
0424
0425
0426
0427 #define SET_CFERE(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, CFERE, v)
0428 #define SET_CFEIE(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, CFEIE, v)
0429 #define SET_PTSHCFG(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, PTSHCFG, v)
0430 #define SET_RCOSH(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, RCOSH, v)
0431 #define SET_RCISH(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, RCISH, v)
0432 #define SET_RCNSH(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, RCNSH, v)
0433 #define SET_PRIVCFG(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, PRIVCFG, v)
0434 #define SET_DNA(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, DNA, v)
0435 #define SET_DNLV2PA(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, DNLV2PA, v)
0436 #define SET_TLBMCFG(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, TLBMCFG, v)
0437 #define SET_CFCFG(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, CFCFG, v)
0438 #define SET_TIPCF(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, TIPCF, v)
0439 #define SET_V2PCFG(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, V2PCFG, v)
0440 #define SET_HUME(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, HUME, v)
0441 #define SET_PTMTCFG(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, PTMTCFG, v)
0442 #define SET_PTMEMTYPE(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, PTMEMTYPE, v)
0443
0444
0445
0446 #define SET_BFBDFE(b, c, v) SET_CONTEXT_FIELD(b, c, BFBCR, BFBDFE, v)
0447 #define SET_BFBSFE(b, c, v) SET_CONTEXT_FIELD(b, c, BFBCR, BFBSFE, v)
0448 #define SET_SFVS(b, c, v) SET_CONTEXT_FIELD(b, c, BFBCR, SFVS, v)
0449 #define SET_FLVIC(b, c, v) SET_CONTEXT_FIELD(b, c, BFBCR, FLVIC, v)
0450 #define SET_SLVIC(b, c, v) SET_CONTEXT_FIELD(b, c, BFBCR, SLVIC, v)
0451
0452
0453
0454 #define SET_CONTEXTIDR_ASID(b, c, v) \
0455 SET_CONTEXT_FIELD(b, c, CONTEXTIDR, CONTEXTIDR_ASID, v)
0456 #define SET_CONTEXTIDR_PROCID(b, c, v) \
0457 SET_CONTEXT_FIELD(b, c, CONTEXTIDR, PROCID, v)
0458
0459
0460
0461 #define SET_TF(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, TF, v)
0462 #define SET_AFF(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, AFF, v)
0463 #define SET_APF(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, APF, v)
0464 #define SET_TLBMF(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, TLBMF, v)
0465 #define SET_HTWDEEF(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, HTWDEEF, v)
0466 #define SET_HTWSEEF(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, HTWSEEF, v)
0467 #define SET_MHF(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, MHF, v)
0468 #define SET_SL(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, SL, v)
0469 #define SET_SS(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, SS, v)
0470 #define SET_MULTI(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, MULTI, v)
0471
0472
0473
0474 #define SET_AMID(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR0, AMID, v)
0475 #define SET_APID(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR0, APID, v)
0476 #define SET_ABID(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR0, ABID, v)
0477 #define SET_ATID(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR0, ATID, v)
0478
0479
0480
0481 #define SET_AMEMTYPE(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, AMEMTYPE, v)
0482 #define SET_ASHARED(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, ASHARED, v)
0483 #define SET_AINNERSHARED(b, c, v) \
0484 SET_CONTEXT_FIELD(b, c, FSYNR1, AINNERSHARED, v)
0485 #define SET_APRIV(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, APRIV, v)
0486 #define SET_APROTNS(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, APROTNS, v)
0487 #define SET_AINST(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, AINST, v)
0488 #define SET_AWRITE(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, AWRITE, v)
0489 #define SET_ABURST(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, ABURST, v)
0490 #define SET_ALEN(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, ALEN, v)
0491 #define SET_FSYNR1_ASIZE(b, c, v) \
0492 SET_CONTEXT_FIELD(b, c, FSYNR1, FSYNR1_ASIZE, v)
0493 #define SET_ALOCK(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, ALOCK, v)
0494 #define SET_AFULL(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, AFULL, v)
0495
0496
0497
0498 #define SET_ICPC0(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC0, v)
0499 #define SET_ICPC1(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC1, v)
0500 #define SET_ICPC2(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC2, v)
0501 #define SET_ICPC3(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC3, v)
0502 #define SET_ICPC4(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC4, v)
0503 #define SET_ICPC5(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC5, v)
0504 #define SET_ICPC6(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC6, v)
0505 #define SET_ICPC7(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC7, v)
0506 #define SET_OCPC0(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC0, v)
0507 #define SET_OCPC1(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC1, v)
0508 #define SET_OCPC2(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC2, v)
0509 #define SET_OCPC3(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC3, v)
0510 #define SET_OCPC4(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC4, v)
0511 #define SET_OCPC5(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC5, v)
0512 #define SET_OCPC6(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC6, v)
0513 #define SET_OCPC7(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC7, v)
0514
0515
0516
0517 #define SET_FAULT(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT, v)
0518
0519 #define SET_FAULT_TF(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_TF, v)
0520 #define SET_FAULT_AFF(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_AFF, v)
0521 #define SET_FAULT_APF(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_APF, v)
0522 #define SET_FAULT_TLBMF(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_TLBMF, v)
0523 #define SET_FAULT_HTWDEEF(b, c, v) \
0524 SET_CONTEXT_FIELD(b, c, PAR, FAULT_HTWDEEF, v)
0525 #define SET_FAULT_HTWSEEF(b, c, v) \
0526 SET_CONTEXT_FIELD(b, c, PAR, FAULT_HTWSEEF, v)
0527 #define SET_FAULT_MHF(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_MHF, v)
0528 #define SET_FAULT_SL(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_SL, v)
0529 #define SET_FAULT_SS(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_SS, v)
0530
0531 #define SET_NOFAULT_SS(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_SS, v)
0532 #define SET_NOFAULT_MT(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_MT, v)
0533 #define SET_NOFAULT_SH(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_SH, v)
0534 #define SET_NOFAULT_NS(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_NS, v)
0535 #define SET_NOFAULT_NOS(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_NOS, v)
0536 #define SET_NPFAULT_PA(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, NPFAULT_PA, v)
0537
0538
0539
0540 #define SET_MTC0(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC0, v)
0541 #define SET_MTC1(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC1, v)
0542 #define SET_MTC2(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC2, v)
0543 #define SET_MTC3(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC3, v)
0544 #define SET_MTC4(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC4, v)
0545 #define SET_MTC5(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC5, v)
0546 #define SET_MTC6(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC6, v)
0547 #define SET_MTC7(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC7, v)
0548 #define SET_SHDSH0(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, SHDSH0, v)
0549 #define SET_SHDSH1(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, SHDSH1, v)
0550 #define SET_SHNMSH0(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, SHNMSH0, v)
0551 #define SET_SHNMSH1(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, SHNMSH1, v)
0552 #define SET_NOS0(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS0, v)
0553 #define SET_NOS1(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS1, v)
0554 #define SET_NOS2(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS2, v)
0555 #define SET_NOS3(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS3, v)
0556 #define SET_NOS4(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS4, v)
0557 #define SET_NOS5(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS5, v)
0558 #define SET_NOS6(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS6, v)
0559 #define SET_NOS7(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS7, v)
0560
0561
0562
0563 #define SET_TNR(b, c, v) SET_CONTEXT_FIELD(b, c, RESUME, TNR, v)
0564
0565
0566
0567 #define SET_M(b, c, v) SET_CONTEXT_FIELD(b, c, SCTLR, M, v)
0568 #define SET_TRE(b, c, v) SET_CONTEXT_FIELD(b, c, SCTLR, TRE, v)
0569 #define SET_AFE(b, c, v) SET_CONTEXT_FIELD(b, c, SCTLR, AFE, v)
0570 #define SET_HAF(b, c, v) SET_CONTEXT_FIELD(b, c, SCTLR, HAF, v)
0571 #define SET_BE(b, c, v) SET_CONTEXT_FIELD(b, c, SCTLR, BE, v)
0572 #define SET_AFFD(b, c, v) SET_CONTEXT_FIELD(b, c, SCTLR, AFFD, v)
0573
0574
0575
0576 #define SET_LKE(b, c, v) SET_CONTEXT_FIELD(b, c, TLBLKCR, LKE, v)
0577 #define SET_TLBLKCR_TLBIALLCFG(b, c, v) \
0578 SET_CONTEXT_FIELD(b, c, TLBLKCR, TLBLCKR_TLBIALLCFG, v)
0579 #define SET_TLBIASIDCFG(b, c, v) \
0580 SET_CONTEXT_FIELD(b, c, TLBLKCR, TLBIASIDCFG, v)
0581 #define SET_TLBIVAACFG(b, c, v) SET_CONTEXT_FIELD(b, c, TLBLKCR, TLBIVAACFG, v)
0582 #define SET_FLOOR(b, c, v) SET_CONTEXT_FIELD(b, c, TLBLKCR, FLOOR, v)
0583 #define SET_VICTIM(b, c, v) SET_CONTEXT_FIELD(b, c, TLBLKCR, VICTIM, v)
0584
0585
0586
0587 #define SET_N(b, c, v) SET_CONTEXT_FIELD(b, c, TTBCR, N, v)
0588 #define SET_PD0(b, c, v) SET_CONTEXT_FIELD(b, c, TTBCR, PD0, v)
0589 #define SET_PD1(b, c, v) SET_CONTEXT_FIELD(b, c, TTBCR, PD1, v)
0590
0591
0592
0593 #define SET_TTBR0_IRGNH(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_IRGNH, v)
0594 #define SET_TTBR0_SH(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_SH, v)
0595 #define SET_TTBR0_ORGN(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_ORGN, v)
0596 #define SET_TTBR0_NOS(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_NOS, v)
0597 #define SET_TTBR0_IRGNL(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_IRGNL, v)
0598 #define SET_TTBR0_PA(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_PA, v)
0599
0600
0601
0602 #define SET_TTBR1_IRGNH(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_IRGNH, v)
0603 #define SET_TTBR1_SH(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_SH, v)
0604 #define SET_TTBR1_ORGN(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_ORGN, v)
0605 #define SET_TTBR1_NOS(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_NOS, v)
0606 #define SET_TTBR1_IRGNL(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_IRGNL, v)
0607 #define SET_TTBR1_PA(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_PA, v)
0608
0609
0610
0611 #define SET_HIT(b, c, v) SET_CONTEXT_FIELD(b, c, V2PSR, HIT, v)
0612 #define SET_INDEX(b, c, v) SET_CONTEXT_FIELD(b, c, V2PSR, INDEX, v)
0613
0614
0615
0616
0617 #define GET_CFERE(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, CFERE)
0618 #define GET_CFEIE(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, CFEIE)
0619 #define GET_PTSHCFG(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, PTSHCFG)
0620 #define GET_RCOSH(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, RCOSH)
0621 #define GET_RCISH(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, RCISH)
0622 #define GET_RCNSH(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, RCNSH)
0623 #define GET_PRIVCFG(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, PRIVCFG)
0624 #define GET_DNA(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, DNA)
0625 #define GET_DNLV2PA(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, DNLV2PA)
0626 #define GET_TLBMCFG(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, TLBMCFG)
0627 #define GET_CFCFG(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, CFCFG)
0628 #define GET_TIPCF(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, TIPCF)
0629 #define GET_V2PCFG(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, V2PCFG)
0630 #define GET_HUME(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, HUME)
0631 #define GET_PTMTCFG(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, PTMTCFG)
0632 #define GET_PTMEMTYPE(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, PTMEMTYPE)
0633
0634
0635 #define GET_BFBDFE(b, c) GET_CONTEXT_FIELD(b, c, BFBCR, BFBDFE)
0636 #define GET_BFBSFE(b, c) GET_CONTEXT_FIELD(b, c, BFBCR, BFBSFE)
0637 #define GET_SFVS(b, c) GET_CONTEXT_FIELD(b, c, BFBCR, SFVS)
0638 #define GET_FLVIC(b, c) GET_CONTEXT_FIELD(b, c, BFBCR, FLVIC)
0639 #define GET_SLVIC(b, c) GET_CONTEXT_FIELD(b, c, BFBCR, SLVIC)
0640
0641
0642
0643 #define GET_CONTEXTIDR_ASID(b, c) \
0644 GET_CONTEXT_FIELD(b, c, CONTEXTIDR, CONTEXTIDR_ASID)
0645 #define GET_CONTEXTIDR_PROCID(b, c) GET_CONTEXT_FIELD(b, c, CONTEXTIDR, PROCID)
0646
0647
0648
0649 #define GET_TF(b, c) GET_CONTEXT_FIELD(b, c, FSR, TF)
0650 #define GET_AFF(b, c) GET_CONTEXT_FIELD(b, c, FSR, AFF)
0651 #define GET_APF(b, c) GET_CONTEXT_FIELD(b, c, FSR, APF)
0652 #define GET_TLBMF(b, c) GET_CONTEXT_FIELD(b, c, FSR, TLBMF)
0653 #define GET_HTWDEEF(b, c) GET_CONTEXT_FIELD(b, c, FSR, HTWDEEF)
0654 #define GET_HTWSEEF(b, c) GET_CONTEXT_FIELD(b, c, FSR, HTWSEEF)
0655 #define GET_MHF(b, c) GET_CONTEXT_FIELD(b, c, FSR, MHF)
0656 #define GET_SL(b, c) GET_CONTEXT_FIELD(b, c, FSR, SL)
0657 #define GET_SS(b, c) GET_CONTEXT_FIELD(b, c, FSR, SS)
0658 #define GET_MULTI(b, c) GET_CONTEXT_FIELD(b, c, FSR, MULTI)
0659
0660
0661
0662 #define GET_AMID(b, c) GET_CONTEXT_FIELD(b, c, FSYNR0, AMID)
0663 #define GET_APID(b, c) GET_CONTEXT_FIELD(b, c, FSYNR0, APID)
0664 #define GET_ABID(b, c) GET_CONTEXT_FIELD(b, c, FSYNR0, ABID)
0665 #define GET_ATID(b, c) GET_CONTEXT_FIELD(b, c, FSYNR0, ATID)
0666
0667
0668
0669 #define GET_AMEMTYPE(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, AMEMTYPE)
0670 #define GET_ASHARED(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, ASHARED)
0671 #define GET_AINNERSHARED(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, AINNERSHARED)
0672 #define GET_APRIV(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, APRIV)
0673 #define GET_APROTNS(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, APROTNS)
0674 #define GET_AINST(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, AINST)
0675 #define GET_AWRITE(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, AWRITE)
0676 #define GET_ABURST(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, ABURST)
0677 #define GET_ALEN(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, ALEN)
0678 #define GET_FSYNR1_ASIZE(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, FSYNR1_ASIZE)
0679 #define GET_ALOCK(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, ALOCK)
0680 #define GET_AFULL(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, AFULL)
0681
0682
0683
0684 #define GET_ICPC0(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC0)
0685 #define GET_ICPC1(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC1)
0686 #define GET_ICPC2(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC2)
0687 #define GET_ICPC3(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC3)
0688 #define GET_ICPC4(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC4)
0689 #define GET_ICPC5(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC5)
0690 #define GET_ICPC6(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC6)
0691 #define GET_ICPC7(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC7)
0692 #define GET_OCPC0(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC0)
0693 #define GET_OCPC1(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC1)
0694 #define GET_OCPC2(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC2)
0695 #define GET_OCPC3(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC3)
0696 #define GET_OCPC4(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC4)
0697 #define GET_OCPC5(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC5)
0698 #define GET_OCPC6(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC6)
0699 #define GET_OCPC7(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC7)
0700 #define NMRR_ICP(nmrr, n) (((nmrr) & (3 << ((n) * 2))) >> ((n) * 2))
0701 #define NMRR_OCP(nmrr, n) (((nmrr) & (3 << ((n) * 2 + 16))) >> \
0702 ((n) * 2 + 16))
0703
0704
0705 #define GET_FAULT(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT)
0706
0707 #define GET_FAULT_TF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_TF)
0708 #define GET_FAULT_AFF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_AFF)
0709 #define GET_FAULT_APF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_APF)
0710 #define GET_FAULT_TLBMF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_TLBMF)
0711 #define GET_FAULT_HTWDEEF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_HTWDEEF)
0712 #define GET_FAULT_HTWSEEF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_HTWSEEF)
0713 #define GET_FAULT_MHF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_MHF)
0714 #define GET_FAULT_SL(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_SL)
0715 #define GET_FAULT_SS(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_SS)
0716
0717 #define GET_NOFAULT_SS(b, c) GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_SS)
0718 #define GET_NOFAULT_MT(b, c) GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_MT)
0719 #define GET_NOFAULT_SH(b, c) GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_SH)
0720 #define GET_NOFAULT_NS(b, c) GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_NS)
0721 #define GET_NOFAULT_NOS(b, c) GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_NOS)
0722 #define GET_NPFAULT_PA(b, c) GET_CONTEXT_FIELD(b, c, PAR, PAR_NPFAULT_PA)
0723
0724
0725
0726 #define GET_MTC0(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC0)
0727 #define GET_MTC1(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC1)
0728 #define GET_MTC2(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC2)
0729 #define GET_MTC3(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC3)
0730 #define GET_MTC4(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC4)
0731 #define GET_MTC5(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC5)
0732 #define GET_MTC6(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC6)
0733 #define GET_MTC7(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC7)
0734 #define GET_SHDSH0(b, c) GET_CONTEXT_FIELD(b, c, PRRR, SHDSH0)
0735 #define GET_SHDSH1(b, c) GET_CONTEXT_FIELD(b, c, PRRR, SHDSH1)
0736 #define GET_SHNMSH0(b, c) GET_CONTEXT_FIELD(b, c, PRRR, SHNMSH0)
0737 #define GET_SHNMSH1(b, c) GET_CONTEXT_FIELD(b, c, PRRR, SHNMSH1)
0738 #define GET_NOS0(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS0)
0739 #define GET_NOS1(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS1)
0740 #define GET_NOS2(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS2)
0741 #define GET_NOS3(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS3)
0742 #define GET_NOS4(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS4)
0743 #define GET_NOS5(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS5)
0744 #define GET_NOS6(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS6)
0745 #define GET_NOS7(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS7)
0746 #define PRRR_NOS(prrr, n) ((prrr) & (1 << ((n) + 24)) ? 1 : 0)
0747 #define PRRR_MT(prrr, n) ((((prrr) & (3 << ((n) * 2))) >> ((n) * 2)))
0748
0749
0750
0751 #define GET_TNR(b, c) GET_CONTEXT_FIELD(b, c, RESUME, TNR)
0752
0753
0754
0755 #define GET_M(b, c) GET_CONTEXT_FIELD(b, c, SCTLR, M)
0756 #define GET_TRE(b, c) GET_CONTEXT_FIELD(b, c, SCTLR, TRE)
0757 #define GET_AFE(b, c) GET_CONTEXT_FIELD(b, c, SCTLR, AFE)
0758 #define GET_HAF(b, c) GET_CONTEXT_FIELD(b, c, SCTLR, HAF)
0759 #define GET_BE(b, c) GET_CONTEXT_FIELD(b, c, SCTLR, BE)
0760 #define GET_AFFD(b, c) GET_CONTEXT_FIELD(b, c, SCTLR, AFFD)
0761
0762
0763
0764 #define GET_LKE(b, c) GET_CONTEXT_FIELD(b, c, TLBLKCR, LKE)
0765 #define GET_TLBLCKR_TLBIALLCFG(b, c) \
0766 GET_CONTEXT_FIELD(b, c, TLBLKCR, TLBLCKR_TLBIALLCFG)
0767 #define GET_TLBIASIDCFG(b, c) GET_CONTEXT_FIELD(b, c, TLBLKCR, TLBIASIDCFG)
0768 #define GET_TLBIVAACFG(b, c) GET_CONTEXT_FIELD(b, c, TLBLKCR, TLBIVAACFG)
0769 #define GET_FLOOR(b, c) GET_CONTEXT_FIELD(b, c, TLBLKCR, FLOOR)
0770 #define GET_VICTIM(b, c) GET_CONTEXT_FIELD(b, c, TLBLKCR, VICTIM)
0771
0772
0773
0774 #define GET_N(b, c) GET_CONTEXT_FIELD(b, c, TTBCR, N)
0775 #define GET_PD0(b, c) GET_CONTEXT_FIELD(b, c, TTBCR, PD0)
0776 #define GET_PD1(b, c) GET_CONTEXT_FIELD(b, c, TTBCR, PD1)
0777
0778
0779
0780 #define GET_TTBR0_IRGNH(b, c) GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_IRGNH)
0781 #define GET_TTBR0_SH(b, c) GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_SH)
0782 #define GET_TTBR0_ORGN(b, c) GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_ORGN)
0783 #define GET_TTBR0_NOS(b, c) GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_NOS)
0784 #define GET_TTBR0_IRGNL(b, c) GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_IRGNL)
0785 #define GET_TTBR0_PA(b, c) GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_PA)
0786
0787
0788
0789 #define GET_TTBR1_IRGNH(b, c) GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_IRGNH)
0790 #define GET_TTBR1_SH(b, c) GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_SH)
0791 #define GET_TTBR1_ORGN(b, c) GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_ORGN)
0792 #define GET_TTBR1_NOS(b, c) GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_NOS)
0793 #define GET_TTBR1_IRGNL(b, c) GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_IRGNL)
0794 #define GET_TTBR1_PA(b, c) GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_PA)
0795
0796
0797
0798 #define GET_HIT(b, c) GET_CONTEXT_FIELD(b, c, V2PSR, HIT)
0799 #define GET_INDEX(b, c) GET_CONTEXT_FIELD(b, c, V2PSR, INDEX)
0800
0801
0802
0803 #define M2VCBR_N (0xFF000)
0804 #define CBACR_N (0xFF800)
0805 #define TLBRSW (0xFFE00)
0806 #define TLBTR0 (0xFFE80)
0807 #define TLBTR1 (0xFFE84)
0808 #define TLBTR2 (0xFFE88)
0809 #define TESTBUSCR (0xFFE8C)
0810 #define GLOBAL_TLBIALL (0xFFF00)
0811 #define TLBIVMID (0xFFF04)
0812 #define CR (0xFFF80)
0813 #define EAR (0xFFF84)
0814 #define ESR (0xFFF88)
0815 #define ESRRESTORE (0xFFF8C)
0816 #define ESYNR0 (0xFFF90)
0817 #define ESYNR1 (0xFFF94)
0818 #define REV (0xFFFF4)
0819 #define IDR (0xFFFF8)
0820 #define RPU_ACR (0xFFFFC)
0821
0822
0823
0824 #define SCTLR (0x000)
0825 #define ACTLR (0x004)
0826 #define CONTEXTIDR (0x008)
0827 #define TTBR0 (0x010)
0828 #define TTBR1 (0x014)
0829 #define TTBCR (0x018)
0830 #define PAR (0x01C)
0831 #define FSR (0x020)
0832 #define FSRRESTORE (0x024)
0833 #define FAR (0x028)
0834 #define FSYNR0 (0x02C)
0835 #define FSYNR1 (0x030)
0836 #define PRRR (0x034)
0837 #define NMRR (0x038)
0838 #define TLBLCKR (0x03C)
0839 #define V2PSR (0x040)
0840 #define TLBFLPTER (0x044)
0841 #define TLBSLPTER (0x048)
0842 #define BFBCR (0x04C)
0843 #define CTX_TLBIALL (0x800)
0844 #define TLBIASID (0x804)
0845 #define TLBIVA (0x808)
0846 #define TLBIVAA (0x80C)
0847 #define V2PPR (0x810)
0848 #define V2PPW (0x814)
0849 #define V2PUR (0x818)
0850 #define V2PUW (0x81C)
0851 #define RESUME (0x820)
0852
0853
0854
0855
0856 #define RWVMID (RWVMID_MASK << RWVMID_SHIFT)
0857 #define RWE (RWE_MASK << RWE_SHIFT)
0858 #define RWGE (RWGE_MASK << RWGE_SHIFT)
0859 #define CBVMID (CBVMID_MASK << CBVMID_SHIFT)
0860 #define IRPTNDX (IRPTNDX_MASK << IRPTNDX_SHIFT)
0861
0862
0863
0864 #define RPUE (RPUE_MASK << RPUE_SHIFT)
0865 #define RPUERE (RPUERE_MASK << RPUERE_SHIFT)
0866 #define RPUEIE (RPUEIE_MASK << RPUEIE_SHIFT)
0867 #define DCDEE (DCDEE_MASK << DCDEE_SHIFT)
0868 #define CLIENTPD (CLIENTPD_MASK << CLIENTPD_SHIFT)
0869 #define STALLD (STALLD_MASK << STALLD_SHIFT)
0870 #define TLBLKCRWE (TLBLKCRWE_MASK << TLBLKCRWE_SHIFT)
0871 #define CR_TLBIALLCFG (CR_TLBIALLCFG_MASK << CR_TLBIALLCFG_SHIFT)
0872 #define TLBIVMIDCFG (TLBIVMIDCFG_MASK << TLBIVMIDCFG_SHIFT)
0873 #define CR_HUME (CR_HUME_MASK << CR_HUME_SHIFT)
0874
0875
0876
0877 #define CFG (CFG_MASK << CFG_SHIFT)
0878 #define BYPASS (BYPASS_MASK << BYPASS_SHIFT)
0879 #define ESR_MULTI (ESR_MULTI_MASK << ESR_MULTI_SHIFT)
0880
0881
0882
0883 #define ESYNR0_AMID (ESYNR0_AMID_MASK << ESYNR0_AMID_SHIFT)
0884 #define ESYNR0_APID (ESYNR0_APID_MASK << ESYNR0_APID_SHIFT)
0885 #define ESYNR0_ABID (ESYNR0_ABID_MASK << ESYNR0_ABID_SHIFT)
0886 #define ESYNR0_AVMID (ESYNR0_AVMID_MASK << ESYNR0_AVMID_SHIFT)
0887 #define ESYNR0_ATID (ESYNR0_ATID_MASK << ESYNR0_ATID_SHIFT)
0888
0889
0890
0891 #define ESYNR1_AMEMTYPE (ESYNR1_AMEMTYPE_MASK << ESYNR1_AMEMTYPE_SHIFT)
0892 #define ESYNR1_ASHARED (ESYNR1_ASHARED_MASK << ESYNR1_ASHARED_SHIFT)
0893 #define ESYNR1_AINNERSHARED (ESYNR1_AINNERSHARED_MASK<< \
0894 ESYNR1_AINNERSHARED_SHIFT)
0895 #define ESYNR1_APRIV (ESYNR1_APRIV_MASK << ESYNR1_APRIV_SHIFT)
0896 #define ESYNR1_APROTNS (ESYNR1_APROTNS_MASK << ESYNR1_APROTNS_SHIFT)
0897 #define ESYNR1_AINST (ESYNR1_AINST_MASK << ESYNR1_AINST_SHIFT)
0898 #define ESYNR1_AWRITE (ESYNR1_AWRITE_MASK << ESYNR1_AWRITE_SHIFT)
0899 #define ESYNR1_ABURST (ESYNR1_ABURST_MASK << ESYNR1_ABURST_SHIFT)
0900 #define ESYNR1_ALEN (ESYNR1_ALEN_MASK << ESYNR1_ALEN_SHIFT)
0901 #define ESYNR1_ASIZE (ESYNR1_ASIZE_MASK << ESYNR1_ASIZE_SHIFT)
0902 #define ESYNR1_ALOCK (ESYNR1_ALOCK_MASK << ESYNR1_ALOCK_SHIFT)
0903 #define ESYNR1_AOOO (ESYNR1_AOOO_MASK << ESYNR1_AOOO_SHIFT)
0904 #define ESYNR1_AFULL (ESYNR1_AFULL_MASK << ESYNR1_AFULL_SHIFT)
0905 #define ESYNR1_AC (ESYNR1_AC_MASK << ESYNR1_AC_SHIFT)
0906 #define ESYNR1_DCD (ESYNR1_DCD_MASK << ESYNR1_DCD_SHIFT)
0907
0908
0909
0910 #define NM2VCBMT (NM2VCBMT_MASK << NM2VCBMT_SHIFT)
0911 #define HTW (HTW_MASK << HTW_SHIFT)
0912 #define HUM (HUM_MASK << HUM_SHIFT)
0913 #define TLBSIZE (TLBSIZE_MASK << TLBSIZE_SHIFT)
0914 #define NCB (NCB_MASK << NCB_SHIFT)
0915 #define NIRPT (NIRPT_MASK << NIRPT_SHIFT)
0916
0917
0918
0919 #define VMID (VMID_MASK << VMID_SHIFT)
0920 #define CBNDX (CBNDX_MASK << CBNDX_SHIFT)
0921 #define BYPASSD (BYPASSD_MASK << BYPASSD_SHIFT)
0922 #define BPRCOSH (BPRCOSH_MASK << BPRCOSH_SHIFT)
0923 #define BPRCISH (BPRCISH_MASK << BPRCISH_SHIFT)
0924 #define BPRCNSH (BPRCNSH_MASK << BPRCNSH_SHIFT)
0925 #define BPSHCFG (BPSHCFG_MASK << BPSHCFG_SHIFT)
0926 #define NSCFG (NSCFG_MASK << NSCFG_SHIFT)
0927 #define BPMTCFG (BPMTCFG_MASK << BPMTCFG_SHIFT)
0928 #define BPMEMTYPE (BPMEMTYPE_MASK << BPMEMTYPE_SHIFT)
0929
0930
0931
0932 #define IDR_MINOR (MINOR_MASK << MINOR_SHIFT)
0933 #define IDR_MAJOR (MAJOR_MASK << MAJOR_SHIFT)
0934
0935
0936
0937 #define TBE (TBE_MASK << TBE_SHIFT)
0938 #define SPDMBE (SPDMBE_MASK << SPDMBE_SHIFT)
0939 #define WGSEL (WGSEL_MASK << WGSEL_SHIFT)
0940 #define TBLSEL (TBLSEL_MASK << TBLSEL_SHIFT)
0941 #define TBHSEL (TBHSEL_MASK << TBHSEL_SHIFT)
0942 #define SPDM0SEL (SPDM0SEL_MASK << SPDM0SEL_SHIFT)
0943 #define SPDM1SEL (SPDM1SEL_MASK << SPDM1SEL_SHIFT)
0944 #define SPDM2SEL (SPDM2SEL_MASK << SPDM2SEL_SHIFT)
0945 #define SPDM3SEL (SPDM3SEL_MASK << SPDM3SEL_SHIFT)
0946
0947
0948
0949 #define TLBIVMID_VMID (TLBIVMID_VMID_MASK << TLBIVMID_VMID_SHIFT)
0950
0951
0952
0953 #define TLBRSW_INDEX (TLBRSW_INDEX_MASK << TLBRSW_INDEX_SHIFT)
0954 #define TLBBFBS (TLBBFBS_MASK << TLBBFBS_SHIFT)
0955
0956
0957
0958 #define PR (PR_MASK << PR_SHIFT)
0959 #define PW (PW_MASK << PW_SHIFT)
0960 #define UR (UR_MASK << UR_SHIFT)
0961 #define UW (UW_MASK << UW_SHIFT)
0962 #define XN (XN_MASK << XN_SHIFT)
0963 #define NSDESC (NSDESC_MASK << NSDESC_SHIFT)
0964 #define ISH (ISH_MASK << ISH_SHIFT)
0965 #define SH (SH_MASK << SH_SHIFT)
0966 #define MT (MT_MASK << MT_SHIFT)
0967 #define DPSIZR (DPSIZR_MASK << DPSIZR_SHIFT)
0968 #define DPSIZC (DPSIZC_MASK << DPSIZC_SHIFT)
0969
0970
0971
0972 #define TLBTR1_VMID (TLBTR1_VMID_MASK << TLBTR1_VMID_SHIFT)
0973 #define TLBTR1_PA (TLBTR1_PA_MASK << TLBTR1_PA_SHIFT)
0974
0975
0976
0977 #define TLBTR2_ASID (TLBTR2_ASID_MASK << TLBTR2_ASID_SHIFT)
0978 #define TLBTR2_V (TLBTR2_V_MASK << TLBTR2_V_SHIFT)
0979 #define TLBTR2_NSTID (TLBTR2_NSTID_MASK << TLBTR2_NSTID_SHIFT)
0980 #define TLBTR2_NV (TLBTR2_NV_MASK << TLBTR2_NV_SHIFT)
0981 #define TLBTR2_VA (TLBTR2_VA_MASK << TLBTR2_VA_SHIFT)
0982
0983
0984
0985
0986 #define CFERE (CFERE_MASK << CFERE_SHIFT)
0987 #define CFEIE (CFEIE_MASK << CFEIE_SHIFT)
0988 #define PTSHCFG (PTSHCFG_MASK << PTSHCFG_SHIFT)
0989 #define RCOSH (RCOSH_MASK << RCOSH_SHIFT)
0990 #define RCISH (RCISH_MASK << RCISH_SHIFT)
0991 #define RCNSH (RCNSH_MASK << RCNSH_SHIFT)
0992 #define PRIVCFG (PRIVCFG_MASK << PRIVCFG_SHIFT)
0993 #define DNA (DNA_MASK << DNA_SHIFT)
0994 #define DNLV2PA (DNLV2PA_MASK << DNLV2PA_SHIFT)
0995 #define TLBMCFG (TLBMCFG_MASK << TLBMCFG_SHIFT)
0996 #define CFCFG (CFCFG_MASK << CFCFG_SHIFT)
0997 #define TIPCF (TIPCF_MASK << TIPCF_SHIFT)
0998 #define V2PCFG (V2PCFG_MASK << V2PCFG_SHIFT)
0999 #define HUME (HUME_MASK << HUME_SHIFT)
1000 #define PTMTCFG (PTMTCFG_MASK << PTMTCFG_SHIFT)
1001 #define PTMEMTYPE (PTMEMTYPE_MASK << PTMEMTYPE_SHIFT)
1002
1003
1004
1005 #define BFBDFE (BFBDFE_MASK << BFBDFE_SHIFT)
1006 #define BFBSFE (BFBSFE_MASK << BFBSFE_SHIFT)
1007 #define SFVS (SFVS_MASK << SFVS_SHIFT)
1008 #define FLVIC (FLVIC_MASK << FLVIC_SHIFT)
1009 #define SLVIC (SLVIC_MASK << SLVIC_SHIFT)
1010
1011
1012
1013 #define CONTEXTIDR_ASID (CONTEXTIDR_ASID_MASK << CONTEXTIDR_ASID_SHIFT)
1014 #define PROCID (PROCID_MASK << PROCID_SHIFT)
1015
1016
1017
1018 #define TF (TF_MASK << TF_SHIFT)
1019 #define AFF (AFF_MASK << AFF_SHIFT)
1020 #define APF (APF_MASK << APF_SHIFT)
1021 #define TLBMF (TLBMF_MASK << TLBMF_SHIFT)
1022 #define HTWDEEF (HTWDEEF_MASK << HTWDEEF_SHIFT)
1023 #define HTWSEEF (HTWSEEF_MASK << HTWSEEF_SHIFT)
1024 #define MHF (MHF_MASK << MHF_SHIFT)
1025 #define SL (SL_MASK << SL_SHIFT)
1026 #define SS (SS_MASK << SS_SHIFT)
1027 #define MULTI (MULTI_MASK << MULTI_SHIFT)
1028
1029
1030
1031 #define AMID (AMID_MASK << AMID_SHIFT)
1032 #define APID (APID_MASK << APID_SHIFT)
1033 #define ABID (ABID_MASK << ABID_SHIFT)
1034 #define ATID (ATID_MASK << ATID_SHIFT)
1035
1036
1037
1038 #define AMEMTYPE (AMEMTYPE_MASK << AMEMTYPE_SHIFT)
1039 #define ASHARED (ASHARED_MASK << ASHARED_SHIFT)
1040 #define AINNERSHARED (AINNERSHARED_MASK << AINNERSHARED_SHIFT)
1041 #define APRIV (APRIV_MASK << APRIV_SHIFT)
1042 #define APROTNS (APROTNS_MASK << APROTNS_SHIFT)
1043 #define AINST (AINST_MASK << AINST_SHIFT)
1044 #define AWRITE (AWRITE_MASK << AWRITE_SHIFT)
1045 #define ABURST (ABURST_MASK << ABURST_SHIFT)
1046 #define ALEN (ALEN_MASK << ALEN_SHIFT)
1047 #define FSYNR1_ASIZE (FSYNR1_ASIZE_MASK << FSYNR1_ASIZE_SHIFT)
1048 #define ALOCK (ALOCK_MASK << ALOCK_SHIFT)
1049 #define AFULL (AFULL_MASK << AFULL_SHIFT)
1050
1051
1052
1053 #define ICPC0 (ICPC0_MASK << ICPC0_SHIFT)
1054 #define ICPC1 (ICPC1_MASK << ICPC1_SHIFT)
1055 #define ICPC2 (ICPC2_MASK << ICPC2_SHIFT)
1056 #define ICPC3 (ICPC3_MASK << ICPC3_SHIFT)
1057 #define ICPC4 (ICPC4_MASK << ICPC4_SHIFT)
1058 #define ICPC5 (ICPC5_MASK << ICPC5_SHIFT)
1059 #define ICPC6 (ICPC6_MASK << ICPC6_SHIFT)
1060 #define ICPC7 (ICPC7_MASK << ICPC7_SHIFT)
1061 #define OCPC0 (OCPC0_MASK << OCPC0_SHIFT)
1062 #define OCPC1 (OCPC1_MASK << OCPC1_SHIFT)
1063 #define OCPC2 (OCPC2_MASK << OCPC2_SHIFT)
1064 #define OCPC3 (OCPC3_MASK << OCPC3_SHIFT)
1065 #define OCPC4 (OCPC4_MASK << OCPC4_SHIFT)
1066 #define OCPC5 (OCPC5_MASK << OCPC5_SHIFT)
1067 #define OCPC6 (OCPC6_MASK << OCPC6_SHIFT)
1068 #define OCPC7 (OCPC7_MASK << OCPC7_SHIFT)
1069
1070
1071
1072 #define FAULT (FAULT_MASK << FAULT_SHIFT)
1073
1074
1075 #define FAULT_TF (FAULT_TF_MASK << FAULT_TF_SHIFT)
1076 #define FAULT_AFF (FAULT_AFF_MASK << FAULT_AFF_SHIFT)
1077 #define FAULT_APF (FAULT_APF_MASK << FAULT_APF_SHIFT)
1078 #define FAULT_TLBMF (FAULT_TLBMF_MASK << FAULT_TLBMF_SHIFT)
1079 #define FAULT_HTWDEEF (FAULT_HTWDEEF_MASK << FAULT_HTWDEEF_SHIFT)
1080 #define FAULT_HTWSEEF (FAULT_HTWSEEF_MASK << FAULT_HTWSEEF_SHIFT)
1081 #define FAULT_MHF (FAULT_MHF_MASK << FAULT_MHF_SHIFT)
1082 #define FAULT_SL (FAULT_SL_MASK << FAULT_SL_SHIFT)
1083 #define FAULT_SS (FAULT_SS_MASK << FAULT_SS_SHIFT)
1084
1085
1086
1087 #define PAR_NOFAULT_SS (PAR_NOFAULT_SS_MASK << PAR_NOFAULT_SS_SHIFT)
1088 #define PAR_NOFAULT_MT (PAR_NOFAULT_MT_MASK << PAR_NOFAULT_MT_SHIFT)
1089 #define PAR_NOFAULT_SH (PAR_NOFAULT_SH_MASK << PAR_NOFAULT_SH_SHIFT)
1090 #define PAR_NOFAULT_NS (PAR_NOFAULT_NS_MASK << PAR_NOFAULT_NS_SHIFT)
1091 #define PAR_NOFAULT_NOS (PAR_NOFAULT_NOS_MASK << PAR_NOFAULT_NOS_SHIFT)
1092 #define PAR_NPFAULT_PA (PAR_NPFAULT_PA_MASK << PAR_NPFAULT_PA_SHIFT)
1093
1094
1095
1096 #define MTC0 (MTC0_MASK << MTC0_SHIFT)
1097 #define MTC1 (MTC1_MASK << MTC1_SHIFT)
1098 #define MTC2 (MTC2_MASK << MTC2_SHIFT)
1099 #define MTC3 (MTC3_MASK << MTC3_SHIFT)
1100 #define MTC4 (MTC4_MASK << MTC4_SHIFT)
1101 #define MTC5 (MTC5_MASK << MTC5_SHIFT)
1102 #define MTC6 (MTC6_MASK << MTC6_SHIFT)
1103 #define MTC7 (MTC7_MASK << MTC7_SHIFT)
1104 #define SHDSH0 (SHDSH0_MASK << SHDSH0_SHIFT)
1105 #define SHDSH1 (SHDSH1_MASK << SHDSH1_SHIFT)
1106 #define SHNMSH0 (SHNMSH0_MASK << SHNMSH0_SHIFT)
1107 #define SHNMSH1 (SHNMSH1_MASK << SHNMSH1_SHIFT)
1108 #define NOS0 (NOS0_MASK << NOS0_SHIFT)
1109 #define NOS1 (NOS1_MASK << NOS1_SHIFT)
1110 #define NOS2 (NOS2_MASK << NOS2_SHIFT)
1111 #define NOS3 (NOS3_MASK << NOS3_SHIFT)
1112 #define NOS4 (NOS4_MASK << NOS4_SHIFT)
1113 #define NOS5 (NOS5_MASK << NOS5_SHIFT)
1114 #define NOS6 (NOS6_MASK << NOS6_SHIFT)
1115 #define NOS7 (NOS7_MASK << NOS7_SHIFT)
1116
1117
1118
1119 #define TNR (TNR_MASK << TNR_SHIFT)
1120
1121
1122
1123 #define M (M_MASK << M_SHIFT)
1124 #define TRE (TRE_MASK << TRE_SHIFT)
1125 #define AFE (AFE_MASK << AFE_SHIFT)
1126 #define HAF (HAF_MASK << HAF_SHIFT)
1127 #define BE (BE_MASK << BE_SHIFT)
1128 #define AFFD (AFFD_MASK << AFFD_SHIFT)
1129
1130
1131
1132 #define TLBIASID_ASID (TLBIASID_ASID_MASK << TLBIASID_ASID_SHIFT)
1133
1134
1135
1136 #define TLBIVA_ASID (TLBIVA_ASID_MASK << TLBIVA_ASID_SHIFT)
1137 #define TLBIVA_VA (TLBIVA_VA_MASK << TLBIVA_VA_SHIFT)
1138
1139
1140
1141 #define TLBIVAA_VA (TLBIVAA_VA_MASK << TLBIVAA_VA_SHIFT)
1142
1143
1144
1145 #define LKE (LKE_MASK << LKE_SHIFT)
1146 #define TLBLCKR_TLBIALLCFG (TLBLCKR_TLBIALLCFG_MASK<<TLBLCKR_TLBIALLCFG_SHIFT)
1147 #define TLBIASIDCFG (TLBIASIDCFG_MASK << TLBIASIDCFG_SHIFT)
1148 #define TLBIVAACFG (TLBIVAACFG_MASK << TLBIVAACFG_SHIFT)
1149 #define FLOOR (FLOOR_MASK << FLOOR_SHIFT)
1150 #define VICTIM (VICTIM_MASK << VICTIM_SHIFT)
1151
1152
1153
1154 #define N (N_MASK << N_SHIFT)
1155 #define PD0 (PD0_MASK << PD0_SHIFT)
1156 #define PD1 (PD1_MASK << PD1_SHIFT)
1157
1158
1159
1160 #define TTBR0_IRGNH (TTBR0_IRGNH_MASK << TTBR0_IRGNH_SHIFT)
1161 #define TTBR0_SH (TTBR0_SH_MASK << TTBR0_SH_SHIFT)
1162 #define TTBR0_ORGN (TTBR0_ORGN_MASK << TTBR0_ORGN_SHIFT)
1163 #define TTBR0_NOS (TTBR0_NOS_MASK << TTBR0_NOS_SHIFT)
1164 #define TTBR0_IRGNL (TTBR0_IRGNL_MASK << TTBR0_IRGNL_SHIFT)
1165 #define TTBR0_PA (TTBR0_PA_MASK << TTBR0_PA_SHIFT)
1166
1167
1168
1169 #define TTBR1_IRGNH (TTBR1_IRGNH_MASK << TTBR1_IRGNH_SHIFT)
1170 #define TTBR1_SH (TTBR1_SH_MASK << TTBR1_SH_SHIFT)
1171 #define TTBR1_ORGN (TTBR1_ORGN_MASK << TTBR1_ORGN_SHIFT)
1172 #define TTBR1_NOS (TTBR1_NOS_MASK << TTBR1_NOS_SHIFT)
1173 #define TTBR1_IRGNL (TTBR1_IRGNL_MASK << TTBR1_IRGNL_SHIFT)
1174 #define TTBR1_PA (TTBR1_PA_MASK << TTBR1_PA_SHIFT)
1175
1176
1177
1178 #define HIT (HIT_MASK << HIT_SHIFT)
1179 #define INDEX (INDEX_MASK << INDEX_SHIFT)
1180
1181
1182
1183 #define V2Pxx_INDEX (V2Pxx_INDEX_MASK << V2Pxx_INDEX_SHIFT)
1184 #define V2Pxx_VA (V2Pxx_VA_MASK << V2Pxx_VA_SHIFT)
1185
1186
1187
1188
1189 #define RWVMID_MASK 0x1F
1190 #define RWE_MASK 0x01
1191 #define RWGE_MASK 0x01
1192 #define CBVMID_MASK 0x1F
1193 #define IRPTNDX_MASK 0xFF
1194
1195
1196
1197 #define RPUE_MASK 0x01
1198 #define RPUERE_MASK 0x01
1199 #define RPUEIE_MASK 0x01
1200 #define DCDEE_MASK 0x01
1201 #define CLIENTPD_MASK 0x01
1202 #define STALLD_MASK 0x01
1203 #define TLBLKCRWE_MASK 0x01
1204 #define CR_TLBIALLCFG_MASK 0x01
1205 #define TLBIVMIDCFG_MASK 0x01
1206 #define CR_HUME_MASK 0x01
1207
1208
1209
1210 #define CFG_MASK 0x01
1211 #define BYPASS_MASK 0x01
1212 #define ESR_MULTI_MASK 0x01
1213
1214
1215
1216 #define ESYNR0_AMID_MASK 0xFF
1217 #define ESYNR0_APID_MASK 0x1F
1218 #define ESYNR0_ABID_MASK 0x07
1219 #define ESYNR0_AVMID_MASK 0x1F
1220 #define ESYNR0_ATID_MASK 0xFF
1221
1222
1223
1224 #define ESYNR1_AMEMTYPE_MASK 0x07
1225 #define ESYNR1_ASHARED_MASK 0x01
1226 #define ESYNR1_AINNERSHARED_MASK 0x01
1227 #define ESYNR1_APRIV_MASK 0x01
1228 #define ESYNR1_APROTNS_MASK 0x01
1229 #define ESYNR1_AINST_MASK 0x01
1230 #define ESYNR1_AWRITE_MASK 0x01
1231 #define ESYNR1_ABURST_MASK 0x01
1232 #define ESYNR1_ALEN_MASK 0x0F
1233 #define ESYNR1_ASIZE_MASK 0x01
1234 #define ESYNR1_ALOCK_MASK 0x03
1235 #define ESYNR1_AOOO_MASK 0x01
1236 #define ESYNR1_AFULL_MASK 0x01
1237 #define ESYNR1_AC_MASK 0x01
1238 #define ESYNR1_DCD_MASK 0x01
1239
1240
1241
1242 #define NM2VCBMT_MASK 0x1FF
1243 #define HTW_MASK 0x01
1244 #define HUM_MASK 0x01
1245 #define TLBSIZE_MASK 0x0F
1246 #define NCB_MASK 0xFF
1247 #define NIRPT_MASK 0xFF
1248
1249
1250
1251 #define VMID_MASK 0x1F
1252 #define CBNDX_MASK 0xFF
1253 #define BYPASSD_MASK 0x01
1254 #define BPRCOSH_MASK 0x01
1255 #define BPRCISH_MASK 0x01
1256 #define BPRCNSH_MASK 0x01
1257 #define BPSHCFG_MASK 0x03
1258 #define NSCFG_MASK 0x03
1259 #define BPMTCFG_MASK 0x01
1260 #define BPMEMTYPE_MASK 0x07
1261
1262
1263
1264 #define MINOR_MASK 0x0F
1265 #define MAJOR_MASK 0x0F
1266
1267
1268
1269 #define TBE_MASK 0x01
1270 #define SPDMBE_MASK 0x01
1271 #define WGSEL_MASK 0x03
1272 #define TBLSEL_MASK 0x03
1273 #define TBHSEL_MASK 0x03
1274 #define SPDM0SEL_MASK 0x0F
1275 #define SPDM1SEL_MASK 0x0F
1276 #define SPDM2SEL_MASK 0x0F
1277 #define SPDM3SEL_MASK 0x0F
1278
1279
1280
1281 #define TLBIVMID_VMID_MASK 0x1F
1282
1283
1284
1285 #define TLBRSW_INDEX_MASK 0xFF
1286 #define TLBBFBS_MASK 0x03
1287
1288
1289
1290 #define PR_MASK 0x01
1291 #define PW_MASK 0x01
1292 #define UR_MASK 0x01
1293 #define UW_MASK 0x01
1294 #define XN_MASK 0x01
1295 #define NSDESC_MASK 0x01
1296 #define ISH_MASK 0x01
1297 #define SH_MASK 0x01
1298 #define MT_MASK 0x07
1299 #define DPSIZR_MASK 0x07
1300 #define DPSIZC_MASK 0x07
1301
1302
1303
1304 #define TLBTR1_VMID_MASK 0x1F
1305 #define TLBTR1_PA_MASK 0x000FFFFF
1306
1307
1308
1309 #define TLBTR2_ASID_MASK 0xFF
1310 #define TLBTR2_V_MASK 0x01
1311 #define TLBTR2_NSTID_MASK 0x01
1312 #define TLBTR2_NV_MASK 0x01
1313 #define TLBTR2_VA_MASK 0x000FFFFF
1314
1315
1316
1317
1318 #define RWVMID_SHIFT 0
1319 #define RWE_SHIFT 8
1320 #define RWGE_SHIFT 9
1321 #define CBVMID_SHIFT 16
1322 #define IRPTNDX_SHIFT 24
1323
1324
1325
1326 #define RPUE_SHIFT 0
1327 #define RPUERE_SHIFT 1
1328 #define RPUEIE_SHIFT 2
1329 #define DCDEE_SHIFT 3
1330 #define CLIENTPD_SHIFT 4
1331 #define STALLD_SHIFT 5
1332 #define TLBLKCRWE_SHIFT 6
1333 #define CR_TLBIALLCFG_SHIFT 7
1334 #define TLBIVMIDCFG_SHIFT 8
1335 #define CR_HUME_SHIFT 9
1336
1337
1338
1339 #define CFG_SHIFT 0
1340 #define BYPASS_SHIFT 1
1341 #define ESR_MULTI_SHIFT 31
1342
1343
1344
1345 #define ESYNR0_AMID_SHIFT 0
1346 #define ESYNR0_APID_SHIFT 8
1347 #define ESYNR0_ABID_SHIFT 13
1348 #define ESYNR0_AVMID_SHIFT 16
1349 #define ESYNR0_ATID_SHIFT 24
1350
1351
1352
1353 #define ESYNR1_AMEMTYPE_SHIFT 0
1354 #define ESYNR1_ASHARED_SHIFT 3
1355 #define ESYNR1_AINNERSHARED_SHIFT 4
1356 #define ESYNR1_APRIV_SHIFT 5
1357 #define ESYNR1_APROTNS_SHIFT 6
1358 #define ESYNR1_AINST_SHIFT 7
1359 #define ESYNR1_AWRITE_SHIFT 8
1360 #define ESYNR1_ABURST_SHIFT 10
1361 #define ESYNR1_ALEN_SHIFT 12
1362 #define ESYNR1_ASIZE_SHIFT 16
1363 #define ESYNR1_ALOCK_SHIFT 20
1364 #define ESYNR1_AOOO_SHIFT 22
1365 #define ESYNR1_AFULL_SHIFT 24
1366 #define ESYNR1_AC_SHIFT 30
1367 #define ESYNR1_DCD_SHIFT 31
1368
1369
1370
1371 #define NM2VCBMT_SHIFT 0
1372 #define HTW_SHIFT 9
1373 #define HUM_SHIFT 10
1374 #define TLBSIZE_SHIFT 12
1375 #define NCB_SHIFT 16
1376 #define NIRPT_SHIFT 24
1377
1378
1379
1380 #define VMID_SHIFT 0
1381 #define CBNDX_SHIFT 8
1382 #define BYPASSD_SHIFT 16
1383 #define BPRCOSH_SHIFT 17
1384 #define BPRCISH_SHIFT 18
1385 #define BPRCNSH_SHIFT 19
1386 #define BPSHCFG_SHIFT 20
1387 #define NSCFG_SHIFT 22
1388 #define BPMTCFG_SHIFT 24
1389 #define BPMEMTYPE_SHIFT 25
1390
1391
1392
1393 #define MINOR_SHIFT 0
1394 #define MAJOR_SHIFT 4
1395
1396
1397
1398 #define TBE_SHIFT 0
1399 #define SPDMBE_SHIFT 1
1400 #define WGSEL_SHIFT 8
1401 #define TBLSEL_SHIFT 12
1402 #define TBHSEL_SHIFT 14
1403 #define SPDM0SEL_SHIFT 16
1404 #define SPDM1SEL_SHIFT 20
1405 #define SPDM2SEL_SHIFT 24
1406 #define SPDM3SEL_SHIFT 28
1407
1408
1409
1410 #define TLBIVMID_VMID_SHIFT 0
1411
1412
1413
1414 #define TLBRSW_INDEX_SHIFT 0
1415 #define TLBBFBS_SHIFT 8
1416
1417
1418
1419 #define PR_SHIFT 0
1420 #define PW_SHIFT 1
1421 #define UR_SHIFT 2
1422 #define UW_SHIFT 3
1423 #define XN_SHIFT 4
1424 #define NSDESC_SHIFT 6
1425 #define ISH_SHIFT 7
1426 #define SH_SHIFT 8
1427 #define MT_SHIFT 9
1428 #define DPSIZR_SHIFT 16
1429 #define DPSIZC_SHIFT 20
1430
1431
1432
1433 #define TLBTR1_VMID_SHIFT 0
1434 #define TLBTR1_PA_SHIFT 12
1435
1436
1437
1438 #define TLBTR2_ASID_SHIFT 0
1439 #define TLBTR2_V_SHIFT 8
1440 #define TLBTR2_NSTID_SHIFT 9
1441 #define TLBTR2_NV_SHIFT 10
1442 #define TLBTR2_VA_SHIFT 12
1443
1444
1445
1446
1447 #define CFERE_MASK 0x01
1448 #define CFEIE_MASK 0x01
1449 #define PTSHCFG_MASK 0x03
1450 #define RCOSH_MASK 0x01
1451 #define RCISH_MASK 0x01
1452 #define RCNSH_MASK 0x01
1453 #define PRIVCFG_MASK 0x03
1454 #define DNA_MASK 0x01
1455 #define DNLV2PA_MASK 0x01
1456 #define TLBMCFG_MASK 0x03
1457 #define CFCFG_MASK 0x01
1458 #define TIPCF_MASK 0x01
1459 #define V2PCFG_MASK 0x03
1460 #define HUME_MASK 0x01
1461 #define PTMTCFG_MASK 0x01
1462 #define PTMEMTYPE_MASK 0x07
1463
1464
1465
1466 #define BFBDFE_MASK 0x01
1467 #define BFBSFE_MASK 0x01
1468 #define SFVS_MASK 0x01
1469 #define FLVIC_MASK 0x0F
1470 #define SLVIC_MASK 0x0F
1471
1472
1473
1474 #define CONTEXTIDR_ASID_MASK 0xFF
1475 #define PROCID_MASK 0x00FFFFFF
1476
1477
1478
1479 #define TF_MASK 0x01
1480 #define AFF_MASK 0x01
1481 #define APF_MASK 0x01
1482 #define TLBMF_MASK 0x01
1483 #define HTWDEEF_MASK 0x01
1484 #define HTWSEEF_MASK 0x01
1485 #define MHF_MASK 0x01
1486 #define SL_MASK 0x01
1487 #define SS_MASK 0x01
1488 #define MULTI_MASK 0x01
1489
1490
1491
1492 #define AMID_MASK 0xFF
1493 #define APID_MASK 0x1F
1494 #define ABID_MASK 0x07
1495 #define ATID_MASK 0xFF
1496
1497
1498
1499 #define AMEMTYPE_MASK 0x07
1500 #define ASHARED_MASK 0x01
1501 #define AINNERSHARED_MASK 0x01
1502 #define APRIV_MASK 0x01
1503 #define APROTNS_MASK 0x01
1504 #define AINST_MASK 0x01
1505 #define AWRITE_MASK 0x01
1506 #define ABURST_MASK 0x01
1507 #define ALEN_MASK 0x0F
1508 #define FSYNR1_ASIZE_MASK 0x07
1509 #define ALOCK_MASK 0x03
1510 #define AFULL_MASK 0x01
1511
1512
1513
1514 #define ICPC0_MASK 0x03
1515 #define ICPC1_MASK 0x03
1516 #define ICPC2_MASK 0x03
1517 #define ICPC3_MASK 0x03
1518 #define ICPC4_MASK 0x03
1519 #define ICPC5_MASK 0x03
1520 #define ICPC6_MASK 0x03
1521 #define ICPC7_MASK 0x03
1522 #define OCPC0_MASK 0x03
1523 #define OCPC1_MASK 0x03
1524 #define OCPC2_MASK 0x03
1525 #define OCPC3_MASK 0x03
1526 #define OCPC4_MASK 0x03
1527 #define OCPC5_MASK 0x03
1528 #define OCPC6_MASK 0x03
1529 #define OCPC7_MASK 0x03
1530
1531
1532
1533 #define FAULT_MASK 0x01
1534
1535
1536 #define FAULT_TF_MASK 0x01
1537 #define FAULT_AFF_MASK 0x01
1538 #define FAULT_APF_MASK 0x01
1539 #define FAULT_TLBMF_MASK 0x01
1540 #define FAULT_HTWDEEF_MASK 0x01
1541 #define FAULT_HTWSEEF_MASK 0x01
1542 #define FAULT_MHF_MASK 0x01
1543 #define FAULT_SL_MASK 0x01
1544 #define FAULT_SS_MASK 0x01
1545
1546
1547
1548
1549 #define PAR_NOFAULT_SS_MASK 0x01
1550 #define PAR_NOFAULT_MT_MASK 0x07
1551 #define PAR_NOFAULT_SH_MASK 0x01
1552 #define PAR_NOFAULT_NS_MASK 0x01
1553 #define PAR_NOFAULT_NOS_MASK 0x01
1554 #define PAR_NPFAULT_PA_MASK 0x000FFFFF
1555
1556
1557
1558 #define MTC0_MASK 0x03
1559 #define MTC1_MASK 0x03
1560 #define MTC2_MASK 0x03
1561 #define MTC3_MASK 0x03
1562 #define MTC4_MASK 0x03
1563 #define MTC5_MASK 0x03
1564 #define MTC6_MASK 0x03
1565 #define MTC7_MASK 0x03
1566 #define SHDSH0_MASK 0x01
1567 #define SHDSH1_MASK 0x01
1568 #define SHNMSH0_MASK 0x01
1569 #define SHNMSH1_MASK 0x01
1570 #define NOS0_MASK 0x01
1571 #define NOS1_MASK 0x01
1572 #define NOS2_MASK 0x01
1573 #define NOS3_MASK 0x01
1574 #define NOS4_MASK 0x01
1575 #define NOS5_MASK 0x01
1576 #define NOS6_MASK 0x01
1577 #define NOS7_MASK 0x01
1578
1579
1580
1581 #define TNR_MASK 0x01
1582
1583
1584
1585 #define M_MASK 0x01
1586 #define TRE_MASK 0x01
1587 #define AFE_MASK 0x01
1588 #define HAF_MASK 0x01
1589 #define BE_MASK 0x01
1590 #define AFFD_MASK 0x01
1591
1592
1593
1594 #define TLBIASID_ASID_MASK 0xFF
1595
1596
1597
1598 #define TLBIVA_ASID_MASK 0xFF
1599 #define TLBIVA_VA_MASK 0x000FFFFF
1600
1601
1602
1603 #define TLBIVAA_VA_MASK 0x000FFFFF
1604
1605
1606
1607 #define LKE_MASK 0x01
1608 #define TLBLCKR_TLBIALLCFG_MASK 0x01
1609 #define TLBIASIDCFG_MASK 0x01
1610 #define TLBIVAACFG_MASK 0x01
1611 #define FLOOR_MASK 0xFF
1612 #define VICTIM_MASK 0xFF
1613
1614
1615
1616 #define N_MASK 0x07
1617 #define PD0_MASK 0x01
1618 #define PD1_MASK 0x01
1619
1620
1621
1622 #define TTBR0_IRGNH_MASK 0x01
1623 #define TTBR0_SH_MASK 0x01
1624 #define TTBR0_ORGN_MASK 0x03
1625 #define TTBR0_NOS_MASK 0x01
1626 #define TTBR0_IRGNL_MASK 0x01
1627 #define TTBR0_PA_MASK 0x0003FFFF
1628
1629
1630
1631 #define TTBR1_IRGNH_MASK 0x01
1632 #define TTBR1_SH_MASK 0x01
1633 #define TTBR1_ORGN_MASK 0x03
1634 #define TTBR1_NOS_MASK 0x01
1635 #define TTBR1_IRGNL_MASK 0x01
1636 #define TTBR1_PA_MASK 0x0003FFFF
1637
1638
1639
1640 #define HIT_MASK 0x01
1641 #define INDEX_MASK 0xFF
1642
1643
1644
1645 #define V2Pxx_INDEX_MASK 0xFF
1646 #define V2Pxx_VA_MASK 0x000FFFFF
1647
1648
1649
1650
1651 #define CFERE_SHIFT 0
1652 #define CFEIE_SHIFT 1
1653 #define PTSHCFG_SHIFT 2
1654 #define RCOSH_SHIFT 4
1655 #define RCISH_SHIFT 5
1656 #define RCNSH_SHIFT 6
1657 #define PRIVCFG_SHIFT 8
1658 #define DNA_SHIFT 10
1659 #define DNLV2PA_SHIFT 11
1660 #define TLBMCFG_SHIFT 12
1661 #define CFCFG_SHIFT 14
1662 #define TIPCF_SHIFT 15
1663 #define V2PCFG_SHIFT 16
1664 #define HUME_SHIFT 18
1665 #define PTMTCFG_SHIFT 20
1666 #define PTMEMTYPE_SHIFT 21
1667
1668
1669
1670 #define BFBDFE_SHIFT 0
1671 #define BFBSFE_SHIFT 1
1672 #define SFVS_SHIFT 2
1673 #define FLVIC_SHIFT 4
1674 #define SLVIC_SHIFT 8
1675
1676
1677
1678 #define CONTEXTIDR_ASID_SHIFT 0
1679 #define PROCID_SHIFT 8
1680
1681
1682
1683 #define TF_SHIFT 1
1684 #define AFF_SHIFT 2
1685 #define APF_SHIFT 3
1686 #define TLBMF_SHIFT 4
1687 #define HTWDEEF_SHIFT 5
1688 #define HTWSEEF_SHIFT 6
1689 #define MHF_SHIFT 7
1690 #define SL_SHIFT 16
1691 #define SS_SHIFT 30
1692 #define MULTI_SHIFT 31
1693
1694
1695
1696 #define AMID_SHIFT 0
1697 #define APID_SHIFT 8
1698 #define ABID_SHIFT 13
1699 #define ATID_SHIFT 24
1700
1701
1702
1703 #define AMEMTYPE_SHIFT 0
1704 #define ASHARED_SHIFT 3
1705 #define AINNERSHARED_SHIFT 4
1706 #define APRIV_SHIFT 5
1707 #define APROTNS_SHIFT 6
1708 #define AINST_SHIFT 7
1709 #define AWRITE_SHIFT 8
1710 #define ABURST_SHIFT 10
1711 #define ALEN_SHIFT 12
1712 #define FSYNR1_ASIZE_SHIFT 16
1713 #define ALOCK_SHIFT 20
1714 #define AFULL_SHIFT 24
1715
1716
1717
1718 #define ICPC0_SHIFT 0
1719 #define ICPC1_SHIFT 2
1720 #define ICPC2_SHIFT 4
1721 #define ICPC3_SHIFT 6
1722 #define ICPC4_SHIFT 8
1723 #define ICPC5_SHIFT 10
1724 #define ICPC6_SHIFT 12
1725 #define ICPC7_SHIFT 14
1726 #define OCPC0_SHIFT 16
1727 #define OCPC1_SHIFT 18
1728 #define OCPC2_SHIFT 20
1729 #define OCPC3_SHIFT 22
1730 #define OCPC4_SHIFT 24
1731 #define OCPC5_SHIFT 26
1732 #define OCPC6_SHIFT 28
1733 #define OCPC7_SHIFT 30
1734
1735
1736
1737 #define FAULT_SHIFT 0
1738
1739
1740 #define FAULT_TF_SHIFT 1
1741 #define FAULT_AFF_SHIFT 2
1742 #define FAULT_APF_SHIFT 3
1743 #define FAULT_TLBMF_SHIFT 4
1744 #define FAULT_HTWDEEF_SHIFT 5
1745 #define FAULT_HTWSEEF_SHIFT 6
1746 #define FAULT_MHF_SHIFT 7
1747 #define FAULT_SL_SHIFT 16
1748 #define FAULT_SS_SHIFT 30
1749
1750
1751
1752
1753 #define PAR_NOFAULT_SS_SHIFT 1
1754 #define PAR_NOFAULT_MT_SHIFT 4
1755 #define PAR_NOFAULT_SH_SHIFT 7
1756 #define PAR_NOFAULT_NS_SHIFT 9
1757 #define PAR_NOFAULT_NOS_SHIFT 10
1758 #define PAR_NPFAULT_PA_SHIFT 12
1759
1760
1761
1762 #define MTC0_SHIFT 0
1763 #define MTC1_SHIFT 2
1764 #define MTC2_SHIFT 4
1765 #define MTC3_SHIFT 6
1766 #define MTC4_SHIFT 8
1767 #define MTC5_SHIFT 10
1768 #define MTC6_SHIFT 12
1769 #define MTC7_SHIFT 14
1770 #define SHDSH0_SHIFT 16
1771 #define SHDSH1_SHIFT 17
1772 #define SHNMSH0_SHIFT 18
1773 #define SHNMSH1_SHIFT 19
1774 #define NOS0_SHIFT 24
1775 #define NOS1_SHIFT 25
1776 #define NOS2_SHIFT 26
1777 #define NOS3_SHIFT 27
1778 #define NOS4_SHIFT 28
1779 #define NOS5_SHIFT 29
1780 #define NOS6_SHIFT 30
1781 #define NOS7_SHIFT 31
1782
1783
1784
1785 #define TNR_SHIFT 0
1786
1787
1788
1789 #define M_SHIFT 0
1790 #define TRE_SHIFT 1
1791 #define AFE_SHIFT 2
1792 #define HAF_SHIFT 3
1793 #define BE_SHIFT 4
1794 #define AFFD_SHIFT 5
1795
1796
1797
1798 #define TLBIASID_ASID_SHIFT 0
1799
1800
1801
1802 #define TLBIVA_ASID_SHIFT 0
1803 #define TLBIVA_VA_SHIFT 12
1804
1805
1806
1807 #define TLBIVAA_VA_SHIFT 12
1808
1809
1810
1811 #define LKE_SHIFT 0
1812 #define TLBLCKR_TLBIALLCFG_SHIFT 1
1813 #define TLBIASIDCFG_SHIFT 2
1814 #define TLBIVAACFG_SHIFT 3
1815 #define FLOOR_SHIFT 8
1816 #define VICTIM_SHIFT 8
1817
1818
1819
1820 #define N_SHIFT 3
1821 #define PD0_SHIFT 4
1822 #define PD1_SHIFT 5
1823
1824
1825
1826 #define TTBR0_IRGNH_SHIFT 0
1827 #define TTBR0_SH_SHIFT 1
1828 #define TTBR0_ORGN_SHIFT 3
1829 #define TTBR0_NOS_SHIFT 5
1830 #define TTBR0_IRGNL_SHIFT 6
1831 #define TTBR0_PA_SHIFT 14
1832
1833
1834
1835 #define TTBR1_IRGNH_SHIFT 0
1836 #define TTBR1_SH_SHIFT 1
1837 #define TTBR1_ORGN_SHIFT 3
1838 #define TTBR1_NOS_SHIFT 5
1839 #define TTBR1_IRGNL_SHIFT 6
1840 #define TTBR1_PA_SHIFT 14
1841
1842
1843
1844 #define HIT_SHIFT 0
1845 #define INDEX_SHIFT 8
1846
1847
1848
1849 #define V2Pxx_INDEX_SHIFT 0
1850 #define V2Pxx_VA_SHIFT 12
1851
1852 #endif