RT-AC56 3.0.0.4.374.37 core
[tomato.git] / release / src-rt-6.x.4708 / cfe / cfe / arch / mips / cpu / sb1250 / include / sb1250_l2c.h
blob3ea75932577e253c88abe9d5d4f3da609c2f98bf
1 /* *********************************************************************
2 * SB1250 Board Support Package
3 *
4 * L2 Cache constants and macros File: sb1250_l2c.h
5 *
6 * This module contains constants useful for manipulating the
7 * level 2 cache.
8 *
9 * SB1250 specification level: User's manual 1/02/02
11 * Author: Mitch Lichtenberg (mpl@broadcom.com)
13 *********************************************************************
15 * Copyright 2000,2001,2002,2003
16 * Broadcom Corporation. All rights reserved.
18 * This software is furnished under license and may be used and
19 * copied only in accordance with the following terms and
20 * conditions. Subject to these conditions, you may download,
21 * copy, install, use, modify and distribute modified or unmodified
22 * copies of this software in source and/or binary form. No title
23 * or ownership is transferred hereby.
25 * 1) Any source code used, modified or distributed must reproduce
26 * and retain this copyright notice and list of conditions
27 * as they appear in the source file.
29 * 2) No right is granted to use any trade name, trademark, or
30 * logo of Broadcom Corporation. The "Broadcom Corporation"
31 * name may not be used to endorse or promote products derived
32 * from this software without the prior written permission of
33 * Broadcom Corporation.
35 * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR
36 * IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED
37 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
38 * PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT
39 * SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN
40 * PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR DIRECT, INDIRECT,
41 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
42 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
43 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
44 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
45 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
46 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF
47 * THE POSSIBILITY OF SUCH DAMAGE.
48 ********************************************************************* */
51 #ifndef _SB1250_L2C_H
52 #define _SB1250_L2C_H
54 #include "sb1250_defs.h"
57 * Level 2 Cache Tag register (Table 5-3)
60 #define S_L2C_TAG_MBZ 0
61 #define M_L2C_TAG_MBZ _SB_MAKEMASK(5,S_L2C_TAG_MBZ)
63 #define S_L2C_TAG_INDEX 5
64 #define M_L2C_TAG_INDEX _SB_MAKEMASK(12,S_L2C_TAG_INDEX)
65 #define V_L2C_TAG_INDEX(x) _SB_MAKEVALUE(x,S_L2C_TAG_INDEX)
66 #define G_L2C_TAG_INDEX(x) _SB_GETVALUE(x,S_L2C_TAG_INDEX,M_L2C_TAG_INDEX)
68 #define S_L2C_TAG_TAG 17
69 #define M_L2C_TAG_TAG _SB_MAKEMASK(23,S_L2C_TAG_TAG)
70 #define V_L2C_TAG_TAG(x) _SB_MAKEVALUE(x,S_L2C_TAG_TAG)
71 #define G_L2C_TAG_TAG(x) _SB_GETVALUE(x,S_L2C_TAG_TAG,M_L2C_TAG_TAG)
73 #define S_L2C_TAG_ECC 40
74 #define M_L2C_TAG_ECC _SB_MAKEMASK(6,S_L2C_TAG_ECC)
75 #define V_L2C_TAG_ECC(x) _SB_MAKEVALUE(x,S_L2C_TAG_ECC)
76 #define G_L2C_TAG_ECC(x) _SB_GETVALUE(x,S_L2C_TAG_ECC,M_L2C_TAG_ECC)
78 #define S_L2C_TAG_WAY 46
79 #define M_L2C_TAG_WAY _SB_MAKEMASK(2,S_L2C_TAG_WAY)
80 #define V_L2C_TAG_WAY(x) _SB_MAKEVALUE(x,S_L2C_TAG_WAY)
81 #define G_L2C_TAG_WAY(x) _SB_GETVALUE(x,S_L2C_TAG_WAY,M_L2C_TAG_WAY)
83 #define M_L2C_TAG_DIRTY _SB_MAKEMASK1(48)
84 #define M_L2C_TAG_VALID _SB_MAKEMASK1(49)
87 * Format of level 2 cache management address (table 5-2)
90 #define S_L2C_MGMT_INDEX 5
91 #define M_L2C_MGMT_INDEX _SB_MAKEMASK(12,S_L2C_MGMT_INDEX)
92 #define V_L2C_MGMT_INDEX(x) _SB_MAKEVALUE(x,S_L2C_MGMT_INDEX)
93 #define G_L2C_MGMT_INDEX(x) _SB_GETVALUE(x,S_L2C_MGMT_INDEX,M_L2C_MGMT_INDEX)
95 #define S_L2C_MGMT_QUADRANT 15
96 #define M_L2C_MGMT_QUADRANT _SB_MAKEMASK(2,S_L2C_MGMT_QUADRANT)
97 #define V_L2C_MGMT_QUADRANT(x) _SB_MAKEVALUE(x,S_L2C_MGMT_QUADRANT)
98 #define G_L2C_MGMT_QUADRANT(x) _SB_GETVALUE(x,S_L2C_MGMT_QUADRANT,M_L2C_MGMT_QUADRANT)
100 #define S_L2C_MGMT_HALF 16
101 #define M_L2C_MGMT_HALF _SB_MAKEMASK(1,S_L2C_MGMT_HALF)
103 #define S_L2C_MGMT_WAY 17
104 #define M_L2C_MGMT_WAY _SB_MAKEMASK(2,S_L2C_MGMT_WAY)
105 #define V_L2C_MGMT_WAY(x) _SB_MAKEVALUE(x,S_L2C_MGMT_WAY)
106 #define G_L2C_MGMT_WAY(x) _SB_GETVALUE(x,S_L2C_MGMT_WAY,M_L2C_MGMT_WAY)
108 #define S_L2C_MGMT_TAG 21
109 #define M_L2C_MGMT_TAG _SB_MAKEMASK(6,S_L2C_MGMT_TAG)
110 #define V_L2C_MGMT_TAG(x) _SB_MAKEVALUE(x,S_L2C_MGMT_TAG)
111 #define G_L2C_MGMT_TAG(x) _SB_GETVALUE(x,S_L2C_MGMT_TAG,M_L2C_MGMT_TAG)
113 #define M_L2C_MGMT_DIRTY _SB_MAKEMASK1(19)
114 #define M_L2C_MGMT_VALID _SB_MAKEMASK1(20)
116 #define A_L2C_MGMT_TAG_BASE 0x00D0000000
118 #define L2C_ENTRIES_PER_WAY 4096
119 #define L2C_NUM_WAYS 4
122 #if SIBYTE_HDR_FEATURE(112x, PASS1)
124 * L2 Read Misc. register (A_L2_READ_MISC)
126 #define S_L2C_MISC_NO_WAY 10
127 #define M_L2C_MISC_NO_WAY _SB_MAKEMASK(4,S_L2C_MISC_NO_WAY)
128 #define V_L2C_MISC_NO_WAY(x) _SB_MAKEVALUE(x,S_L2C_MISC_NO_WAY)
129 #define G_L2C_MISC_NO_WAY(x) _SB_GETVALUE(x,S_L2C_MISC_NO_WAY,M_L2C_MISC_NO_WAY)
131 #define M_L2C_MISC_ECC_CLEANUP_DIS _SB_MAKEMASK1(9)
132 #define M_L2C_MISC_MC_PRIO_LOW _SB_MAKEMASK1(8)
133 #define M_L2C_MISC_SOFT_DISABLE_T _SB_MAKEMASK1(7)
134 #define M_L2C_MISC_SOFT_DISABLE_B _SB_MAKEMASK1(6)
135 #define M_L2C_MISC_SOFT_DISABLE_R _SB_MAKEMASK1(5)
136 #define M_L2C_MISC_SOFT_DISABLE_L _SB_MAKEMASK1(4)
137 #define M_L2C_MISC_SCACHE_DISABLE_T _SB_MAKEMASK1(3)
138 #define M_L2C_MISC_SCACHE_DISABLE_B _SB_MAKEMASK1(2)
139 #define M_L2C_MISC_SCACHE_DISABLE_R _SB_MAKEMASK1(1)
140 #define M_L2C_MISC_SCACHE_DISABLE_L _SB_MAKEMASK1(0)
141 #endif /* 112x PASS1 */
144 #endif