• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
3  */
4 
5 #ifndef __ARCH_ARM_MACH_MSM_IOMMU_HW_8XXX_H
6 #define __ARCH_ARM_MACH_MSM_IOMMU_HW_8XXX_H
7 
8 #define CTX_SHIFT 12
9 
10 #define GET_GLOBAL_REG(reg, base) (readl((base) + (reg)))
11 #define GET_CTX_REG(reg, base, ctx) \
12 				(readl((base) + (reg) + ((ctx) << CTX_SHIFT)))
13 
14 #define SET_GLOBAL_REG(reg, base, val)	writel((val), ((base) + (reg)))
15 
16 #define SET_CTX_REG(reg, base, ctx, val) \
17 			writel((val), ((base) + (reg) + ((ctx) << CTX_SHIFT)))
18 
19 /* Wrappers for numbered registers */
20 #define SET_GLOBAL_REG_N(b, n, r, v) SET_GLOBAL_REG(b, ((r) + (n << 2)), (v))
21 #define GET_GLOBAL_REG_N(b, n, r)    GET_GLOBAL_REG(b, ((r) + (n << 2)))
22 
23 /* Field wrappers */
24 #define GET_GLOBAL_FIELD(b, r, F)    GET_FIELD(((b) + (r)), F##_MASK, F##_SHIFT)
25 #define GET_CONTEXT_FIELD(b, c, r, F)	\
26 	GET_FIELD(((b) + (r) + ((c) << CTX_SHIFT)), F##_MASK, F##_SHIFT)
27 
28 #define SET_GLOBAL_FIELD(b, r, F, v) \
29 	SET_FIELD(((b) + (r)), F##_MASK, F##_SHIFT, (v))
30 #define SET_CONTEXT_FIELD(b, c, r, F, v)	\
31 	SET_FIELD(((b) + (r) + ((c) << CTX_SHIFT)), F##_MASK, F##_SHIFT, (v))
32 
33 #define GET_FIELD(addr, mask, shift)  ((readl(addr) >> (shift)) & (mask))
34 
35 #define SET_FIELD(addr, mask, shift, v) \
36 do { \
37 	int t = readl(addr); \
38 	writel((t & ~((mask) << (shift))) + (((v) & (mask)) << (shift)), addr);\
39 } while (0)
40 
41 
42 #define NUM_FL_PTE	4096
43 #define NUM_SL_PTE	256
44 #define NUM_TEX_CLASS	8
45 
46 /* First-level page table bits */
47 #define FL_BASE_MASK		0xFFFFFC00
48 #define FL_TYPE_TABLE		(1 << 0)
49 #define FL_TYPE_SECT		(2 << 0)
50 #define FL_SUPERSECTION		(1 << 18)
51 #define FL_AP_WRITE		(1 << 10)
52 #define FL_AP_READ		(1 << 11)
53 #define FL_SHARED		(1 << 16)
54 #define FL_BUFFERABLE		(1 << 2)
55 #define FL_CACHEABLE		(1 << 3)
56 #define FL_TEX0			(1 << 12)
57 #define FL_OFFSET(va)		(((va) & 0xFFF00000) >> 20)
58 #define FL_NG			(1 << 17)
59 
60 /* Second-level page table bits */
61 #define SL_BASE_MASK_LARGE	0xFFFF0000
62 #define SL_BASE_MASK_SMALL	0xFFFFF000
63 #define SL_TYPE_LARGE		(1 << 0)
64 #define SL_TYPE_SMALL		(2 << 0)
65 #define SL_AP0			(1 << 4)
66 #define SL_AP1			(2 << 4)
67 #define SL_SHARED		(1 << 10)
68 #define SL_BUFFERABLE		(1 << 2)
69 #define SL_CACHEABLE		(1 << 3)
70 #define SL_TEX0			(1 << 6)
71 #define SL_OFFSET(va)		(((va) & 0xFF000) >> 12)
72 #define SL_NG			(1 << 11)
73 
74 /* Memory type and cache policy attributes */
75 #define MT_SO			0
76 #define MT_DEV			1
77 #define MT_NORMAL		2
78 #define CP_NONCACHED		0
79 #define CP_WB_WA		1
80 #define CP_WT			2
81 #define CP_WB_NWA		3
82 
83 /* Global register setters / getters */
84 #define SET_M2VCBR_N(b, N, v)	 SET_GLOBAL_REG_N(M2VCBR_N, N, (b), (v))
85 #define SET_CBACR_N(b, N, v)	 SET_GLOBAL_REG_N(CBACR_N, N, (b), (v))
86 #define SET_TLBRSW(b, v)	 SET_GLOBAL_REG(TLBRSW, (b), (v))
87 #define SET_TLBTR0(b, v)	 SET_GLOBAL_REG(TLBTR0, (b), (v))
88 #define SET_TLBTR1(b, v)	 SET_GLOBAL_REG(TLBTR1, (b), (v))
89 #define SET_TLBTR2(b, v)	 SET_GLOBAL_REG(TLBTR2, (b), (v))
90 #define SET_TESTBUSCR(b, v)	 SET_GLOBAL_REG(TESTBUSCR, (b), (v))
91 #define SET_GLOBAL_TLBIALL(b, v) SET_GLOBAL_REG(GLOBAL_TLBIALL, (b), (v))
92 #define SET_TLBIVMID(b, v)	 SET_GLOBAL_REG(TLBIVMID, (b), (v))
93 #define SET_CR(b, v)		 SET_GLOBAL_REG(CR, (b), (v))
94 #define SET_EAR(b, v)		 SET_GLOBAL_REG(EAR, (b), (v))
95 #define SET_ESR(b, v)		 SET_GLOBAL_REG(ESR, (b), (v))
96 #define SET_ESRRESTORE(b, v)	 SET_GLOBAL_REG(ESRRESTORE, (b), (v))
97 #define SET_ESYNR0(b, v)	 SET_GLOBAL_REG(ESYNR0, (b), (v))
98 #define SET_ESYNR1(b, v)	 SET_GLOBAL_REG(ESYNR1, (b), (v))
99 #define SET_RPU_ACR(b, v)	 SET_GLOBAL_REG(RPU_ACR, (b), (v))
100 
101 #define GET_M2VCBR_N(b, N)	 GET_GLOBAL_REG_N(M2VCBR_N, N, (b))
102 #define GET_CBACR_N(b, N)	 GET_GLOBAL_REG_N(CBACR_N, N, (b))
103 #define GET_TLBTR0(b)		 GET_GLOBAL_REG(TLBTR0, (b))
104 #define GET_TLBTR1(b)		 GET_GLOBAL_REG(TLBTR1, (b))
105 #define GET_TLBTR2(b)		 GET_GLOBAL_REG(TLBTR2, (b))
106 #define GET_TESTBUSCR(b)	 GET_GLOBAL_REG(TESTBUSCR, (b))
107 #define GET_GLOBAL_TLBIALL(b)	 GET_GLOBAL_REG(GLOBAL_TLBIALL, (b))
108 #define GET_TLBIVMID(b)		 GET_GLOBAL_REG(TLBIVMID, (b))
109 #define GET_CR(b)		 GET_GLOBAL_REG(CR, (b))
110 #define GET_EAR(b)		 GET_GLOBAL_REG(EAR, (b))
111 #define GET_ESR(b)		 GET_GLOBAL_REG(ESR, (b))
112 #define GET_ESRRESTORE(b)	 GET_GLOBAL_REG(ESRRESTORE, (b))
113 #define GET_ESYNR0(b)		 GET_GLOBAL_REG(ESYNR0, (b))
114 #define GET_ESYNR1(b)		 GET_GLOBAL_REG(ESYNR1, (b))
115 #define GET_REV(b)		 GET_GLOBAL_REG(REV, (b))
116 #define GET_IDR(b)		 GET_GLOBAL_REG(IDR, (b))
117 #define GET_RPU_ACR(b)		 GET_GLOBAL_REG(RPU_ACR, (b))
118 
119 
120 /* Context register setters/getters */
121 #define SET_SCTLR(b, c, v)	 SET_CTX_REG(SCTLR, (b), (c), (v))
122 #define SET_ACTLR(b, c, v)	 SET_CTX_REG(ACTLR, (b), (c), (v))
123 #define SET_CONTEXTIDR(b, c, v)	 SET_CTX_REG(CONTEXTIDR, (b), (c), (v))
124 #define SET_TTBR0(b, c, v)	 SET_CTX_REG(TTBR0, (b), (c), (v))
125 #define SET_TTBR1(b, c, v)	 SET_CTX_REG(TTBR1, (b), (c), (v))
126 #define SET_TTBCR(b, c, v)	 SET_CTX_REG(TTBCR, (b), (c), (v))
127 #define SET_PAR(b, c, v)	 SET_CTX_REG(PAR, (b), (c), (v))
128 #define SET_FSR(b, c, v)	 SET_CTX_REG(FSR, (b), (c), (v))
129 #define SET_FSRRESTORE(b, c, v)	 SET_CTX_REG(FSRRESTORE, (b), (c), (v))
130 #define SET_FAR(b, c, v)	 SET_CTX_REG(FAR, (b), (c), (v))
131 #define SET_FSYNR0(b, c, v)	 SET_CTX_REG(FSYNR0, (b), (c), (v))
132 #define SET_FSYNR1(b, c, v)	 SET_CTX_REG(FSYNR1, (b), (c), (v))
133 #define SET_PRRR(b, c, v)	 SET_CTX_REG(PRRR, (b), (c), (v))
134 #define SET_NMRR(b, c, v)	 SET_CTX_REG(NMRR, (b), (c), (v))
135 #define SET_TLBLKCR(b, c, v)	 SET_CTX_REG(TLBLCKR, (b), (c), (v))
136 #define SET_V2PSR(b, c, v)	 SET_CTX_REG(V2PSR, (b), (c), (v))
137 #define SET_TLBFLPTER(b, c, v)	 SET_CTX_REG(TLBFLPTER, (b), (c), (v))
138 #define SET_TLBSLPTER(b, c, v)	 SET_CTX_REG(TLBSLPTER, (b), (c), (v))
139 #define SET_BFBCR(b, c, v)	 SET_CTX_REG(BFBCR, (b), (c), (v))
140 #define SET_CTX_TLBIALL(b, c, v) SET_CTX_REG(CTX_TLBIALL, (b), (c), (v))
141 #define SET_TLBIASID(b, c, v)	 SET_CTX_REG(TLBIASID, (b), (c), (v))
142 #define SET_TLBIVA(b, c, v)	 SET_CTX_REG(TLBIVA, (b), (c), (v))
143 #define SET_TLBIVAA(b, c, v)	 SET_CTX_REG(TLBIVAA, (b), (c), (v))
144 #define SET_V2PPR(b, c, v)	 SET_CTX_REG(V2PPR, (b), (c), (v))
145 #define SET_V2PPW(b, c, v)	 SET_CTX_REG(V2PPW, (b), (c), (v))
146 #define SET_V2PUR(b, c, v)	 SET_CTX_REG(V2PUR, (b), (c), (v))
147 #define SET_V2PUW(b, c, v)	 SET_CTX_REG(V2PUW, (b), (c), (v))
148 #define SET_RESUME(b, c, v)	 SET_CTX_REG(RESUME, (b), (c), (v))
149 
150 #define GET_SCTLR(b, c)		 GET_CTX_REG(SCTLR, (b), (c))
151 #define GET_ACTLR(b, c)		 GET_CTX_REG(ACTLR, (b), (c))
152 #define GET_CONTEXTIDR(b, c)	 GET_CTX_REG(CONTEXTIDR, (b), (c))
153 #define GET_TTBR0(b, c)		 GET_CTX_REG(TTBR0, (b), (c))
154 #define GET_TTBR1(b, c)		 GET_CTX_REG(TTBR1, (b), (c))
155 #define GET_TTBCR(b, c)		 GET_CTX_REG(TTBCR, (b), (c))
156 #define GET_PAR(b, c)		 GET_CTX_REG(PAR, (b), (c))
157 #define GET_FSR(b, c)		 GET_CTX_REG(FSR, (b), (c))
158 #define GET_FSRRESTORE(b, c)	 GET_CTX_REG(FSRRESTORE, (b), (c))
159 #define GET_FAR(b, c)		 GET_CTX_REG(FAR, (b), (c))
160 #define GET_FSYNR0(b, c)	 GET_CTX_REG(FSYNR0, (b), (c))
161 #define GET_FSYNR1(b, c)	 GET_CTX_REG(FSYNR1, (b), (c))
162 #define GET_PRRR(b, c)		 GET_CTX_REG(PRRR, (b), (c))
163 #define GET_NMRR(b, c)		 GET_CTX_REG(NMRR, (b), (c))
164 #define GET_TLBLCKR(b, c)	 GET_CTX_REG(TLBLCKR, (b), (c))
165 #define GET_V2PSR(b, c)		 GET_CTX_REG(V2PSR, (b), (c))
166 #define GET_TLBFLPTER(b, c)	 GET_CTX_REG(TLBFLPTER, (b), (c))
167 #define GET_TLBSLPTER(b, c)	 GET_CTX_REG(TLBSLPTER, (b), (c))
168 #define GET_BFBCR(b, c)		 GET_CTX_REG(BFBCR, (b), (c))
169 #define GET_CTX_TLBIALL(b, c)	 GET_CTX_REG(CTX_TLBIALL, (b), (c))
170 #define GET_TLBIASID(b, c)	 GET_CTX_REG(TLBIASID, (b), (c))
171 #define GET_TLBIVA(b, c)	 GET_CTX_REG(TLBIVA, (b), (c))
172 #define GET_TLBIVAA(b, c)	 GET_CTX_REG(TLBIVAA, (b), (c))
173 #define GET_V2PPR(b, c)		 GET_CTX_REG(V2PPR, (b), (c))
174 #define GET_V2PPW(b, c)		 GET_CTX_REG(V2PPW, (b), (c))
175 #define GET_V2PUR(b, c)		 GET_CTX_REG(V2PUR, (b), (c))
176 #define GET_V2PUW(b, c)		 GET_CTX_REG(V2PUW, (b), (c))
177 #define GET_RESUME(b, c)	 GET_CTX_REG(RESUME, (b), (c))
178 
179 
180 /* Global field setters / getters */
181 /* Global Field Setters: */
182 /* CBACR_N */
183 #define SET_RWVMID(b, n, v)   SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWVMID, v)
184 #define SET_RWE(b, n, v)      SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWE, v)
185 #define SET_RWGE(b, n, v)     SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWGE, v)
186 #define SET_CBVMID(b, n, v)   SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), CBVMID, v)
187 #define SET_IRPTNDX(b, n, v)  SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), IRPTNDX, v)
188 
189 
190 /* M2VCBR_N */
191 #define SET_VMID(b, n, v)     SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), VMID, v)
192 #define SET_CBNDX(b, n, v)    SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), CBNDX, v)
193 #define SET_BYPASSD(b, n, v)  SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BYPASSD, v)
194 #define SET_BPRCOSH(b, n, v)  SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCOSH, v)
195 #define SET_BPRCISH(b, n, v)  SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCISH, v)
196 #define SET_BPRCNSH(b, n, v)  SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCNSH, v)
197 #define SET_BPSHCFG(b, n, v)  SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPSHCFG, v)
198 #define SET_NSCFG(b, n, v)    SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), NSCFG, v)
199 #define SET_BPMTCFG(b, n, v)  SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPMTCFG, v)
200 #define SET_BPMEMTYPE(b, n, v) \
201 	SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPMEMTYPE, v)
202 
203 
204 /* CR */
205 #define SET_RPUE(b, v)		 SET_GLOBAL_FIELD(b, CR, RPUE, v)
206 #define SET_RPUERE(b, v)	 SET_GLOBAL_FIELD(b, CR, RPUERE, v)
207 #define SET_RPUEIE(b, v)	 SET_GLOBAL_FIELD(b, CR, RPUEIE, v)
208 #define SET_DCDEE(b, v)		 SET_GLOBAL_FIELD(b, CR, DCDEE, v)
209 #define SET_CLIENTPD(b, v)       SET_GLOBAL_FIELD(b, CR, CLIENTPD, v)
210 #define SET_STALLD(b, v)	 SET_GLOBAL_FIELD(b, CR, STALLD, v)
211 #define SET_TLBLKCRWE(b, v)      SET_GLOBAL_FIELD(b, CR, TLBLKCRWE, v)
212 #define SET_CR_TLBIALLCFG(b, v)  SET_GLOBAL_FIELD(b, CR, CR_TLBIALLCFG, v)
213 #define SET_TLBIVMIDCFG(b, v)    SET_GLOBAL_FIELD(b, CR, TLBIVMIDCFG, v)
214 #define SET_CR_HUME(b, v)        SET_GLOBAL_FIELD(b, CR, CR_HUME, v)
215 
216 
217 /* ESR */
218 #define SET_CFG(b, v)		 SET_GLOBAL_FIELD(b, ESR, CFG, v)
219 #define SET_BYPASS(b, v)	 SET_GLOBAL_FIELD(b, ESR, BYPASS, v)
220 #define SET_ESR_MULTI(b, v)      SET_GLOBAL_FIELD(b, ESR, ESR_MULTI, v)
221 
222 
223 /* ESYNR0 */
224 #define SET_ESYNR0_AMID(b, v)    SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_AMID, v)
225 #define SET_ESYNR0_APID(b, v)    SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_APID, v)
226 #define SET_ESYNR0_ABID(b, v)    SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_ABID, v)
227 #define SET_ESYNR0_AVMID(b, v)   SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_AVMID, v)
228 #define SET_ESYNR0_ATID(b, v)    SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_ATID, v)
229 
230 
231 /* ESYNR1 */
232 #define SET_ESYNR1_AMEMTYPE(b, v) \
233 			SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AMEMTYPE, v)
234 #define SET_ESYNR1_ASHARED(b, v)  SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ASHARED, v)
235 #define SET_ESYNR1_AINNERSHARED(b, v) \
236 			SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AINNERSHARED, v)
237 #define SET_ESYNR1_APRIV(b, v)   SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_APRIV, v)
238 #define SET_ESYNR1_APROTNS(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_APROTNS, v)
239 #define SET_ESYNR1_AINST(b, v)   SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AINST, v)
240 #define SET_ESYNR1_AWRITE(b, v)  SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AWRITE, v)
241 #define SET_ESYNR1_ABURST(b, v)  SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ABURST, v)
242 #define SET_ESYNR1_ALEN(b, v)    SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ALEN, v)
243 #define SET_ESYNR1_ASIZE(b, v)   SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ASIZE, v)
244 #define SET_ESYNR1_ALOCK(b, v)   SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ALOCK, v)
245 #define SET_ESYNR1_AOOO(b, v)    SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AOOO, v)
246 #define SET_ESYNR1_AFULL(b, v)   SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AFULL, v)
247 #define SET_ESYNR1_AC(b, v)      SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AC, v)
248 #define SET_ESYNR1_DCD(b, v)     SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_DCD, v)
249 
250 
251 /* TESTBUSCR */
252 #define SET_TBE(b, v)		 SET_GLOBAL_FIELD(b, TESTBUSCR, TBE, v)
253 #define SET_SPDMBE(b, v)	 SET_GLOBAL_FIELD(b, TESTBUSCR, SPDMBE, v)
254 #define SET_WGSEL(b, v)		 SET_GLOBAL_FIELD(b, TESTBUSCR, WGSEL, v)
255 #define SET_TBLSEL(b, v)	 SET_GLOBAL_FIELD(b, TESTBUSCR, TBLSEL, v)
256 #define SET_TBHSEL(b, v)	 SET_GLOBAL_FIELD(b, TESTBUSCR, TBHSEL, v)
257 #define SET_SPDM0SEL(b, v)       SET_GLOBAL_FIELD(b, TESTBUSCR, SPDM0SEL, v)
258 #define SET_SPDM1SEL(b, v)       SET_GLOBAL_FIELD(b, TESTBUSCR, SPDM1SEL, v)
259 #define SET_SPDM2SEL(b, v)       SET_GLOBAL_FIELD(b, TESTBUSCR, SPDM2SEL, v)
260 #define SET_SPDM3SEL(b, v)       SET_GLOBAL_FIELD(b, TESTBUSCR, SPDM3SEL, v)
261 
262 
263 /* TLBIVMID */
264 #define SET_TLBIVMID_VMID(b, v)  SET_GLOBAL_FIELD(b, TLBIVMID, TLBIVMID_VMID, v)
265 
266 
267 /* TLBRSW */
268 #define SET_TLBRSW_INDEX(b, v)   SET_GLOBAL_FIELD(b, TLBRSW, TLBRSW_INDEX, v)
269 #define SET_TLBBFBS(b, v)	 SET_GLOBAL_FIELD(b, TLBRSW, TLBBFBS, v)
270 
271 
272 /* TLBTR0 */
273 #define SET_PR(b, v)		 SET_GLOBAL_FIELD(b, TLBTR0, PR, v)
274 #define SET_PW(b, v)		 SET_GLOBAL_FIELD(b, TLBTR0, PW, v)
275 #define SET_UR(b, v)		 SET_GLOBAL_FIELD(b, TLBTR0, UR, v)
276 #define SET_UW(b, v)		 SET_GLOBAL_FIELD(b, TLBTR0, UW, v)
277 #define SET_XN(b, v)		 SET_GLOBAL_FIELD(b, TLBTR0, XN, v)
278 #define SET_NSDESC(b, v)	 SET_GLOBAL_FIELD(b, TLBTR0, NSDESC, v)
279 #define SET_ISH(b, v)		 SET_GLOBAL_FIELD(b, TLBTR0, ISH, v)
280 #define SET_SH(b, v)		 SET_GLOBAL_FIELD(b, TLBTR0, SH, v)
281 #define SET_MT(b, v)		 SET_GLOBAL_FIELD(b, TLBTR0, MT, v)
282 #define SET_DPSIZR(b, v)	 SET_GLOBAL_FIELD(b, TLBTR0, DPSIZR, v)
283 #define SET_DPSIZC(b, v)	 SET_GLOBAL_FIELD(b, TLBTR0, DPSIZC, v)
284 
285 
286 /* TLBTR1 */
287 #define SET_TLBTR1_VMID(b, v)    SET_GLOBAL_FIELD(b, TLBTR1, TLBTR1_VMID, v)
288 #define SET_TLBTR1_PA(b, v)      SET_GLOBAL_FIELD(b, TLBTR1, TLBTR1_PA, v)
289 
290 
291 /* TLBTR2 */
292 #define SET_TLBTR2_ASID(b, v)    SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_ASID, v)
293 #define SET_TLBTR2_V(b, v)       SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_V, v)
294 #define SET_TLBTR2_NSTID(b, v)   SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_NSTID, v)
295 #define SET_TLBTR2_NV(b, v)      SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_NV, v)
296 #define SET_TLBTR2_VA(b, v)      SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_VA, v)
297 
298 
299 /* Global Field Getters */
300 /* CBACR_N */
301 #define GET_RWVMID(b, n)	 GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWVMID)
302 #define GET_RWE(b, n)		 GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWE)
303 #define GET_RWGE(b, n)		 GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWGE)
304 #define GET_CBVMID(b, n)	 GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), CBVMID)
305 #define GET_IRPTNDX(b, n)	 GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), IRPTNDX)
306 
307 
308 /* M2VCBR_N */
309 #define GET_VMID(b, n)       GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), VMID)
310 #define GET_CBNDX(b, n)      GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), CBNDX)
311 #define GET_BYPASSD(b, n)    GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BYPASSD)
312 #define GET_BPRCOSH(b, n)    GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCOSH)
313 #define GET_BPRCISH(b, n)    GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCISH)
314 #define GET_BPRCNSH(b, n)    GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCNSH)
315 #define GET_BPSHCFG(b, n)    GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPSHCFG)
316 #define GET_NSCFG(b, n)      GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), NSCFG)
317 #define GET_BPMTCFG(b, n)    GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPMTCFG)
318 #define GET_BPMEMTYPE(b, n)  GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPMEMTYPE)
319 
320 
321 /* CR */
322 #define GET_RPUE(b)		 GET_GLOBAL_FIELD(b, CR, RPUE)
323 #define GET_RPUERE(b)		 GET_GLOBAL_FIELD(b, CR, RPUERE)
324 #define GET_RPUEIE(b)		 GET_GLOBAL_FIELD(b, CR, RPUEIE)
325 #define GET_DCDEE(b)		 GET_GLOBAL_FIELD(b, CR, DCDEE)
326 #define GET_CLIENTPD(b)		 GET_GLOBAL_FIELD(b, CR, CLIENTPD)
327 #define GET_STALLD(b)		 GET_GLOBAL_FIELD(b, CR, STALLD)
328 #define GET_TLBLKCRWE(b)	 GET_GLOBAL_FIELD(b, CR, TLBLKCRWE)
329 #define GET_CR_TLBIALLCFG(b)	 GET_GLOBAL_FIELD(b, CR, CR_TLBIALLCFG)
330 #define GET_TLBIVMIDCFG(b)	 GET_GLOBAL_FIELD(b, CR, TLBIVMIDCFG)
331 #define GET_CR_HUME(b)		 GET_GLOBAL_FIELD(b, CR, CR_HUME)
332 
333 
334 /* ESR */
335 #define GET_CFG(b)		 GET_GLOBAL_FIELD(b, ESR, CFG)
336 #define GET_BYPASS(b)		 GET_GLOBAL_FIELD(b, ESR, BYPASS)
337 #define GET_ESR_MULTI(b)	 GET_GLOBAL_FIELD(b, ESR, ESR_MULTI)
338 
339 
340 /* ESYNR0 */
341 #define GET_ESYNR0_AMID(b)	 GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_AMID)
342 #define GET_ESYNR0_APID(b)	 GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_APID)
343 #define GET_ESYNR0_ABID(b)	 GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_ABID)
344 #define GET_ESYNR0_AVMID(b)	 GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_AVMID)
345 #define GET_ESYNR0_ATID(b)	 GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_ATID)
346 
347 
348 /* ESYNR1 */
349 #define GET_ESYNR1_AMEMTYPE(b)   GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AMEMTYPE)
350 #define GET_ESYNR1_ASHARED(b)    GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ASHARED)
351 #define GET_ESYNR1_AINNERSHARED(b) \
352 			GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AINNERSHARED)
353 #define GET_ESYNR1_APRIV(b)      GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_APRIV)
354 #define GET_ESYNR1_APROTNS(b)	 GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_APROTNS)
355 #define GET_ESYNR1_AINST(b)	 GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AINST)
356 #define GET_ESYNR1_AWRITE(b)	 GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AWRITE)
357 #define GET_ESYNR1_ABURST(b)	 GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ABURST)
358 #define GET_ESYNR1_ALEN(b)	 GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ALEN)
359 #define GET_ESYNR1_ASIZE(b)	 GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ASIZE)
360 #define GET_ESYNR1_ALOCK(b)	 GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ALOCK)
361 #define GET_ESYNR1_AOOO(b)	 GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AOOO)
362 #define GET_ESYNR1_AFULL(b)	 GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AFULL)
363 #define GET_ESYNR1_AC(b)	 GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AC)
364 #define GET_ESYNR1_DCD(b)	 GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_DCD)
365 
366 
367 /* IDR */
368 #define GET_NM2VCBMT(b)		 GET_GLOBAL_FIELD(b, IDR, NM2VCBMT)
369 #define GET_HTW(b)		 GET_GLOBAL_FIELD(b, IDR, HTW)
370 #define GET_HUM(b)		 GET_GLOBAL_FIELD(b, IDR, HUM)
371 #define GET_TLBSIZE(b)		 GET_GLOBAL_FIELD(b, IDR, TLBSIZE)
372 #define GET_NCB(b)		 GET_GLOBAL_FIELD(b, IDR, NCB)
373 #define GET_NIRPT(b)		 GET_GLOBAL_FIELD(b, IDR, NIRPT)
374 
375 
376 /* REV */
377 #define GET_MAJOR(b)		 GET_GLOBAL_FIELD(b, REV, MAJOR)
378 #define GET_MINOR(b)		 GET_GLOBAL_FIELD(b, REV, MINOR)
379 
380 
381 /* TESTBUSCR */
382 #define GET_TBE(b)		 GET_GLOBAL_FIELD(b, TESTBUSCR, TBE)
383 #define GET_SPDMBE(b)		 GET_GLOBAL_FIELD(b, TESTBUSCR, SPDMBE)
384 #define GET_WGSEL(b)		 GET_GLOBAL_FIELD(b, TESTBUSCR, WGSEL)
385 #define GET_TBLSEL(b)		 GET_GLOBAL_FIELD(b, TESTBUSCR, TBLSEL)
386 #define GET_TBHSEL(b)		 GET_GLOBAL_FIELD(b, TESTBUSCR, TBHSEL)
387 #define GET_SPDM0SEL(b)		 GET_GLOBAL_FIELD(b, TESTBUSCR, SPDM0SEL)
388 #define GET_SPDM1SEL(b)		 GET_GLOBAL_FIELD(b, TESTBUSCR, SPDM1SEL)
389 #define GET_SPDM2SEL(b)		 GET_GLOBAL_FIELD(b, TESTBUSCR, SPDM2SEL)
390 #define GET_SPDM3SEL(b)		 GET_GLOBAL_FIELD(b, TESTBUSCR, SPDM3SEL)
391 
392 
393 /* TLBIVMID */
394 #define GET_TLBIVMID_VMID(b)	 GET_GLOBAL_FIELD(b, TLBIVMID, TLBIVMID_VMID)
395 
396 
397 /* TLBTR0 */
398 #define GET_PR(b)		 GET_GLOBAL_FIELD(b, TLBTR0, PR)
399 #define GET_PW(b)		 GET_GLOBAL_FIELD(b, TLBTR0, PW)
400 #define GET_UR(b)		 GET_GLOBAL_FIELD(b, TLBTR0, UR)
401 #define GET_UW(b)		 GET_GLOBAL_FIELD(b, TLBTR0, UW)
402 #define GET_XN(b)		 GET_GLOBAL_FIELD(b, TLBTR0, XN)
403 #define GET_NSDESC(b)		 GET_GLOBAL_FIELD(b, TLBTR0, NSDESC)
404 #define GET_ISH(b)		 GET_GLOBAL_FIELD(b, TLBTR0, ISH)
405 #define GET_SH(b)		 GET_GLOBAL_FIELD(b, TLBTR0, SH)
406 #define GET_MT(b)		 GET_GLOBAL_FIELD(b, TLBTR0, MT)
407 #define GET_DPSIZR(b)		 GET_GLOBAL_FIELD(b, TLBTR0, DPSIZR)
408 #define GET_DPSIZC(b)		 GET_GLOBAL_FIELD(b, TLBTR0, DPSIZC)
409 
410 
411 /* TLBTR1 */
412 #define GET_TLBTR1_VMID(b)	 GET_GLOBAL_FIELD(b, TLBTR1, TLBTR1_VMID)
413 #define GET_TLBTR1_PA(b)	 GET_GLOBAL_FIELD(b, TLBTR1, TLBTR1_PA)
414 
415 
416 /* TLBTR2 */
417 #define GET_TLBTR2_ASID(b)	 GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_ASID)
418 #define GET_TLBTR2_V(b)		 GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_V)
419 #define GET_TLBTR2_NSTID(b)	 GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_NSTID)
420 #define GET_TLBTR2_NV(b)	 GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_NV)
421 #define GET_TLBTR2_VA(b)	 GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_VA)
422 
423 
424 /* Context Register setters / getters */
425 /* Context Register setters */
426 /* ACTLR */
427 #define SET_CFERE(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, CFERE, v)
428 #define SET_CFEIE(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, CFEIE, v)
429 #define SET_PTSHCFG(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, PTSHCFG, v)
430 #define SET_RCOSH(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, RCOSH, v)
431 #define SET_RCISH(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, RCISH, v)
432 #define SET_RCNSH(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, RCNSH, v)
433 #define SET_PRIVCFG(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, PRIVCFG, v)
434 #define SET_DNA(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, DNA, v)
435 #define SET_DNLV2PA(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, DNLV2PA, v)
436 #define SET_TLBMCFG(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, TLBMCFG, v)
437 #define SET_CFCFG(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, CFCFG, v)
438 #define SET_TIPCF(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, TIPCF, v)
439 #define SET_V2PCFG(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, V2PCFG, v)
440 #define SET_HUME(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, HUME, v)
441 #define SET_PTMTCFG(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, PTMTCFG, v)
442 #define SET_PTMEMTYPE(b, c, v)	 SET_CONTEXT_FIELD(b, c, ACTLR, PTMEMTYPE, v)
443 
444 
445 /* BFBCR */
446 #define SET_BFBDFE(b, c, v)	 SET_CONTEXT_FIELD(b, c, BFBCR, BFBDFE, v)
447 #define SET_BFBSFE(b, c, v)	 SET_CONTEXT_FIELD(b, c, BFBCR, BFBSFE, v)
448 #define SET_SFVS(b, c, v)	 SET_CONTEXT_FIELD(b, c, BFBCR, SFVS, v)
449 #define SET_FLVIC(b, c, v)	 SET_CONTEXT_FIELD(b, c, BFBCR, FLVIC, v)
450 #define SET_SLVIC(b, c, v)	 SET_CONTEXT_FIELD(b, c, BFBCR, SLVIC, v)
451 
452 
453 /* CONTEXTIDR */
454 #define SET_CONTEXTIDR_ASID(b, c, v)   \
455 		SET_CONTEXT_FIELD(b, c, CONTEXTIDR, CONTEXTIDR_ASID, v)
456 #define SET_CONTEXTIDR_PROCID(b, c, v) \
457 		SET_CONTEXT_FIELD(b, c, CONTEXTIDR, PROCID, v)
458 
459 
460 /* FSR */
461 #define SET_TF(b, c, v)		 SET_CONTEXT_FIELD(b, c, FSR, TF, v)
462 #define SET_AFF(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSR, AFF, v)
463 #define SET_APF(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSR, APF, v)
464 #define SET_TLBMF(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSR, TLBMF, v)
465 #define SET_HTWDEEF(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSR, HTWDEEF, v)
466 #define SET_HTWSEEF(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSR, HTWSEEF, v)
467 #define SET_MHF(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSR, MHF, v)
468 #define SET_SL(b, c, v)		 SET_CONTEXT_FIELD(b, c, FSR, SL, v)
469 #define SET_SS(b, c, v)		 SET_CONTEXT_FIELD(b, c, FSR, SS, v)
470 #define SET_MULTI(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSR, MULTI, v)
471 
472 
473 /* FSYNR0 */
474 #define SET_AMID(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSYNR0, AMID, v)
475 #define SET_APID(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSYNR0, APID, v)
476 #define SET_ABID(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSYNR0, ABID, v)
477 #define SET_ATID(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSYNR0, ATID, v)
478 
479 
480 /* FSYNR1 */
481 #define SET_AMEMTYPE(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSYNR1, AMEMTYPE, v)
482 #define SET_ASHARED(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSYNR1, ASHARED, v)
483 #define SET_AINNERSHARED(b, c, v)  \
484 				SET_CONTEXT_FIELD(b, c, FSYNR1, AINNERSHARED, v)
485 #define SET_APRIV(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSYNR1, APRIV, v)
486 #define SET_APROTNS(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSYNR1, APROTNS, v)
487 #define SET_AINST(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSYNR1, AINST, v)
488 #define SET_AWRITE(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSYNR1, AWRITE, v)
489 #define SET_ABURST(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSYNR1, ABURST, v)
490 #define SET_ALEN(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSYNR1, ALEN, v)
491 #define SET_FSYNR1_ASIZE(b, c, v) \
492 				SET_CONTEXT_FIELD(b, c, FSYNR1, FSYNR1_ASIZE, v)
493 #define SET_ALOCK(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSYNR1, ALOCK, v)
494 #define SET_AFULL(b, c, v)	 SET_CONTEXT_FIELD(b, c, FSYNR1, AFULL, v)
495 
496 
497 /* NMRR */
498 #define SET_ICPC0(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, ICPC0, v)
499 #define SET_ICPC1(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, ICPC1, v)
500 #define SET_ICPC2(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, ICPC2, v)
501 #define SET_ICPC3(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, ICPC3, v)
502 #define SET_ICPC4(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, ICPC4, v)
503 #define SET_ICPC5(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, ICPC5, v)
504 #define SET_ICPC6(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, ICPC6, v)
505 #define SET_ICPC7(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, ICPC7, v)
506 #define SET_OCPC0(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, OCPC0, v)
507 #define SET_OCPC1(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, OCPC1, v)
508 #define SET_OCPC2(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, OCPC2, v)
509 #define SET_OCPC3(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, OCPC3, v)
510 #define SET_OCPC4(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, OCPC4, v)
511 #define SET_OCPC5(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, OCPC5, v)
512 #define SET_OCPC6(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, OCPC6, v)
513 #define SET_OCPC7(b, c, v)	 SET_CONTEXT_FIELD(b, c, NMRR, OCPC7, v)
514 
515 
516 /* PAR */
517 #define SET_FAULT(b, c, v)	 SET_CONTEXT_FIELD(b, c, PAR, FAULT, v)
518 
519 #define SET_FAULT_TF(b, c, v)	 SET_CONTEXT_FIELD(b, c, PAR, FAULT_TF, v)
520 #define SET_FAULT_AFF(b, c, v)	 SET_CONTEXT_FIELD(b, c, PAR, FAULT_AFF, v)
521 #define SET_FAULT_APF(b, c, v)	 SET_CONTEXT_FIELD(b, c, PAR, FAULT_APF, v)
522 #define SET_FAULT_TLBMF(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_TLBMF, v)
523 #define SET_FAULT_HTWDEEF(b, c, v) \
524 				SET_CONTEXT_FIELD(b, c, PAR, FAULT_HTWDEEF, v)
525 #define SET_FAULT_HTWSEEF(b, c, v) \
526 				SET_CONTEXT_FIELD(b, c, PAR, FAULT_HTWSEEF, v)
527 #define SET_FAULT_MHF(b, c, v)	 SET_CONTEXT_FIELD(b, c, PAR, FAULT_MHF, v)
528 #define SET_FAULT_SL(b, c, v)	 SET_CONTEXT_FIELD(b, c, PAR, FAULT_SL, v)
529 #define SET_FAULT_SS(b, c, v)	 SET_CONTEXT_FIELD(b, c, PAR, FAULT_SS, v)
530 
531 #define SET_NOFAULT_SS(b, c, v)	 SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_SS, v)
532 #define SET_NOFAULT_MT(b, c, v)	 SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_MT, v)
533 #define SET_NOFAULT_SH(b, c, v)	 SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_SH, v)
534 #define SET_NOFAULT_NS(b, c, v)	 SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_NS, v)
535 #define SET_NOFAULT_NOS(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_NOS, v)
536 #define SET_NPFAULT_PA(b, c, v)	 SET_CONTEXT_FIELD(b, c, PAR, NPFAULT_PA, v)
537 
538 
539 /* PRRR */
540 #define SET_MTC0(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, MTC0, v)
541 #define SET_MTC1(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, MTC1, v)
542 #define SET_MTC2(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, MTC2, v)
543 #define SET_MTC3(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, MTC3, v)
544 #define SET_MTC4(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, MTC4, v)
545 #define SET_MTC5(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, MTC5, v)
546 #define SET_MTC6(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, MTC6, v)
547 #define SET_MTC7(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, MTC7, v)
548 #define SET_SHDSH0(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, SHDSH0, v)
549 #define SET_SHDSH1(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, SHDSH1, v)
550 #define SET_SHNMSH0(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, SHNMSH0, v)
551 #define SET_SHNMSH1(b, c, v)     SET_CONTEXT_FIELD(b, c, PRRR, SHNMSH1, v)
552 #define SET_NOS0(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, NOS0, v)
553 #define SET_NOS1(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, NOS1, v)
554 #define SET_NOS2(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, NOS2, v)
555 #define SET_NOS3(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, NOS3, v)
556 #define SET_NOS4(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, NOS4, v)
557 #define SET_NOS5(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, NOS5, v)
558 #define SET_NOS6(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, NOS6, v)
559 #define SET_NOS7(b, c, v)	 SET_CONTEXT_FIELD(b, c, PRRR, NOS7, v)
560 
561 
562 /* RESUME */
563 #define SET_TNR(b, c, v)	 SET_CONTEXT_FIELD(b, c, RESUME, TNR, v)
564 
565 
566 /* SCTLR */
567 #define SET_M(b, c, v)		 SET_CONTEXT_FIELD(b, c, SCTLR, M, v)
568 #define SET_TRE(b, c, v)	 SET_CONTEXT_FIELD(b, c, SCTLR, TRE, v)
569 #define SET_AFE(b, c, v)	 SET_CONTEXT_FIELD(b, c, SCTLR, AFE, v)
570 #define SET_HAF(b, c, v)	 SET_CONTEXT_FIELD(b, c, SCTLR, HAF, v)
571 #define SET_BE(b, c, v)		 SET_CONTEXT_FIELD(b, c, SCTLR, BE, v)
572 #define SET_AFFD(b, c, v)	 SET_CONTEXT_FIELD(b, c, SCTLR, AFFD, v)
573 
574 
575 /* TLBLKCR */
576 #define SET_LKE(b, c, v)	   SET_CONTEXT_FIELD(b, c, TLBLKCR, LKE, v)
577 #define SET_TLBLKCR_TLBIALLCFG(b, c, v) \
578 			SET_CONTEXT_FIELD(b, c, TLBLKCR, TLBLCKR_TLBIALLCFG, v)
579 #define SET_TLBIASIDCFG(b, c, v) \
580 			SET_CONTEXT_FIELD(b, c, TLBLKCR, TLBIASIDCFG, v)
581 #define SET_TLBIVAACFG(b, c, v)	SET_CONTEXT_FIELD(b, c, TLBLKCR, TLBIVAACFG, v)
582 #define SET_FLOOR(b, c, v)	SET_CONTEXT_FIELD(b, c, TLBLKCR, FLOOR, v)
583 #define SET_VICTIM(b, c, v)	SET_CONTEXT_FIELD(b, c, TLBLKCR, VICTIM, v)
584 
585 
586 /* TTBCR */
587 #define SET_N(b, c, v)	         SET_CONTEXT_FIELD(b, c, TTBCR, N, v)
588 #define SET_PD0(b, c, v)	 SET_CONTEXT_FIELD(b, c, TTBCR, PD0, v)
589 #define SET_PD1(b, c, v)	 SET_CONTEXT_FIELD(b, c, TTBCR, PD1, v)
590 
591 
592 /* TTBR0 */
593 #define SET_TTBR0_IRGNH(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_IRGNH, v)
594 #define SET_TTBR0_SH(b, c, v)	 SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_SH, v)
595 #define SET_TTBR0_ORGN(b, c, v)	 SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_ORGN, v)
596 #define SET_TTBR0_NOS(b, c, v)	 SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_NOS, v)
597 #define SET_TTBR0_IRGNL(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_IRGNL, v)
598 #define SET_TTBR0_PA(b, c, v)	 SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_PA, v)
599 
600 
601 /* TTBR1 */
602 #define SET_TTBR1_IRGNH(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_IRGNH, v)
603 #define SET_TTBR1_SH(b, c, v)	 SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_SH, v)
604 #define SET_TTBR1_ORGN(b, c, v)	 SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_ORGN, v)
605 #define SET_TTBR1_NOS(b, c, v)	 SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_NOS, v)
606 #define SET_TTBR1_IRGNL(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_IRGNL, v)
607 #define SET_TTBR1_PA(b, c, v)	 SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_PA, v)
608 
609 
610 /* V2PSR */
611 #define SET_HIT(b, c, v)	 SET_CONTEXT_FIELD(b, c, V2PSR, HIT, v)
612 #define SET_INDEX(b, c, v)	 SET_CONTEXT_FIELD(b, c, V2PSR, INDEX, v)
613 
614 
615 /* Context Register getters */
616 /* ACTLR */
617 #define GET_CFERE(b, c)	        GET_CONTEXT_FIELD(b, c, ACTLR, CFERE)
618 #define GET_CFEIE(b, c)	        GET_CONTEXT_FIELD(b, c, ACTLR, CFEIE)
619 #define GET_PTSHCFG(b, c)       GET_CONTEXT_FIELD(b, c, ACTLR, PTSHCFG)
620 #define GET_RCOSH(b, c)	        GET_CONTEXT_FIELD(b, c, ACTLR, RCOSH)
621 #define GET_RCISH(b, c)	        GET_CONTEXT_FIELD(b, c, ACTLR, RCISH)
622 #define GET_RCNSH(b, c)	        GET_CONTEXT_FIELD(b, c, ACTLR, RCNSH)
623 #define GET_PRIVCFG(b, c)       GET_CONTEXT_FIELD(b, c, ACTLR, PRIVCFG)
624 #define GET_DNA(b, c)	        GET_CONTEXT_FIELD(b, c, ACTLR, DNA)
625 #define GET_DNLV2PA(b, c)       GET_CONTEXT_FIELD(b, c, ACTLR, DNLV2PA)
626 #define GET_TLBMCFG(b, c)       GET_CONTEXT_FIELD(b, c, ACTLR, TLBMCFG)
627 #define GET_CFCFG(b, c)	        GET_CONTEXT_FIELD(b, c, ACTLR, CFCFG)
628 #define GET_TIPCF(b, c)	        GET_CONTEXT_FIELD(b, c, ACTLR, TIPCF)
629 #define GET_V2PCFG(b, c)        GET_CONTEXT_FIELD(b, c, ACTLR, V2PCFG)
630 #define GET_HUME(b, c)	        GET_CONTEXT_FIELD(b, c, ACTLR, HUME)
631 #define GET_PTMTCFG(b, c)       GET_CONTEXT_FIELD(b, c, ACTLR, PTMTCFG)
632 #define GET_PTMEMTYPE(b, c)     GET_CONTEXT_FIELD(b, c, ACTLR, PTMEMTYPE)
633 
634 /* BFBCR */
635 #define GET_BFBDFE(b, c)	GET_CONTEXT_FIELD(b, c, BFBCR, BFBDFE)
636 #define GET_BFBSFE(b, c)	GET_CONTEXT_FIELD(b, c, BFBCR, BFBSFE)
637 #define GET_SFVS(b, c)		GET_CONTEXT_FIELD(b, c, BFBCR, SFVS)
638 #define GET_FLVIC(b, c)		GET_CONTEXT_FIELD(b, c, BFBCR, FLVIC)
639 #define GET_SLVIC(b, c)		GET_CONTEXT_FIELD(b, c, BFBCR, SLVIC)
640 
641 
642 /* CONTEXTIDR */
643 #define GET_CONTEXTIDR_ASID(b, c) \
644 			GET_CONTEXT_FIELD(b, c, CONTEXTIDR, CONTEXTIDR_ASID)
645 #define GET_CONTEXTIDR_PROCID(b, c) GET_CONTEXT_FIELD(b, c, CONTEXTIDR, PROCID)
646 
647 
648 /* FSR */
649 #define GET_TF(b, c)		GET_CONTEXT_FIELD(b, c, FSR, TF)
650 #define GET_AFF(b, c)		GET_CONTEXT_FIELD(b, c, FSR, AFF)
651 #define GET_APF(b, c)		GET_CONTEXT_FIELD(b, c, FSR, APF)
652 #define GET_TLBMF(b, c)		GET_CONTEXT_FIELD(b, c, FSR, TLBMF)
653 #define GET_HTWDEEF(b, c)	GET_CONTEXT_FIELD(b, c, FSR, HTWDEEF)
654 #define GET_HTWSEEF(b, c)	GET_CONTEXT_FIELD(b, c, FSR, HTWSEEF)
655 #define GET_MHF(b, c)		GET_CONTEXT_FIELD(b, c, FSR, MHF)
656 #define GET_SL(b, c)		GET_CONTEXT_FIELD(b, c, FSR, SL)
657 #define GET_SS(b, c)		GET_CONTEXT_FIELD(b, c, FSR, SS)
658 #define GET_MULTI(b, c)		GET_CONTEXT_FIELD(b, c, FSR, MULTI)
659 
660 
661 /* FSYNR0 */
662 #define GET_AMID(b, c)		GET_CONTEXT_FIELD(b, c, FSYNR0, AMID)
663 #define GET_APID(b, c)		GET_CONTEXT_FIELD(b, c, FSYNR0, APID)
664 #define GET_ABID(b, c)		GET_CONTEXT_FIELD(b, c, FSYNR0, ABID)
665 #define GET_ATID(b, c)		GET_CONTEXT_FIELD(b, c, FSYNR0, ATID)
666 
667 
668 /* FSYNR1 */
669 #define GET_AMEMTYPE(b, c)	GET_CONTEXT_FIELD(b, c, FSYNR1, AMEMTYPE)
670 #define GET_ASHARED(b, c)	GET_CONTEXT_FIELD(b, c, FSYNR1, ASHARED)
671 #define GET_AINNERSHARED(b, c)  GET_CONTEXT_FIELD(b, c, FSYNR1, AINNERSHARED)
672 #define GET_APRIV(b, c)		GET_CONTEXT_FIELD(b, c, FSYNR1, APRIV)
673 #define GET_APROTNS(b, c)	GET_CONTEXT_FIELD(b, c, FSYNR1, APROTNS)
674 #define GET_AINST(b, c)		GET_CONTEXT_FIELD(b, c, FSYNR1, AINST)
675 #define GET_AWRITE(b, c)	GET_CONTEXT_FIELD(b, c, FSYNR1, AWRITE)
676 #define GET_ABURST(b, c)	GET_CONTEXT_FIELD(b, c, FSYNR1, ABURST)
677 #define GET_ALEN(b, c)		GET_CONTEXT_FIELD(b, c, FSYNR1, ALEN)
678 #define GET_FSYNR1_ASIZE(b, c)	GET_CONTEXT_FIELD(b, c, FSYNR1, FSYNR1_ASIZE)
679 #define GET_ALOCK(b, c)		GET_CONTEXT_FIELD(b, c, FSYNR1, ALOCK)
680 #define GET_AFULL(b, c)		GET_CONTEXT_FIELD(b, c, FSYNR1, AFULL)
681 
682 
683 /* NMRR */
684 #define GET_ICPC0(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, ICPC0)
685 #define GET_ICPC1(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, ICPC1)
686 #define GET_ICPC2(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, ICPC2)
687 #define GET_ICPC3(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, ICPC3)
688 #define GET_ICPC4(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, ICPC4)
689 #define GET_ICPC5(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, ICPC5)
690 #define GET_ICPC6(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, ICPC6)
691 #define GET_ICPC7(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, ICPC7)
692 #define GET_OCPC0(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, OCPC0)
693 #define GET_OCPC1(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, OCPC1)
694 #define GET_OCPC2(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, OCPC2)
695 #define GET_OCPC3(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, OCPC3)
696 #define GET_OCPC4(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, OCPC4)
697 #define GET_OCPC5(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, OCPC5)
698 #define GET_OCPC6(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, OCPC6)
699 #define GET_OCPC7(b, c)		GET_CONTEXT_FIELD(b, c, NMRR, OCPC7)
700 #define NMRR_ICP(nmrr, n)	(((nmrr) & (3 << ((n) * 2))) >> ((n) * 2))
701 #define NMRR_OCP(nmrr, n)	(((nmrr) & (3 << ((n) * 2 + 16))) >> \
702 								((n) * 2 + 16))
703 
704 /* PAR */
705 #define GET_FAULT(b, c)		GET_CONTEXT_FIELD(b, c, PAR, FAULT)
706 
707 #define GET_FAULT_TF(b, c)	GET_CONTEXT_FIELD(b, c, PAR, FAULT_TF)
708 #define GET_FAULT_AFF(b, c)	GET_CONTEXT_FIELD(b, c, PAR, FAULT_AFF)
709 #define GET_FAULT_APF(b, c)	GET_CONTEXT_FIELD(b, c, PAR, FAULT_APF)
710 #define GET_FAULT_TLBMF(b, c)   GET_CONTEXT_FIELD(b, c, PAR, FAULT_TLBMF)
711 #define GET_FAULT_HTWDEEF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_HTWDEEF)
712 #define GET_FAULT_HTWSEEF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_HTWSEEF)
713 #define GET_FAULT_MHF(b, c)	GET_CONTEXT_FIELD(b, c, PAR, FAULT_MHF)
714 #define GET_FAULT_SL(b, c)	GET_CONTEXT_FIELD(b, c, PAR, FAULT_SL)
715 #define GET_FAULT_SS(b, c)	GET_CONTEXT_FIELD(b, c, PAR, FAULT_SS)
716 
717 #define GET_NOFAULT_SS(b, c)	GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_SS)
718 #define GET_NOFAULT_MT(b, c)	GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_MT)
719 #define GET_NOFAULT_SH(b, c)	GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_SH)
720 #define GET_NOFAULT_NS(b, c)	GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_NS)
721 #define GET_NOFAULT_NOS(b, c)   GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_NOS)
722 #define GET_NPFAULT_PA(b, c)	GET_CONTEXT_FIELD(b, c, PAR, PAR_NPFAULT_PA)
723 
724 
725 /* PRRR */
726 #define GET_MTC0(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, MTC0)
727 #define GET_MTC1(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, MTC1)
728 #define GET_MTC2(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, MTC2)
729 #define GET_MTC3(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, MTC3)
730 #define GET_MTC4(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, MTC4)
731 #define GET_MTC5(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, MTC5)
732 #define GET_MTC6(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, MTC6)
733 #define GET_MTC7(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, MTC7)
734 #define GET_SHDSH0(b, c)	GET_CONTEXT_FIELD(b, c, PRRR, SHDSH0)
735 #define GET_SHDSH1(b, c)	GET_CONTEXT_FIELD(b, c, PRRR, SHDSH1)
736 #define GET_SHNMSH0(b, c)	GET_CONTEXT_FIELD(b, c, PRRR, SHNMSH0)
737 #define GET_SHNMSH1(b, c)	GET_CONTEXT_FIELD(b, c, PRRR, SHNMSH1)
738 #define GET_NOS0(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, NOS0)
739 #define GET_NOS1(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, NOS1)
740 #define GET_NOS2(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, NOS2)
741 #define GET_NOS3(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, NOS3)
742 #define GET_NOS4(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, NOS4)
743 #define GET_NOS5(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, NOS5)
744 #define GET_NOS6(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, NOS6)
745 #define GET_NOS7(b, c)		GET_CONTEXT_FIELD(b, c, PRRR, NOS7)
746 #define PRRR_NOS(prrr, n)	 ((prrr) & (1 << ((n) + 24)) ? 1 : 0)
747 #define PRRR_MT(prrr, n)	 ((((prrr) & (3 << ((n) * 2))) >> ((n) * 2)))
748 
749 
750 /* RESUME */
751 #define GET_TNR(b, c)		GET_CONTEXT_FIELD(b, c, RESUME, TNR)
752 
753 
754 /* SCTLR */
755 #define GET_M(b, c)		GET_CONTEXT_FIELD(b, c, SCTLR, M)
756 #define GET_TRE(b, c)		GET_CONTEXT_FIELD(b, c, SCTLR, TRE)
757 #define GET_AFE(b, c)		GET_CONTEXT_FIELD(b, c, SCTLR, AFE)
758 #define GET_HAF(b, c)		GET_CONTEXT_FIELD(b, c, SCTLR, HAF)
759 #define GET_BE(b, c)		GET_CONTEXT_FIELD(b, c, SCTLR, BE)
760 #define GET_AFFD(b, c)		GET_CONTEXT_FIELD(b, c, SCTLR, AFFD)
761 
762 
763 /* TLBLKCR */
764 #define GET_LKE(b, c)		GET_CONTEXT_FIELD(b, c, TLBLKCR, LKE)
765 #define GET_TLBLCKR_TLBIALLCFG(b, c) \
766 			GET_CONTEXT_FIELD(b, c, TLBLKCR, TLBLCKR_TLBIALLCFG)
767 #define GET_TLBIASIDCFG(b, c)   GET_CONTEXT_FIELD(b, c, TLBLKCR, TLBIASIDCFG)
768 #define GET_TLBIVAACFG(b, c)	GET_CONTEXT_FIELD(b, c, TLBLKCR, TLBIVAACFG)
769 #define GET_FLOOR(b, c)		GET_CONTEXT_FIELD(b, c, TLBLKCR, FLOOR)
770 #define GET_VICTIM(b, c)	GET_CONTEXT_FIELD(b, c, TLBLKCR, VICTIM)
771 
772 
773 /* TTBCR */
774 #define GET_N(b, c)		GET_CONTEXT_FIELD(b, c, TTBCR, N)
775 #define GET_PD0(b, c)		GET_CONTEXT_FIELD(b, c, TTBCR, PD0)
776 #define GET_PD1(b, c)		GET_CONTEXT_FIELD(b, c, TTBCR, PD1)
777 
778 
779 /* TTBR0 */
780 #define GET_TTBR0_IRGNH(b, c)	GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_IRGNH)
781 #define GET_TTBR0_SH(b, c)	GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_SH)
782 #define GET_TTBR0_ORGN(b, c)	GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_ORGN)
783 #define GET_TTBR0_NOS(b, c)	GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_NOS)
784 #define GET_TTBR0_IRGNL(b, c)	GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_IRGNL)
785 #define GET_TTBR0_PA(b, c)	GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_PA)
786 
787 
788 /* TTBR1 */
789 #define GET_TTBR1_IRGNH(b, c)	GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_IRGNH)
790 #define GET_TTBR1_SH(b, c)	GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_SH)
791 #define GET_TTBR1_ORGN(b, c)	GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_ORGN)
792 #define GET_TTBR1_NOS(b, c)	GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_NOS)
793 #define GET_TTBR1_IRGNL(b, c)	GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_IRGNL)
794 #define GET_TTBR1_PA(b, c)	GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_PA)
795 
796 
797 /* V2PSR */
798 #define GET_HIT(b, c)		GET_CONTEXT_FIELD(b, c, V2PSR, HIT)
799 #define GET_INDEX(b, c)		GET_CONTEXT_FIELD(b, c, V2PSR, INDEX)
800 
801 
802 /* Global Registers */
803 #define M2VCBR_N	(0xFF000)
804 #define CBACR_N		(0xFF800)
805 #define TLBRSW		(0xFFE00)
806 #define TLBTR0		(0xFFE80)
807 #define TLBTR1		(0xFFE84)
808 #define TLBTR2		(0xFFE88)
809 #define TESTBUSCR	(0xFFE8C)
810 #define GLOBAL_TLBIALL	(0xFFF00)
811 #define TLBIVMID	(0xFFF04)
812 #define CR		(0xFFF80)
813 #define EAR		(0xFFF84)
814 #define ESR		(0xFFF88)
815 #define ESRRESTORE	(0xFFF8C)
816 #define ESYNR0		(0xFFF90)
817 #define ESYNR1		(0xFFF94)
818 #define REV		(0xFFFF4)
819 #define IDR		(0xFFFF8)
820 #define RPU_ACR		(0xFFFFC)
821 
822 
823 /* Context Bank Registers */
824 #define SCTLR		(0x000)
825 #define ACTLR		(0x004)
826 #define CONTEXTIDR	(0x008)
827 #define TTBR0		(0x010)
828 #define TTBR1		(0x014)
829 #define TTBCR		(0x018)
830 #define PAR		(0x01C)
831 #define FSR		(0x020)
832 #define FSRRESTORE	(0x024)
833 #define FAR		(0x028)
834 #define FSYNR0		(0x02C)
835 #define FSYNR1		(0x030)
836 #define PRRR		(0x034)
837 #define NMRR		(0x038)
838 #define TLBLCKR		(0x03C)
839 #define V2PSR		(0x040)
840 #define TLBFLPTER	(0x044)
841 #define TLBSLPTER	(0x048)
842 #define BFBCR		(0x04C)
843 #define CTX_TLBIALL	(0x800)
844 #define TLBIASID	(0x804)
845 #define TLBIVA		(0x808)
846 #define TLBIVAA		(0x80C)
847 #define V2PPR		(0x810)
848 #define V2PPW		(0x814)
849 #define V2PUR		(0x818)
850 #define V2PUW		(0x81C)
851 #define RESUME		(0x820)
852 
853 
854 /* Global Register Fields */
855 /* CBACRn */
856 #define RWVMID        (RWVMID_MASK       << RWVMID_SHIFT)
857 #define RWE           (RWE_MASK          << RWE_SHIFT)
858 #define RWGE          (RWGE_MASK         << RWGE_SHIFT)
859 #define CBVMID        (CBVMID_MASK       << CBVMID_SHIFT)
860 #define IRPTNDX       (IRPTNDX_MASK      << IRPTNDX_SHIFT)
861 
862 
863 /* CR */
864 #define RPUE          (RPUE_MASK          << RPUE_SHIFT)
865 #define RPUERE        (RPUERE_MASK        << RPUERE_SHIFT)
866 #define RPUEIE        (RPUEIE_MASK        << RPUEIE_SHIFT)
867 #define DCDEE         (DCDEE_MASK         << DCDEE_SHIFT)
868 #define CLIENTPD      (CLIENTPD_MASK      << CLIENTPD_SHIFT)
869 #define STALLD        (STALLD_MASK        << STALLD_SHIFT)
870 #define TLBLKCRWE     (TLBLKCRWE_MASK     << TLBLKCRWE_SHIFT)
871 #define CR_TLBIALLCFG (CR_TLBIALLCFG_MASK << CR_TLBIALLCFG_SHIFT)
872 #define TLBIVMIDCFG   (TLBIVMIDCFG_MASK   << TLBIVMIDCFG_SHIFT)
873 #define CR_HUME       (CR_HUME_MASK       << CR_HUME_SHIFT)
874 
875 
876 /* ESR */
877 #define CFG           (CFG_MASK          << CFG_SHIFT)
878 #define BYPASS        (BYPASS_MASK       << BYPASS_SHIFT)
879 #define ESR_MULTI     (ESR_MULTI_MASK    << ESR_MULTI_SHIFT)
880 
881 
882 /* ESYNR0 */
883 #define ESYNR0_AMID   (ESYNR0_AMID_MASK  << ESYNR0_AMID_SHIFT)
884 #define ESYNR0_APID   (ESYNR0_APID_MASK  << ESYNR0_APID_SHIFT)
885 #define ESYNR0_ABID   (ESYNR0_ABID_MASK  << ESYNR0_ABID_SHIFT)
886 #define ESYNR0_AVMID  (ESYNR0_AVMID_MASK << ESYNR0_AVMID_SHIFT)
887 #define ESYNR0_ATID   (ESYNR0_ATID_MASK  << ESYNR0_ATID_SHIFT)
888 
889 
890 /* ESYNR1 */
891 #define ESYNR1_AMEMTYPE      (ESYNR1_AMEMTYPE_MASK    << ESYNR1_AMEMTYPE_SHIFT)
892 #define ESYNR1_ASHARED       (ESYNR1_ASHARED_MASK     << ESYNR1_ASHARED_SHIFT)
893 #define ESYNR1_AINNERSHARED  (ESYNR1_AINNERSHARED_MASK<< \
894 						ESYNR1_AINNERSHARED_SHIFT)
895 #define ESYNR1_APRIV         (ESYNR1_APRIV_MASK       << ESYNR1_APRIV_SHIFT)
896 #define ESYNR1_APROTNS       (ESYNR1_APROTNS_MASK     << ESYNR1_APROTNS_SHIFT)
897 #define ESYNR1_AINST         (ESYNR1_AINST_MASK       << ESYNR1_AINST_SHIFT)
898 #define ESYNR1_AWRITE        (ESYNR1_AWRITE_MASK      << ESYNR1_AWRITE_SHIFT)
899 #define ESYNR1_ABURST        (ESYNR1_ABURST_MASK      << ESYNR1_ABURST_SHIFT)
900 #define ESYNR1_ALEN          (ESYNR1_ALEN_MASK        << ESYNR1_ALEN_SHIFT)
901 #define ESYNR1_ASIZE         (ESYNR1_ASIZE_MASK       << ESYNR1_ASIZE_SHIFT)
902 #define ESYNR1_ALOCK         (ESYNR1_ALOCK_MASK       << ESYNR1_ALOCK_SHIFT)
903 #define ESYNR1_AOOO          (ESYNR1_AOOO_MASK        << ESYNR1_AOOO_SHIFT)
904 #define ESYNR1_AFULL         (ESYNR1_AFULL_MASK       << ESYNR1_AFULL_SHIFT)
905 #define ESYNR1_AC            (ESYNR1_AC_MASK          << ESYNR1_AC_SHIFT)
906 #define ESYNR1_DCD           (ESYNR1_DCD_MASK         << ESYNR1_DCD_SHIFT)
907 
908 
909 /* IDR */
910 #define NM2VCBMT      (NM2VCBMT_MASK     << NM2VCBMT_SHIFT)
911 #define HTW           (HTW_MASK          << HTW_SHIFT)
912 #define HUM           (HUM_MASK          << HUM_SHIFT)
913 #define TLBSIZE       (TLBSIZE_MASK      << TLBSIZE_SHIFT)
914 #define NCB           (NCB_MASK          << NCB_SHIFT)
915 #define NIRPT         (NIRPT_MASK        << NIRPT_SHIFT)
916 
917 
918 /* M2VCBRn */
919 #define VMID          (VMID_MASK         << VMID_SHIFT)
920 #define CBNDX         (CBNDX_MASK        << CBNDX_SHIFT)
921 #define BYPASSD       (BYPASSD_MASK      << BYPASSD_SHIFT)
922 #define BPRCOSH       (BPRCOSH_MASK      << BPRCOSH_SHIFT)
923 #define BPRCISH       (BPRCISH_MASK      << BPRCISH_SHIFT)
924 #define BPRCNSH       (BPRCNSH_MASK      << BPRCNSH_SHIFT)
925 #define BPSHCFG       (BPSHCFG_MASK      << BPSHCFG_SHIFT)
926 #define NSCFG         (NSCFG_MASK        << NSCFG_SHIFT)
927 #define BPMTCFG       (BPMTCFG_MASK      << BPMTCFG_SHIFT)
928 #define BPMEMTYPE     (BPMEMTYPE_MASK    << BPMEMTYPE_SHIFT)
929 
930 
931 /* REV */
932 #define IDR_MINOR     (MINOR_MASK        << MINOR_SHIFT)
933 #define IDR_MAJOR     (MAJOR_MASK        << MAJOR_SHIFT)
934 
935 
936 /* TESTBUSCR */
937 #define TBE           (TBE_MASK          << TBE_SHIFT)
938 #define SPDMBE        (SPDMBE_MASK       << SPDMBE_SHIFT)
939 #define WGSEL         (WGSEL_MASK        << WGSEL_SHIFT)
940 #define TBLSEL        (TBLSEL_MASK       << TBLSEL_SHIFT)
941 #define TBHSEL        (TBHSEL_MASK       << TBHSEL_SHIFT)
942 #define SPDM0SEL      (SPDM0SEL_MASK     << SPDM0SEL_SHIFT)
943 #define SPDM1SEL      (SPDM1SEL_MASK     << SPDM1SEL_SHIFT)
944 #define SPDM2SEL      (SPDM2SEL_MASK     << SPDM2SEL_SHIFT)
945 #define SPDM3SEL      (SPDM3SEL_MASK     << SPDM3SEL_SHIFT)
946 
947 
948 /* TLBIVMID */
949 #define TLBIVMID_VMID (TLBIVMID_VMID_MASK << TLBIVMID_VMID_SHIFT)
950 
951 
952 /* TLBRSW */
953 #define TLBRSW_INDEX  (TLBRSW_INDEX_MASK << TLBRSW_INDEX_SHIFT)
954 #define TLBBFBS       (TLBBFBS_MASK      << TLBBFBS_SHIFT)
955 
956 
957 /* TLBTR0 */
958 #define PR            (PR_MASK           << PR_SHIFT)
959 #define PW            (PW_MASK           << PW_SHIFT)
960 #define UR            (UR_MASK           << UR_SHIFT)
961 #define UW            (UW_MASK           << UW_SHIFT)
962 #define XN            (XN_MASK           << XN_SHIFT)
963 #define NSDESC        (NSDESC_MASK       << NSDESC_SHIFT)
964 #define ISH           (ISH_MASK          << ISH_SHIFT)
965 #define SH            (SH_MASK           << SH_SHIFT)
966 #define MT            (MT_MASK           << MT_SHIFT)
967 #define DPSIZR        (DPSIZR_MASK       << DPSIZR_SHIFT)
968 #define DPSIZC        (DPSIZC_MASK       << DPSIZC_SHIFT)
969 
970 
971 /* TLBTR1 */
972 #define TLBTR1_VMID   (TLBTR1_VMID_MASK  << TLBTR1_VMID_SHIFT)
973 #define TLBTR1_PA     (TLBTR1_PA_MASK    << TLBTR1_PA_SHIFT)
974 
975 
976 /* TLBTR2 */
977 #define TLBTR2_ASID   (TLBTR2_ASID_MASK  << TLBTR2_ASID_SHIFT)
978 #define TLBTR2_V      (TLBTR2_V_MASK     << TLBTR2_V_SHIFT)
979 #define TLBTR2_NSTID  (TLBTR2_NSTID_MASK << TLBTR2_NSTID_SHIFT)
980 #define TLBTR2_NV     (TLBTR2_NV_MASK    << TLBTR2_NV_SHIFT)
981 #define TLBTR2_VA     (TLBTR2_VA_MASK    << TLBTR2_VA_SHIFT)
982 
983 
984 /* Context Register Fields */
985 /* ACTLR */
986 #define CFERE              (CFERE_MASK              << CFERE_SHIFT)
987 #define CFEIE              (CFEIE_MASK              << CFEIE_SHIFT)
988 #define PTSHCFG            (PTSHCFG_MASK            << PTSHCFG_SHIFT)
989 #define RCOSH              (RCOSH_MASK              << RCOSH_SHIFT)
990 #define RCISH              (RCISH_MASK              << RCISH_SHIFT)
991 #define RCNSH              (RCNSH_MASK              << RCNSH_SHIFT)
992 #define PRIVCFG            (PRIVCFG_MASK            << PRIVCFG_SHIFT)
993 #define DNA                (DNA_MASK                << DNA_SHIFT)
994 #define DNLV2PA            (DNLV2PA_MASK            << DNLV2PA_SHIFT)
995 #define TLBMCFG            (TLBMCFG_MASK            << TLBMCFG_SHIFT)
996 #define CFCFG              (CFCFG_MASK              << CFCFG_SHIFT)
997 #define TIPCF              (TIPCF_MASK              << TIPCF_SHIFT)
998 #define V2PCFG             (V2PCFG_MASK             << V2PCFG_SHIFT)
999 #define HUME               (HUME_MASK               << HUME_SHIFT)
1000 #define PTMTCFG            (PTMTCFG_MASK            << PTMTCFG_SHIFT)
1001 #define PTMEMTYPE          (PTMEMTYPE_MASK          << PTMEMTYPE_SHIFT)
1002 
1003 
1004 /* BFBCR */
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 /* CONTEXTIDR */
1013 #define CONTEXTIDR_ASID    (CONTEXTIDR_ASID_MASK    << CONTEXTIDR_ASID_SHIFT)
1014 #define PROCID             (PROCID_MASK             << PROCID_SHIFT)
1015 
1016 
1017 /* FSR */
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 /* FSYNR0 */
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 /* FSYNR1 */
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 /* NMRR */
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 /* PAR */
1072 #define FAULT              (FAULT_MASK              << FAULT_SHIFT)
1073 /* If a fault is present, these are the
1074 same as the fault fields in the FAR */
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 /* If NO fault is present, the following fields are in effect */
1086 /* (FAULT remains as before) */
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 /* PRRR */
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 /* RESUME */
1119 #define TNR                (TNR_MASK                << TNR_SHIFT)
1120 
1121 
1122 /* SCTLR */
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 /* TLBIASID */
1132 #define TLBIASID_ASID      (TLBIASID_ASID_MASK      << TLBIASID_ASID_SHIFT)
1133 
1134 
1135 /* TLBIVA */
1136 #define TLBIVA_ASID        (TLBIVA_ASID_MASK        << TLBIVA_ASID_SHIFT)
1137 #define TLBIVA_VA          (TLBIVA_VA_MASK          << TLBIVA_VA_SHIFT)
1138 
1139 
1140 /* TLBIVAA */
1141 #define TLBIVAA_VA         (TLBIVAA_VA_MASK         << TLBIVAA_VA_SHIFT)
1142 
1143 
1144 /* TLBLCKR */
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 /* TTBCR */
1154 #define N                  (N_MASK                  << N_SHIFT)
1155 #define PD0                (PD0_MASK                << PD0_SHIFT)
1156 #define PD1                (PD1_MASK                << PD1_SHIFT)
1157 
1158 
1159 /* TTBR0 */
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 /* TTBR1 */
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 /* V2PSR */
1178 #define HIT                (HIT_MASK                << HIT_SHIFT)
1179 #define INDEX              (INDEX_MASK              << INDEX_SHIFT)
1180 
1181 
1182 /* V2Pxx */
1183 #define V2Pxx_INDEX        (V2Pxx_INDEX_MASK        << V2Pxx_INDEX_SHIFT)
1184 #define V2Pxx_VA           (V2Pxx_VA_MASK           << V2Pxx_VA_SHIFT)
1185 
1186 
1187 /* Global Register Masks */
1188 /* CBACRn */
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 /* CR */
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 /* ESR */
1210 #define CFG_MASK                  0x01
1211 #define BYPASS_MASK               0x01
1212 #define ESR_MULTI_MASK            0x01
1213 
1214 
1215 /* ESYNR0 */
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 /* ESYNR1 */
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 /* IDR */
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 /* M2VCBRn */
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 /* REV */
1264 #define MINOR_MASK                0x0F
1265 #define MAJOR_MASK                0x0F
1266 
1267 
1268 /* TESTBUSCR */
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 /* TLBIMID */
1281 #define TLBIVMID_VMID_MASK        0x1F
1282 
1283 
1284 /* TLBRSW */
1285 #define TLBRSW_INDEX_MASK         0xFF
1286 #define TLBBFBS_MASK              0x03
1287 
1288 
1289 /* TLBTR0 */
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 /* TLBTR1 */
1304 #define TLBTR1_VMID_MASK          0x1F
1305 #define TLBTR1_PA_MASK            0x000FFFFF
1306 
1307 
1308 /* TLBTR2 */
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 /* Global Register Shifts */
1317 /* CBACRn */
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 /* CR */
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 /* ESR */
1339 #define CFG_SHIFT                0
1340 #define BYPASS_SHIFT             1
1341 #define ESR_MULTI_SHIFT          31
1342 
1343 
1344 /* ESYNR0 */
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 /* ESYNR1 */
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 /* IDR */
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 /* M2VCBRn */
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 /* REV */
1393 #define MINOR_SHIFT              0
1394 #define MAJOR_SHIFT              4
1395 
1396 
1397 /* TESTBUSCR */
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 /* TLBIMID */
1410 #define TLBIVMID_VMID_SHIFT      0
1411 
1412 
1413 /* TLBRSW */
1414 #define TLBRSW_INDEX_SHIFT       0
1415 #define TLBBFBS_SHIFT            8
1416 
1417 
1418 /* TLBTR0 */
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 /* TLBTR1 */
1433 #define TLBTR1_VMID_SHIFT        0
1434 #define TLBTR1_PA_SHIFT          12
1435 
1436 
1437 /* TLBTR2 */
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 /* Context Register Masks */
1446 /* ACTLR */
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 /* BFBCR */
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 /* CONTEXTIDR */
1474 #define CONTEXTIDR_ASID_MASK             0xFF
1475 #define PROCID_MASK                      0x00FFFFFF
1476 
1477 
1478 /* FSR */
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 /* FSYNR0 */
1492 #define AMID_MASK                        0xFF
1493 #define APID_MASK                        0x1F
1494 #define ABID_MASK                        0x07
1495 #define ATID_MASK                        0xFF
1496 
1497 
1498 /* FSYNR1 */
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 /* NMRR */
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 /* PAR */
1533 #define FAULT_MASK                       0x01
1534 /* If a fault is present, these are the
1535 same as the fault fields in the FAR */
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 /* If NO fault is present, the following
1547  * fields are in effect
1548  * (FAULT remains as before) */
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 /* PRRR */
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 /* RESUME */
1581 #define TNR_MASK                         0x01
1582 
1583 
1584 /* SCTLR */
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 /* TLBIASID */
1594 #define TLBIASID_ASID_MASK               0xFF
1595 
1596 
1597 /* TLBIVA */
1598 #define TLBIVA_ASID_MASK                 0xFF
1599 #define TLBIVA_VA_MASK                   0x000FFFFF
1600 
1601 
1602 /* TLBIVAA */
1603 #define TLBIVAA_VA_MASK                  0x000FFFFF
1604 
1605 
1606 /* TLBLCKR */
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 /* TTBCR */
1616 #define N_MASK                           0x07
1617 #define PD0_MASK                         0x01
1618 #define PD1_MASK                         0x01
1619 
1620 
1621 /* TTBR0 */
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 /* TTBR1 */
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 /* V2PSR */
1640 #define HIT_MASK                         0x01
1641 #define INDEX_MASK                       0xFF
1642 
1643 
1644 /* V2Pxx */
1645 #define V2Pxx_INDEX_MASK                 0xFF
1646 #define V2Pxx_VA_MASK                    0x000FFFFF
1647 
1648 
1649 /* Context Register Shifts */
1650 /* ACTLR */
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 /* BFBCR */
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 /* CONTEXTIDR */
1678 #define CONTEXTIDR_ASID_SHIFT          0
1679 #define PROCID_SHIFT                   8
1680 
1681 
1682 /* FSR */
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 /* FSYNR0 */
1696 #define AMID_SHIFT                     0
1697 #define APID_SHIFT                     8
1698 #define ABID_SHIFT                     13
1699 #define ATID_SHIFT                     24
1700 
1701 
1702 /* FSYNR1 */
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 /* NMRR */
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 /* PAR */
1737 #define FAULT_SHIFT                    0
1738 /* If a fault is present, these are the
1739 same as the fault fields in the FAR */
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 /* If NO fault is present, the following
1751  * fields are in effect
1752  * (FAULT remains as before) */
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 /* PRRR */
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 /* RESUME */
1785 #define TNR_SHIFT                      0
1786 
1787 
1788 /* SCTLR */
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 /* TLBIASID */
1798 #define TLBIASID_ASID_SHIFT            0
1799 
1800 
1801 /* TLBIVA */
1802 #define TLBIVA_ASID_SHIFT              0
1803 #define TLBIVA_VA_SHIFT                12
1804 
1805 
1806 /* TLBIVAA */
1807 #define TLBIVAA_VA_SHIFT               12
1808 
1809 
1810 /* TLBLCKR */
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 /* TTBCR */
1820 #define N_SHIFT                        3
1821 #define PD0_SHIFT                      4
1822 #define PD1_SHIFT                      5
1823 
1824 
1825 /* TTBR0 */
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 /* TTBR1 */
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 /* V2PSR */
1844 #define HIT_SHIFT                      0
1845 #define INDEX_SHIFT                    8
1846 
1847 
1848 /* V2Pxx */
1849 #define V2Pxx_INDEX_SHIFT              0
1850 #define V2Pxx_VA_SHIFT                 12
1851 
1852 #endif
1853