Loading...
Searching...
No Matches
Go to the documentation of this file.
30#define KUSIZE 0x80000000
31#define K0BASE 0x80000000
32#define K0SIZE 0x20000000
33#define K1BASE 0xA0000000
34#define K1SIZE 0x20000000
35#define K2BASE 0xC0000000
36#define K2SIZE 0x20000000
41#define SIZE_EXCVEC 0x80
43#define R_VEC (K1BASE + 0x1fc00000)
44#define XUT_VEC (K0BASE + 0x80)
45#define ECC_VEC (K0BASE + 0x100)
46#define E_VEC (K0BASE + 0x180)
51#ifdef _LANGUAGE_ASSEMBLY
53#define K0_TO_K1(x) ((x) | 0xA0000000)
54#define K1_TO_K0(x) ((x) & 0x9FFFFFFF)
55#define K0_TO_PHYS(x) ((x) & 0x1FFFFFFF)
56#define K1_TO_PHYS(x) ((x) & 0x1FFFFFFF)
57#define KDM_TO_PHYS(x) ((x) & 0x1FFFFFFF)
58#define PHYS_TO_K0(x) ((x) | 0x80000000)
59#define PHYS_TO_K1(x) ((x) | 0xA0000000)
63#define K0_TO_K1(x) ((u32) (x) | 0xA0000000)
64#define K1_TO_K0(x) ((u32) (x) & 0x9FFFFFFF)
65#define K0_TO_PHYS(x) ((u32) (x) & 0x1FFFFFFF)
66#define K1_TO_PHYS(x) ((u32) (x) & 0x1FFFFFFF)
67#define KDM_TO_PHYS(x) ((u32) (x) & 0x1FFFFFFF)
68#define PHYS_TO_K0(x) ((u32) (x) | 0x80000000)
69#define PHYS_TO_K1(x) ((u32) (x) | 0xA0000000)
76#define IS_KSEG0(x) ((u32) (x) >= K0BASE && (u32) (x) < K1BASE)
77#define IS_KSEG1(x) ((u32) (x) >= K1BASE && (u32) (x) < K2BASE)
78#define IS_KSEGDM(x) ((u32) (x) >= K0BASE && (u32) (x) < K2BASE)
79#define IS_KSEG2(x) ((u32) (x) >= K2BASE && (u32) (x) < KPTE_SHDUBASE)
80#define IS_KPTESEG(x) ((u32) (x) >= KPTE_SHDUBASE)
81#define IS_KUSEG(x) ((u32) (x) < K0BASE)
89#define TLBHI_VPN2MASK 0xffffe000
90#define TLBHI_VPN2SHIFT 13
91#define TLBHI_PIDMASK 0xff
92#define TLBHI_PIDSHIFT 0
95#define TLBLO_PFNMASK 0x3fffffc0
96#define TLBLO_PFNSHIFT 6
97#define TLBLO_CACHMASK 0x38
98#define TLBLO_CACHSHIFT 3
99#define TLBLO_UNCACHED 0x10
100#define TLBLO_NONCOHRNT 0x18
101#define TLBLO_EXLWR 0x28
106#define TLBINX_PROBE 0x80000000
107#define TLBINX_INXMASK 0x3f
108#define TLBINX_INXSHIFT 0
110#define TLBRAND_RANDMASK 0x3f
111#define TLBRAND_RANDSHIFT 0
113#define TLBWIRED_WIREDMASK 0x3f
115#define TLBCTXT_BASEMASK 0xff800000
116#define TLBCTXT_BASESHIFT 23
117#define TLBCTXT_BASEBITS 9
119#define TLBCTXT_VPNMASK 0x7ffff0
120#define TLBCTXT_VPNSHIFT 4
122#define TLBPGMASK_4K 0x0
123#define TLBPGMASK_16K 0x6000
124#define TLBPGMASK_64K 0x1e000
129#define SR_CUMASK 0xf0000000
131#define SR_CU3 0x80000000
132#define SR_CU2 0x40000000
133#define SR_CU1 0x20000000
134#define SR_CU0 0x10000000
135#define SR_RP 0x08000000
136#define SR_FR 0x04000000
137#define SR_RE 0x02000000
138#define SR_ITS 0x01000000
139#define SR_BEV 0x00400000
140#define SR_TS 0x00200000
141#define SR_SR 0x00100000
142#define SR_CH 0x00040000
143#define SR_CE 0x00020000
144#define SR_DE 0x00010000
150#define SR_IMASK 0x0000ff00
151#define SR_IMASK8 0x00000000
152#define SR_IMASK7 0x00008000
153#define SR_IMASK6 0x0000c000
154#define SR_IMASK5 0x0000e000
155#define SR_IMASK4 0x0000f000
156#define SR_IMASK3 0x0000f800
157#define SR_IMASK2 0x0000fc00
158#define SR_IMASK1 0x0000fe00
159#define SR_IMASK0 0x0000ff00
161#define SR_IBIT8 0x00008000
162#define SR_IBIT7 0x00004000
163#define SR_IBIT6 0x00002000
164#define SR_IBIT5 0x00001000
165#define SR_IBIT4 0x00000800
166#define SR_IBIT3 0x00000400
167#define SR_IBIT2 0x00000200
168#define SR_IBIT1 0x00000100
170#define SR_IMASKSHIFT 8
172#define SR_KX 0x00000080
173#define SR_SX 0x00000040
174#define SR_UX 0x00000020
175#define SR_KSU_MASK 0x00000018
176#define SR_KSU_USR 0x00000010
177#define SR_KSU_SUP 0x00000008
178#define SR_KSU_KER 0x00000000
179#define SR_ERL 0x00000004
180#define SR_EXL 0x00000002
181#define SR_IE 0x00000001
186#define CAUSE_BD 0x80000000
187#define CAUSE_CEMASK 0x30000000
188#define CAUSE_CESHIFT 28
191#define CAUSE_IP8 0x00008000
192#define CAUSE_IP7 0x00004000
193#define CAUSE_IP6 0x00002000
194#define CAUSE_IP5 0x00001000
195#define CAUSE_IP4 0x00000800
196#define CAUSE_IP3 0x00000400
197#define CAUSE_SW2 0x00000200
198#define CAUSE_SW1 0x00000100
200#define CAUSE_IPMASK 0x0000FF00
201#define CAUSE_IPSHIFT 8
203#define CAUSE_EXCMASK 0x0000007C
205#define CAUSE_EXCSHIFT 2
209#define EXC_CODE(x) ((x) << 2)
212#define EXC_INT EXC_CODE(0)
213#define EXC_MOD EXC_CODE(1)
214#define EXC_RMISS EXC_CODE(2)
215#define EXC_WMISS EXC_CODE(3)
216#define EXC_RADE EXC_CODE(4)
217#define EXC_WADE EXC_CODE(5)
218#define EXC_IBE EXC_CODE(6)
219#define EXC_DBE EXC_CODE(7)
220#define EXC_SYSCALL EXC_CODE(8)
221#define EXC_BREAK EXC_CODE(9)
222#define EXC_II EXC_CODE(10)
223#define EXC_CPU EXC_CODE(11)
224#define EXC_OV EXC_CODE(12)
225#define EXC_TRAP EXC_CODE(13)
226#define EXC_VCEI EXC_CODE(14)
227#define EXC_FPE EXC_CODE(15)
228#define EXC_WATCH EXC_CODE(23)
229#define EXC_VCED EXC_CODE(31)
232#define C0_IMPMASK 0xff00
234#define C0_REVMASK 0xff
235#define C0_MAJREVMASK 0xf0
236#define C0_MAJREVSHIFT 4
237#define C0_MINREVMASK 0xf
273#define ICACHE_SIZE 0x4000
274#define ICACHE_LINESIZE 32
275#define ICACHE_LINEMASK (ICACHE_LINESIZE - 1)
277#define DCACHE_SIZE 0x2000
278#define DCACHE_LINESIZE 16
279#define DCACHE_LINEMASK (DCACHE_LINESIZE - 1)
284#define CONFIG_CM 0x80000000
285#define CONFIG_EC 0x70000000
286#define CONFIG_EC_1_1 0x6
287#define CONFIG_EC_3_2 0x7
288#define CONFIG_EC_2_1 0x0
289#define CONFIG_EC_3_1 0x1
290#define CONFIG_EP 0x0f000000
291#define CONFIG_SB 0x00c00000
293#define CONFIG_SS 0x00200000
294#define CONFIG_SW 0x00100000
295#define CONFIG_EW 0x000c0000
296#define CONFIG_SC 0x00020000
297#define CONFIG_SM 0x00010000
298#define CONFIG_BE 0x00008000
299#define CONFIG_EM 0x00004000
300#define CONFIG_EB 0x00002000
302#define CONFIG_IC 0x00000e00
303#define CONFIG_DC 0x000001c0
304#define CONFIG_IB 0x00000020
305#define CONFIG_DB 0x00000010
306#define CONFIG_CU 0x00000008
307#define CONFIG_K0 0x00000007
309#define CONFIG_UNCACHED 0x00000002
310#define CONFIG_NONCOHRNT 0x00000003
311#define CONFIG_COHRNT_EXLWR 0x00000005
312#define CONFIG_SB_SHFT 22
313#define CONFIG_IC_SHFT 9
314#define CONFIG_DC_SHFT 6
315#define CONFIG_BE_SHFT 15
320#define SADDRMASK 0xFFFFE000
321#define SVINDEXMASK 0x00000380
322#define SSTATEMASK 0x00001c00
323#define SINVALID 0x00000000
324#define SCLEANEXCL 0x00001000
325#define SDIRTYEXCL 0x00001400
326#define SECC_MASK 0x0000007f
329#define PADDRMASK 0xFFFFFF00
331#define PSTATEMASK 0x00C0
332#define PINVALID 0x0000
333#define PCLEANEXCL 0x0080
334#define PDIRTYEXCL 0x00C0
335#define PPARITY_MASK 0x0001
340#define CACHERR_ER 0x80000000
341#define CACHERR_EC 0x40000000
342#define CACHERR_ED 0x20000000
343#define CACHERR_ET 0x10000000
344#define CACHERR_ES 0x08000000
345#define CACHERR_EE 0x04000000
346#define CACHERR_EB 0x02000000
347#define CACHERR_EI 0x01000000
348#define CACHERR_SIDX_MASK 0x003ffff8
349#define CACHERR_PIDX_MASK 0x00000007
350#define CACHERR_PIDX_SHIFT 12
362#define WATCHLO_WTRAP 0x00000001
363#define WATCHLO_RTRAP 0x00000002
364#define WATCHLO_ADDRMASK 0xfffffff8
365#define WATCHLO_VALIDMASK 0xfffffffb
366#define WATCHHI_VALIDMASK 0x0000000f
371#ifdef _LANGUAGE_ASSEMBLY
374#define C0_ENTRYLO0 $2
375#define C0_ENTRYLO1 $3
377#define C0_PAGEMASK $5
379#define C0_BADVADDR $8
381#define C0_ENTRYHI $10
386#define C0_COMPARE $11
389#define C0_WATCHLO $18
390#define C0_WATCHHI $19
392#define C0_CACHE_ERR $27
395#define C0_ERROR_EPC $30
419#define C0_CACHE_ERR 27
422#define C0_ERROR_EPC 30
429#define FPCSR_FS 0x01000000
430#define FPCSR_C 0x00800000
431#define FPCSR_CE 0x00020000
432#define FPCSR_CV 0x00010000
433#define FPCSR_CZ 0x00008000
434#define FPCSR_CO 0x00004000
435#define FPCSR_CU 0x00002000
436#define FPCSR_CI 0x00001000
437#define FPCSR_EV 0x00000800
438#define FPCSR_EZ 0x00000400
439#define FPCSR_EO 0x00000200
440#define FPCSR_EU 0x00000100
441#define FPCSR_EI 0x00000080
442#define FPCSR_FV 0x00000040
443#define FPCSR_FZ 0x00000020
444#define FPCSR_FO 0x00000010
445#define FPCSR_FU 0x00000008
446#define FPCSR_FI 0x00000004
447#define FPCSR_RM_MASK 0x00000003
448#define FPCSR_RM_RN 0x00000000
449#define FPCSR_RM_RZ 0x00000001
450#define FPCSR_RM_RP 0x00000002
451#define FPCSR_RM_RM 0x00000003