]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo_bsp/ps7_cortexa9_0/libsrc/standalone_v5_4/src/xl2cc.h
Completely re-generate the Zynq 7000 demo using the 2016.1 SDK tools.
[freertos] / FreeRTOS / Demo / CORTEX_A9_Zynq_ZC702 / RTOSDemo_bsp / ps7_cortexa9_0 / libsrc / standalone_v5_4 / src / xl2cc.h
1 /******************************************************************************
2 *
3 * Copyright (C) 2011 - 2015 Xilinx, Inc.  All rights reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * Use of the Software is limited solely to applications:
16 * (a) running on a Xilinx device, or
17 * (b) that interact with a Xilinx device through a bus or interconnect.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * XILINX  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 *
27 * Except as contained in this notice, the name of the Xilinx shall not be used
28 * in advertising or otherwise to promote the sale, use or other dealings in
29 * this Software without prior written authorization from Xilinx.
30 *
31 ******************************************************************************/
32 /*****************************************************************************/
33 /**
34 * @file xl2cc.h
35 *
36 * This file contains the address definitions for the PL310 Level-2 Cache
37 * Controller.
38 *
39 * <pre>
40 * MODIFICATION HISTORY:
41 *
42 * Ver   Who  Date     Changes
43 * ----- ---- -------- ---------------------------------------------------
44 * 1.00a sdm  02/01/10 Initial version
45 * 3.10a srt 04/18/13 Implemented ARM Erratas. Please refer to file
46 *                     'xil_errata.h' for errata description
47 * </pre>
48 *
49 * @note
50 *
51 * None.
52 *
53 ******************************************************************************/
54
55 #ifndef _XL2CC_H_
56 #define _XL2CC_H_
57
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61
62 /************************** Constant Definitions *****************************/
63 /* L2CC Register Offsets */
64 #define XPS_L2CC_ID_OFFSET              0x0000U
65 #define XPS_L2CC_TYPE_OFFSET            0x0004U
66 #define XPS_L2CC_CNTRL_OFFSET           0x0100U
67 #define XPS_L2CC_AUX_CNTRL_OFFSET       0x0104U
68 #define XPS_L2CC_TAG_RAM_CNTRL_OFFSET   0x0108U
69 #define XPS_L2CC_DATA_RAM_CNTRL_OFFSET  0x010CU
70
71 #define XPS_L2CC_EVNT_CNTRL_OFFSET      0x0200U
72 #define XPS_L2CC_EVNT_CNT1_CTRL_OFFSET  0x0204U
73 #define XPS_L2CC_EVNT_CNT0_CTRL_OFFSET  0x0208U
74 #define XPS_L2CC_EVNT_CNT1_VAL_OFFSET   0x020CU
75 #define XPS_L2CC_EVNT_CNT0_VAL_OFFSET   0x0210U
76
77 #define XPS_L2CC_IER_OFFSET             0x0214U         /* Interrupt Mask */
78 #define XPS_L2CC_IPR_OFFSET             0x0218U         /* Masked interrupt status */
79 #define XPS_L2CC_ISR_OFFSET             0x021CU         /* Raw Interrupt Status */
80 #define XPS_L2CC_IAR_OFFSET             0x0220U         /* Interrupt Clear */
81
82 #define XPS_L2CC_CACHE_SYNC_OFFSET              0x0730U         /* Cache Sync */
83 #define XPS_L2CC_DUMMY_CACHE_SYNC_OFFSET        0x0740U         /* Dummy Register for Cache Sync */
84 #define XPS_L2CC_CACHE_INVLD_PA_OFFSET          0x0770U         /* Cache Invalid by PA */
85 #define XPS_L2CC_CACHE_INVLD_WAY_OFFSET         0x077CU         /* Cache Invalid by Way */
86 #define XPS_L2CC_CACHE_CLEAN_PA_OFFSET          0x07B0U         /* Cache Clean by PA */
87 #define XPS_L2CC_CACHE_CLEAN_INDX_OFFSET        0x07B8U         /* Cache Clean by Index */
88 #define XPS_L2CC_CACHE_CLEAN_WAY_OFFSET         0x07BCU         /* Cache Clean by Way */
89 #define XPS_L2CC_CACHE_INV_CLN_PA_OFFSET        0x07F0U         /* Cache Invalidate and Clean by PA */
90 #define XPS_L2CC_CACHE_INV_CLN_INDX_OFFSET      0x07F8U         /* Cache Invalidate and Clean by Index */
91 #define XPS_L2CC_CACHE_INV_CLN_WAY_OFFSET       0x07FCU         /* Cache Invalidate and Clean by Way */
92
93 #define XPS_L2CC_CACHE_DLCKDWN_0_WAY_OFFSET     0x0900U         /* Cache Data Lockdown 0 by Way */
94 #define XPS_L2CC_CACHE_ILCKDWN_0_WAY_OFFSET     0x0904U         /* Cache Instruction Lockdown 0 by Way */
95 #define XPS_L2CC_CACHE_DLCKDWN_1_WAY_OFFSET     0x0908U         /* Cache Data Lockdown 1 by Way */
96 #define XPS_L2CC_CACHE_ILCKDWN_1_WAY_OFFSET     0x090CU         /* Cache Instruction Lockdown 1 by Way */
97 #define XPS_L2CC_CACHE_DLCKDWN_2_WAY_OFFSET     0x0910U         /* Cache Data Lockdown 2 by Way */
98 #define XPS_L2CC_CACHE_ILCKDWN_2_WAY_OFFSET     0x0914U         /* Cache Instruction Lockdown 2 by Way */
99 #define XPS_L2CC_CACHE_DLCKDWN_3_WAY_OFFSET     0x0918U         /* Cache Data Lockdown 3 by Way */
100 #define XPS_L2CC_CACHE_ILCKDWN_3_WAY_OFFSET     0x091CU         /* Cache Instruction Lockdown 3 by Way */
101 #define XPS_L2CC_CACHE_DLCKDWN_4_WAY_OFFSET     0x0920U         /* Cache Data Lockdown 4 by Way */
102 #define XPS_L2CC_CACHE_ILCKDWN_4_WAY_OFFSET     0x0924U         /* Cache Instruction Lockdown 4 by Way */
103 #define XPS_L2CC_CACHE_DLCKDWN_5_WAY_OFFSET     0x0928U         /* Cache Data Lockdown 5 by Way */
104 #define XPS_L2CC_CACHE_ILCKDWN_5_WAY_OFFSET     0x092CU         /* Cache Instruction Lockdown 5 by Way */
105 #define XPS_L2CC_CACHE_DLCKDWN_6_WAY_OFFSET     0x0930U         /* Cache Data Lockdown 6 by Way */
106 #define XPS_L2CC_CACHE_ILCKDWN_6_WAY_OFFSET     0x0934U         /* Cache Instruction Lockdown 6 by Way */
107 #define XPS_L2CC_CACHE_DLCKDWN_7_WAY_OFFSET     0x0938U         /* Cache Data Lockdown 7 by Way */
108 #define XPS_L2CC_CACHE_ILCKDWN_7_WAY_OFFSET     0x093CU         /* Cache Instruction Lockdown 7 by Way */
109
110 #define XPS_L2CC_CACHE_LCKDWN_LINE_ENABLE_OFFSET 0x0950U                /* Cache Lockdown Line Enable */
111 #define XPS_L2CC_CACHE_UUNLOCK_ALL_WAY_OFFSET   0x0954U         /* Cache Unlock All Lines by Way */
112
113 #define XPS_L2CC_ADDR_FILTER_START_OFFSET       0x0C00U         /* Start of address filtering */
114 #define XPS_L2CC_ADDR_FILTER_END_OFFSET         0x0C04U         /* Start of address filtering */
115
116 #define XPS_L2CC_DEBUG_CTRL_OFFSET              0x0F40U         /* Debug Control Register */
117
118 /* XPS_L2CC_CNTRL_OFFSET bit masks */
119 #define XPS_L2CC_ENABLE_MASK            0x00000001U     /* enables the L2CC */
120
121 /* XPS_L2CC_AUX_CNTRL_OFFSET bit masks */
122 #define XPS_L2CC_AUX_EBRESPE_MASK       0x40000000U     /* Early BRESP Enable */
123 #define XPS_L2CC_AUX_IPFE_MASK          0x20000000U     /* Instruction Prefetch Enable */
124 #define XPS_L2CC_AUX_DPFE_MASK          0x10000000U     /* Data Prefetch Enable */
125 #define XPS_L2CC_AUX_NSIC_MASK          0x08000000U     /* Non-secure interrupt access control */
126 #define XPS_L2CC_AUX_NSLE_MASK          0x04000000U     /* Non-secure lockdown enable */
127 #define XPS_L2CC_AUX_CRP_MASK           0x02000000U     /* Cache replacement policy */
128 #define XPS_L2CC_AUX_FWE_MASK           0x01800000U     /* Force write allocate */
129 #define XPS_L2CC_AUX_SAOE_MASK          0x00400000U     /* Shared attribute override enable */
130 #define XPS_L2CC_AUX_PE_MASK            0x00200000U     /* Parity enable */
131 #define XPS_L2CC_AUX_EMBE_MASK          0x00100000U     /* Event monitor bus enable */
132 #define XPS_L2CC_AUX_WAY_SIZE_MASK      0x000E0000U     /* Way-size */
133 #define XPS_L2CC_AUX_ASSOC_MASK         0x00010000U     /* Associativity */
134 #define XPS_L2CC_AUX_SAIE_MASK          0x00002000U     /* Shared attribute invalidate enable */
135 #define XPS_L2CC_AUX_EXCL_CACHE_MASK    0x00001000U     /* Exclusive cache configuration */
136 #define XPS_L2CC_AUX_SBDLE_MASK         0x00000800U     /* Store buffer device limitation Enable */
137 #define XPS_L2CC_AUX_HPSODRE_MASK       0x00000400U     /* High Priority for SO and Dev Reads Enable */
138 #define XPS_L2CC_AUX_FLZE_MASK          0x00000001U     /* Full line of zero enable */
139
140 #define XPS_L2CC_AUX_REG_DEFAULT_MASK   0x72360000U     /* Enable all prefetching, */
141                                                     /* Cache replacement policy, Parity enable, */
142                                                     /* Event monitor bus enable and Way Size (64 KB) */
143 #define XPS_L2CC_AUX_REG_ZERO_MASK      0xFFF1FFFFU     /* */
144
145 #define XPS_L2CC_TAG_RAM_DEFAULT_MASK   0x00000111U     /* latency for TAG RAM */
146 #define XPS_L2CC_DATA_RAM_DEFAULT_MASK  0x00000121U     /* latency for DATA RAM */
147
148 /* Interrupt bit masks */
149 #define XPS_L2CC_IXR_DECERR_MASK        0x00000100U     /* DECERR from L3 */
150 #define XPS_L2CC_IXR_SLVERR_MASK        0x00000080U     /* SLVERR from L3 */
151 #define XPS_L2CC_IXR_ERRRD_MASK         0x00000040U     /* Error on L2 data RAM (Read) */
152 #define XPS_L2CC_IXR_ERRRT_MASK         0x00000020U     /* Error on L2 tag RAM (Read) */
153 #define XPS_L2CC_IXR_ERRWD_MASK         0x00000010U     /* Error on L2 data RAM (Write) */
154 #define XPS_L2CC_IXR_ERRWT_MASK         0x00000008U     /* Error on L2 tag RAM (Write) */
155 #define XPS_L2CC_IXR_PARRD_MASK         0x00000004U     /* Parity Error on L2 data RAM (Read) */
156 #define XPS_L2CC_IXR_PARRT_MASK         0x00000002U     /* Parity Error on L2 tag RAM (Read) */
157 #define XPS_L2CC_IXR_ECNTR_MASK         0x00000001U     /* Event Counter1/0 Overflow Increment */
158
159 /* Address filtering mask and enable bit */
160 #define XPS_L2CC_ADDR_FILTER_VALID_MASK 0xFFF00000U     /* Address filtering valid bits*/
161 #define XPS_L2CC_ADDR_FILTER_ENABLE_MASK 0x00000001U    /* Address filtering enable bit*/
162
163 /* Debug control bits */
164 #define XPS_L2CC_DEBUG_SPIDEN_MASK      0x00000004U     /* Debug SPIDEN bit */
165 #define XPS_L2CC_DEBUG_DWB_MASK         0x00000002U     /* Debug DWB bit, forces write through */
166 #define XPS_L2CC_DEBUG_DCL_MASK         0x00000002U     /* Debug DCL bit, disables cache line fill */
167
168 #ifdef __cplusplus
169 }
170 #endif
171
172 #endif /* protection macro */