1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #ifndef _SB1250_L2C_H
21 #define _SB1250_L2C_H
22
23 #include <asm/sibyte/sb1250_defs.h>
24
25
26
27
28
29 #define S_L2C_TAG_MBZ 0
30 #define M_L2C_TAG_MBZ _SB_MAKEMASK(5, S_L2C_TAG_MBZ)
31
32 #define S_L2C_TAG_INDEX 5
33 #define M_L2C_TAG_INDEX _SB_MAKEMASK(12, S_L2C_TAG_INDEX)
34 #define V_L2C_TAG_INDEX(x) _SB_MAKEVALUE(x, S_L2C_TAG_INDEX)
35 #define G_L2C_TAG_INDEX(x) _SB_GETVALUE(x, S_L2C_TAG_INDEX, M_L2C_TAG_INDEX)
36
37 #define S_L2C_TAG_TAG 17
38 #define M_L2C_TAG_TAG _SB_MAKEMASK(23, S_L2C_TAG_TAG)
39 #define V_L2C_TAG_TAG(x) _SB_MAKEVALUE(x, S_L2C_TAG_TAG)
40 #define G_L2C_TAG_TAG(x) _SB_GETVALUE(x, S_L2C_TAG_TAG, M_L2C_TAG_TAG)
41
42 #define S_L2C_TAG_ECC 40
43 #define M_L2C_TAG_ECC _SB_MAKEMASK(6, S_L2C_TAG_ECC)
44 #define V_L2C_TAG_ECC(x) _SB_MAKEVALUE(x, S_L2C_TAG_ECC)
45 #define G_L2C_TAG_ECC(x) _SB_GETVALUE(x, S_L2C_TAG_ECC, M_L2C_TAG_ECC)
46
47 #define S_L2C_TAG_WAY 46
48 #define M_L2C_TAG_WAY _SB_MAKEMASK(2, S_L2C_TAG_WAY)
49 #define V_L2C_TAG_WAY(x) _SB_MAKEVALUE(x, S_L2C_TAG_WAY)
50 #define G_L2C_TAG_WAY(x) _SB_GETVALUE(x, S_L2C_TAG_WAY, M_L2C_TAG_WAY)
51
52 #define M_L2C_TAG_DIRTY _SB_MAKEMASK1(48)
53 #define M_L2C_TAG_VALID _SB_MAKEMASK1(49)
54
55
56
57
58
59 #define S_L2C_MGMT_INDEX 5
60 #define M_L2C_MGMT_INDEX _SB_MAKEMASK(12, S_L2C_MGMT_INDEX)
61 #define V_L2C_MGMT_INDEX(x) _SB_MAKEVALUE(x, S_L2C_MGMT_INDEX)
62 #define G_L2C_MGMT_INDEX(x) _SB_GETVALUE(x, S_L2C_MGMT_INDEX, M_L2C_MGMT_INDEX)
63
64 #define S_L2C_MGMT_QUADRANT 15
65 #define M_L2C_MGMT_QUADRANT _SB_MAKEMASK(2, S_L2C_MGMT_QUADRANT)
66 #define V_L2C_MGMT_QUADRANT(x) _SB_MAKEVALUE(x, S_L2C_MGMT_QUADRANT)
67 #define G_L2C_MGMT_QUADRANT(x) _SB_GETVALUE(x, S_L2C_MGMT_QUADRANT, M_L2C_MGMT_QUADRANT)
68
69 #define S_L2C_MGMT_HALF 16
70 #define M_L2C_MGMT_HALF _SB_MAKEMASK(1, S_L2C_MGMT_HALF)
71
72 #define S_L2C_MGMT_WAY 17
73 #define M_L2C_MGMT_WAY _SB_MAKEMASK(2, S_L2C_MGMT_WAY)
74 #define V_L2C_MGMT_WAY(x) _SB_MAKEVALUE(x, S_L2C_MGMT_WAY)
75 #define G_L2C_MGMT_WAY(x) _SB_GETVALUE(x, S_L2C_MGMT_WAY, M_L2C_MGMT_WAY)
76
77 #define S_L2C_MGMT_ECC_DIAG 21
78 #define M_L2C_MGMT_ECC_DIAG _SB_MAKEMASK(2, S_L2C_MGMT_ECC_DIAG)
79 #define V_L2C_MGMT_ECC_DIAG(x) _SB_MAKEVALUE(x, S_L2C_MGMT_ECC_DIAG)
80 #define G_L2C_MGMT_ECC_DIAG(x) _SB_GETVALUE(x, S_L2C_MGMT_ECC_DIAG, M_L2C_MGMT_ECC_DIAG)
81
82 #define S_L2C_MGMT_TAG 23
83 #define M_L2C_MGMT_TAG _SB_MAKEMASK(4, S_L2C_MGMT_TAG)
84 #define V_L2C_MGMT_TAG(x) _SB_MAKEVALUE(x, S_L2C_MGMT_TAG)
85 #define G_L2C_MGMT_TAG(x) _SB_GETVALUE(x, S_L2C_MGMT_TAG, M_L2C_MGMT_TAG)
86
87 #define M_L2C_MGMT_DIRTY _SB_MAKEMASK1(19)
88 #define M_L2C_MGMT_VALID _SB_MAKEMASK1(20)
89
90 #define A_L2C_MGMT_TAG_BASE 0x00D0000000
91
92 #define L2C_ENTRIES_PER_WAY 4096
93 #define L2C_NUM_WAYS 4
94
95
96 #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1)
97
98
99
100 #define S_L2C_MISC_NO_WAY 10
101 #define M_L2C_MISC_NO_WAY _SB_MAKEMASK(4, S_L2C_MISC_NO_WAY)
102 #define V_L2C_MISC_NO_WAY(x) _SB_MAKEVALUE(x, S_L2C_MISC_NO_WAY)
103 #define G_L2C_MISC_NO_WAY(x) _SB_GETVALUE(x, S_L2C_MISC_NO_WAY, M_L2C_MISC_NO_WAY)
104
105 #define M_L2C_MISC_ECC_CLEANUP_DIS _SB_MAKEMASK1(9)
106 #define M_L2C_MISC_MC_PRIO_LOW _SB_MAKEMASK1(8)
107 #define M_L2C_MISC_SOFT_DISABLE_T _SB_MAKEMASK1(7)
108 #define M_L2C_MISC_SOFT_DISABLE_B _SB_MAKEMASK1(6)
109 #define M_L2C_MISC_SOFT_DISABLE_R _SB_MAKEMASK1(5)
110 #define M_L2C_MISC_SOFT_DISABLE_L _SB_MAKEMASK1(4)
111 #define M_L2C_MISC_SCACHE_DISABLE_T _SB_MAKEMASK1(3)
112 #define M_L2C_MISC_SCACHE_DISABLE_B _SB_MAKEMASK1(2)
113 #define M_L2C_MISC_SCACHE_DISABLE_R _SB_MAKEMASK1(1)
114 #define M_L2C_MISC_SCACHE_DISABLE_L _SB_MAKEMASK1(0)
115 #endif
116
117
118 #endif