NMSIS-Core  Version 1.6.0
NMSIS-Core support for Nuclei processor-based devices
core_feature_smpcc.h
1 /*
2  * Copyright (c) 2019 Nuclei Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Licensed under the Apache License, Version 2.0 (the License); you may
7  * not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #ifndef __CORE_FEATURE_SMPCC_H__
19 #define __CORE_FEATURE_SMPCC_H__
24 /*
25  * SMP & Cluster Cache Feature Configuration Macro:
26  *
27  * 1. __SMPCC_PRESENT: Define whether SMP & Cluster Cache feature is present or not
28  * * 0: Not present
29  * * 1: Present
30  * 2. __CCM_PRESENT: Define whether Nuclei Cache Control and Maintainence(CCM) Unit is present or not.
31  * * 0: Not present
32  * * 1: Present
33  * 3. __SMPCC_BASEADDR: Base address of the SMP & Cluster Cache unit.
34  *
35  */
36 #ifdef __cplusplus
37  extern "C" {
38 #endif
39 
40 #include "core_feature_base.h"
41 #include "core_feature_iinfo.h"
42 
43 #if defined(__SMPCC_PRESENT) && (__SMPCC_PRESENT == 1)
55 typedef union
56 {
57  struct {
58  __IM uint32_t mic_ver:8;
59  __IM uint32_t min_ver:8;
60  __IM uint32_t maj_ver:8;
61  __IM uint32_t _reserved:8;
62  } b;
63  __IM uint32_t w;
64 } SMP_VER_Type;
65 
69 typedef union
70 {
71  struct {
72  __IM uint32_t cc_present:1;
73  __IM uint32_t smp_core_num:6;
74  __IM uint32_t iocp_num:6;
75  __IM uint32_t pmon_num:6;
76  __IM uint32_t _reserved:13;
77  } b;
78  __IM uint32_t w;
79 } SMP_CFG_Type;
80 
84 typedef union
85 {
86  struct {
87  __IM uint32_t cc_set:4;
88  __IM uint32_t cc_way:4;
89  __IM uint32_t cc_lsize:3;
90  __IM uint32_t cc_ecc:1;
91  __IM uint32_t cc_tcycle:3;
92  __IM uint32_t cc_dcycle:3;
93  __IM uint32_t _reserved:14;
94  } b;
95  uint32_t w;
96 } CC_CFG_Type;
97 
101 typedef union
102 {
103  struct {
104  __IOM uint32_t smp_enable:16;
105  __IM uint32_t _reserved:16;
106  } b;
107  uint32_t w;
108 } SMP_ENB_Type;
109 
113 typedef union
114 {
115  struct {
116  __IOM uint32_t cc_en:1;
117  __IOM uint32_t cc_ecc_en:1;
118  __IOM uint32_t ecc_excp_en:1;
119  __IOM uint32_t lock_ecc_cfg:1;
120  __IOM uint32_t lock_ecc_err_inj:1;
121  __IOM uint32_t recv_err_irq_en:1;
122  __IOM uint32_t fatal_err_irq_en:1;
123  __IOM uint32_t bus_err_pend:1;
124  __IOM uint32_t bus_err_irq_en:1;
125  __IOM uint32_t sup_cmd_en:1;
126  __IOM uint32_t use_cmd_en:1;
127  __IOM uint32_t ecc_chk_en:1;
128  __IOM uint32_t clm_ecc_en:1;
129  __IOM uint32_t clm_excp_en:1;
130  __IOM uint32_t clm_ecc_chk_en:1;
131  __IOM uint32_t pf_sh_cl_en:1;
132  __IOM uint32_t pf_l2_early_en:1;
133  __IOM uint32_t pf_biu_outs_en:1;
134  __IOM uint32_t i_snoop_d_en:1;
135  __IOM uint32_t iocc_err:1;
136  __IOM uint32_t early_wr_err:1;
137  __IOM uint32_t pf_no_wb:1;
138  __IM uint32_t _reserved:10;
140  } b;
141  uint32_t w;
142 } CC_CTRL_Type;
143 
144 #define SMPCC_CTRL_CC_EN_Pos 0U
145 #define SMPCC_CTRL_CC_EN_Msk (0x1UL << SMPCC_CTRL_CC_EN_Pos)
146 #define SMPCC_CTRL_CC_EN_ENABLE 1U
147 #define SMPCC_CTRL_CC_EN_DISABLE 0U
149 #define SMPCC_CTRL_CC_ECC_EN_Pos 1U
150 #define SMPCC_CTRL_CC_ECC_EN_Msk (0x1UL << SMPCC_CTRL_CC_ECC_EN_Pos)
151 #define SMPCC_CTRL_CC_ECC_EN_ENABLE 1U
152 #define SMPCC_CTRL_CC_ECC_EN_DISABLE 0U
154 #define SMPCC_CTRL_CC_ECC_EXCP_EN_Pos 2U
155 #define SMPCC_CTRL_CC_ECC_EXCP_EN_Msk (0x1UL << SMPCC_CTRL_CC_ECC_EXCP_EN_Pos)
156 #define SMPCC_CTRL_CC_ECC_EXCP_EN_ENABLE 1U
157 #define SMPCC_CTRL_CC_ECC_EXCP_EN_DISABLE 0U
159 #define SMPCC_CTRL_LOCK_ECC_CFG_Pos 3U
160 #define SMPCC_CTRL_LOCK_ECC_CFG_Msk (0x1UL << SMPCC_CTRL_LOCK_ECC_CFG_Pos)
161 #define SMPCC_CTRL_LOCK_ECC_CFG_LOCK 1U
163 #define SMPCC_CTRL_LOCK_ECC_ERR_INJ_Pos 4U
164 #define SMPCC_CTRL_LOCK_ECC_ERR_INJ_Msk (0x1UL << SMPCC_CTRL_LOCK_ECC_ERR_INJ_Pos)
165 #define SMPCC_CTRL_LOCK_ECC_ERR_INJ_LOCK 1U
167 #define SMPCC_CTRL_RECV_ERR_IRQ_EN_Pos 5U
168 #define SMPCC_CTRL_RECV_ERR_IRQ_EN_Msk (0x1UL << SMPCC_CTRL_RECV_ERR_IRQ_EN_Pos)
169 #define SMPCC_CTRL_RECV_ERR_IRQ_EN_ENABLE 1U
170 #define SMPCC_CTRL_RECV_ERR_IRQ_EN_DISABLE 0U
172 #define SMPCC_CTRL_FATAL_ERR_IRQ_EN_Pos 6U
173 #define SMPCC_CTRL_FATAL_ERR_IRQ_EN_Msk (0x1UL << SMPCC_CTRL_FATAL_ERR_IRQ_EN_Pos)
174 #define SMPCC_CTRL_FATAL_ERR_IRQ_EN_ENABLE 1U
175 #define SMPCC_CTRL_FATAL_ERR_IRQ_EN_DISABLE 0U
177 #define SMPCC_CTRL_BUS_ERR_PEND_Pos 7U
178 #define SMPCC_CTRL_BUS_ERR_PEND_Msk (0x1UL << SMPCC_CTRL_BUS_ERR_PEND_Pos)
180 #define SMPCC_CTRL_BUS_ERR_IRQ_EN_Pos 8U
181 #define SMPCC_CTRL_BUS_ERR_IRQ_EN_Msk (0x1UL << SMPCC_CTRL_BUS_ERR_IRQ_EN_Pos)
182 #define SMPCC_CTRL_BUS_ERR_IRQ_EN_ENABLE 1U
183 #define SMPCC_CTRL_BUS_ERR_IRQ_EN_DISABLE 0U
185 #define SMPCC_CTRL_SUP_CMD_EN_Pos 9U
186 #define SMPCC_CTRL_SUP_CMD_EN_Msk (0x1UL << SMPCC_CTRL_SUP_CMD_EN_Pos)
187 #define SMPCC_CTRL_SUP_CMD_EN_ENABLE 1U
188 #define SMPCC_CTRL_SUP_CMD_EN_DISABLE 0U
190 #define SMPCC_CTRL_USE_CMD_EN_Pos 10U
191 #define SMPCC_CTRL_USE_CMD_EN_Msk (0x1UL << SMPCC_CTRL_USE_CMD_EN_Pos)
192 #define SMPCC_CTRL_USE_CMD_EN_ENABLE 1U
193 #define SMPCC_CTRL_USE_CMD_EN_DISABLE 0U
195 #define SMPCC_CTRL_ECC_CHK_EN_Pos 11U
196 #define SMPCC_CTRL_ECC_CHK_EN_Msk (0x1UL << SMPCC_CTRL_ECC_CHK_EN_Pos)
197 #define SMPCC_CTRL_ECC_CHK_EN_ENABLE 1U
198 #define SMPCC_CTRL_ECC_CHK_EN_DISABLE 0U
200 #define SMPCC_CTRL_CLM_ECC_EN_Pos 12U
201 #define SMPCC_CTRL_CLM_ECC_EN_Msk (0x1UL << SMPCC_CTRL_CLM_ECC_EN_Pos)
202 #define SMPCC_CTRL_CLM_ECC_EN_ENABLE 1U
203 #define SMPCC_CTRL_CLM_ECC_EN_DISABLE 0U
205 #define SMPCC_CTRL_CLM_EXCP_EN_Pos 13U
206 #define SMPCC_CTRL_CLM_EXCP_EN_Msk (0x1UL << SMPCC_CTRL_CLM_EXCP_EN_Pos)
207 #define SMPCC_CTRL_CLM_EXCP_EN_ENABLE 1U
208 #define SMPCC_CTRL_CLM_EXCP_EN_DISABLE 0U
210 #define SMPCC_CTRL_CLM_ECC_CHK_EN_Pos 14U
211 #define SMPCC_CTRL_CLM_ECC_CHK_EN_Msk (0x1UL << SMPCC_CTRL_CLM_ECC_CHK_EN_Pos)
212 #define SMPCC_CTRL_CLM_ECC_CHK_EN_ENABLE 1U
213 #define SMPCC_CTRL_CLM_ECC_CHK_EN_DISABLE 0U
215 #define SMPCC_CTRL_PF_SH_CL_EN_Pos 15U
216 #define SMPCC_CTRL_PF_SH_CL_EN_Msk (0x1UL << SMPCC_CTRL_PF_SH_CL_EN_Pos)
217 #define SMPCC_CTRL_PF_SH_CL_EN_ENABLE 1U
218 #define SMPCC_CTRL_PF_SH_CL_EN_DISABLE 0U
220 #define SMPCC_CTRL_PF_L2_EARLY_EN_Pos 16U
221 #define SMPCC_CTRL_PF_L2_EARLY_EN_Msk (0x1UL << SMPCC_CTRL_PF_L2_EARLY_EN_Pos)
222 #define SMPCC_CTRL_PF_L2_EARLY_EN_ENABLE 1U
223 #define SMPCC_CTRL_PF_L2_EARLY_EN_DISABLE 0U
225 #define SMPCC_CTRL_PF_BIU_OUTS_EN_Pos 17U
226 #define SMPCC_CTRL_PF_BIU_OUTS_EN_Msk (0x1UL << SMPCC_CTRL_PF_BIU_OUTS_EN_Pos)
227 #define SMPCC_CTRL_PF_BIU_OUTS_EN_ENABLE 1U
228 #define SMPCC_CTRL_PF_BIU_OUTS_EN_DISABLE 0U
230 #define SMPCC_CTRL_I_SNOOP_D_EN_Pos 18U
231 #define SMPCC_CTRL_I_SNOOP_D_EN_Msk (0x1UL << SMPCC_CTRL_I_SNOOP_D_EN_Pos)
232 #define SMPCC_CTRL_I_SNOOP_D_EN_ENABLE 1U
233 #define SMPCC_CTRL_I_SNOOP_D_EN_DISABLE 0U
235 #define SMPCC_CTRL_IOCC_ERR_Pos 19U
236 #define SMPCC_CTRL_IOCC_ERR_Msk (0x1UL << SMPCC_CTRL_IOCC_ERR_Pos)
238 #define SMPCC_CTRL_EARLY_WR_ERR_Pos 20U
239 #define SMPCC_CTRL_EARLY_WR_ERR_Msk (0x1UL << SMPCC_CTRL_EARLY_WR_ERR_Pos)
241 #define SMPCC_CTRL_PF_NO_WB_Pos 21U
242 #define SMPCC_CTRL_PF_NO_WB_Msk (0x1UL << SMPCC_CTRL_PF_NO_WB_Pos)
243 #define SMPCC_CTRL_PF_NO_WB_ENABLE 1U
244 #define SMPCC_CTRL_PF_NO_WB_DISABLE 0U
249 typedef union
250 {
251  struct {
252  __IOM uint32_t cmd:5;
253  __IM uint32_t _reserved:18;
254  __IOM uint32_t reisc:1;
255  __IOM uint32_t feisc:1;
256  __IOM uint32_t besc:1;
257  __IM uint32_t result_code:5;
258  __IM uint32_t complete:1;
259  } b;
260  uint32_t w;
261 } CC_CMD_Type;
262 
266 typedef union
267 {
268  struct {
269  __IOM uint32_t inj_data:1;
270  __IOM uint32_t inj_tag:1;
271  __IOM uint32_t inj_clm:1;
272  __IOM uint32_t inj_mode:1;
273  __IOM uint32_t cs:1;
274  __IM uint32_t _reserved0:19;
280  __IM uint32_t inj_ecc_code:8;
281  } b;
282  uint32_t w;
284 
285 #define SMPCC_ERR_INJ_INJDATA_Pos 0U
286 #define SMPCC_ERR_INJ_INJDATA_Msk (0x1UL << SMPCC_ERR_INJ_INJDATA_Pos)
287 #define SMPCC_ERR_INJ_INJDATA_ENABLE 1U
288 #define SMPCC_ERR_INJ_INJDATA_DISABLE 0U
290 #define SMPCC_ERR_INJ_INJTAG_Pos 1U
291 #define SMPCC_ERR_INJ_INJTAG_Msk (0x1UL << SMPCC_ERR_INJ_INJTAG_Pos)
292 #define SMPCC_ERR_INJ_INJTAG_ENABLE 1U
293 #define SMPCC_ERR_INJ_INJTAG_DISABLE 0U
295 #define SMPCC_ERR_INJ_INJCLM_Pos 2U
296 #define SMPCC_ERR_INJ_INJCLM_Msk (0x1UL << SMPCC_ERR_INJ_INJCLM_Pos)
297 #define SMPCC_ERR_INJ_INJCLM_ENABLE 1U
298 #define SMPCC_ERR_INJ_INJCLM_DISABLE 0U
300 #define SMPCC_ERR_INJ_INJMODE_Pos 3U
301 #define SMPCC_ERR_INJ_INJMODE_Msk (0x1UL << SMPCC_ERR_INJ_INJMODE_Pos)
302 #define SMPCC_ERR_INJ_INJMODE_DIRECT 0U
303 #define SMPCC_ERR_INJ_INJMODE_XOR 1U
305 #define SMPCC_ERR_INJ_CS_Pos 4U
306 #define SMPCC_ERR_INJ_CS_Msk (0x1UL << SMPCC_ERR_INJ_CS_Pos)
307 #define SMPCC_ERR_INJ_CS_START 1U
309 #define SMPCC_ERR_INJ_INJECCCODE_Pos 24U
310 #define SMPCC_ERR_INJ_INJECCCODE_Msk (0xFFUL << SMPCC_ERR_INJ_INJECCCODE_Pos)
315 typedef union
316 {
317  struct {
318  __IOM uint32_t cnt:16;
319  __IM uint32_t _reserved:16;
320  } b;
321  uint32_t w;
323 
327 typedef union
328 {
329  struct {
330  __IOM uint32_t cnt:16;
331  __IM uint32_t _reserved:16;
332  } b;
333  uint32_t w;
335 
339 typedef union
340 {
341  struct {
342  __IOM uint32_t cnt:16;
343  __IM uint32_t _reserved:16;
344  } b;
345  uint32_t w;
347 
351 typedef union
352 {
353  struct {
354  __IOM uint32_t cnt:16;
355  __IM uint32_t _reserved:16;
356  } b;
357  uint32_t w;
359 
363 typedef __IO uint64_t CC_BUS_ERR_ADDR_Type;
364 
368 typedef union
369 {
370  struct {
371  __IOM uint32_t read_bus_err:1;
372  __IOM uint32_t write_bus_err:1;
373  __IOM uint32_t cc_scu_ecc_err:1;
374  __IOM uint32_t iocp_bus_err:1;
375  __IM uint32_t _reserved:28;
376  } b;
377  uint32_t w;
379 
380 #define SMPCC_CLIERRSTS_READ_BUS_ERR_Pos 0U
381 #define SMPCC_CLIERRSTS_READ_BUS_ERR_Msk (0x1UL << SMPCC_CLIERRSTS_READ_BUS_ERR_Pos)
383 #define SMPCC_CLIERRSTS_WRITE_BUS_ERR_Pos 1U
384 #define SMPCC_CLIERRSTS_WRITE_BUS_ERR_Msk (0x1UL << SMPCC_CLIERRSTS_WRITE_BUS_ERR_Pos)
386 #define SMPCC_CLIERRSTS_CC_SCU_ECC_ERR_Pos 2U
387 #define SMPCC_CLIERRSTS_CC_SCU_ECC_ERR_Msk (0x1UL << SMPCC_CLIERRSTS_CC_SCU_ECC_ERR_Pos)
389 #define SMPCC_CLIERRSTS_IOCP_BUS_ERR_Pos 3U
390 #define SMPCC_CLIERRSTS_IOCP_BUS_ERR_Msk (0x1UL << SMPCC_CLIERRSTS_IOCP_BUS_ERR_Pos)
395 typedef union
396 {
397  struct {
398  __IM uint32_t snoop_pending:16;
399  __IM uint32_t _reserved:16;
400  } b;
401  __IM uint32_t w;
403 
407 typedef union
408 {
409  struct {
410  __IM uint32_t trans_pending:16;
411  __IM uint32_t _reserved:15;
412  __IM uint32_t ext_trans:1;
413  } b;
414  __IM uint32_t w;
416 
420 typedef union
421 {
422  struct {
423  __IOM uint32_t clm_base32;
424  __IM uint32_t _reserved;
425  } clm32;
426  uint64_t clm_base64;
428 
432 typedef union
433 {
434  struct {
435  __IOM uint32_t ena:16;
436  __IM uint32_t _reserved:16;
437  } b;
438  uint32_t w;
440 
444 typedef union
445 {
446  struct {
447  __IOM uint32_t cs:1;
448  __IM uint32_t _reserved:31;
449  } b;
450  uint32_t w;
452 
456 typedef union
457 {
458  struct {
459  __IOM uint32_t rd_stm_en:1;
460  __IOM uint32_t wr_stm_en:1;
461  __IOM uint32_t trans_alloc:1;
462  __IOM uint32_t rd_merge_en:1;
463  __IOM uint32_t cross_en:1;
464  __IM uint32_t _reserved:27;
465  } b;
466  uint32_t w;
467 } STM_CTRL_Type;
468 
469 #define SMPCC_STMCTRL_RD_STM_EN_Pos 0U
470 #define SMPCC_STMCTRL_RD_STM_EN_Msk (0x1UL << SMPCC_STMCTRL_RD_STM_EN_Pos)
471 #define SMPCC_STMCTRL_RD_STM_EN_ENABLE 1U
472 #define SMPCC_STMCTRL_RD_STM_EN_DISABLE 0U
474 #define SMPCC_STMCTRL_WR_STM_EN_Pos 1U
475 #define SMPCC_STMCTRL_WR_STM_EN_Msk (0x1UL << SMPCC_STMCTRL_WR_STM_EN_Pos)
476 #define SMPCC_STMCTRL_WR_STM_EN_ENABLE 1U
477 #define SMPCC_STMCTRL_WR_STM_EN_DISABLE 0U
479 #define SMPCC_STMCTRL_TRANS_ALLOC_Pos 2U
480 #define SMPCC_STMCTRL_TRANS_ALLOC_Msk (0x1UL << SMPCC_STMCTRL_TRANS_ALLOC_Pos)
481 #define SMPCC_STMCTRL_TRANS_ALLOC_ENABLE 1U
482 #define SMPCC_STMCTRL_TRANS_ALLOC_DISABLE 0U
484 #define SMPCC_STMCTRL_RD_MERGE_EN_Pos 3U
485 #define SMPCC_STMCTRL_RD_MERGE_EN_Msk (0x1UL << SMPCC_STMCTRL_RD_MERGE_EN_Pos)
486 #define SMPCC_STMCTRL_RD_MERGE_EN_ENABLE 1U
487 #define SMPCC_STMCTRL_RD_MERGE_EN_DISABLE 0U
489 #define SMPCC_STMCTRL_CROSS_EN_Pos 4U
490 #define SMPCC_STMCTRL_CROSS_EN_Msk (0x1UL << SMPCC_STMCTRL_CROSS_EN_Pos)
491 #define SMPCC_STMCTRL_CROSS_EN_ENABLE 1U
492 #define SMPCC_STMCTRL_CROSS_EN_DISABLE 0U
497 typedef union
498 {
499  struct {
500  __IOM uint32_t rd_byte_threshold:10;
501  __IM uint32_t _reserved0:2;
502  __IOM uint32_t rd_degree:3;
503  __IM uint32_t _reserved1:1;
504  __IOM uint32_t rd_distance:3;
505  __IM uint32_t _reserved2:1;
506  __IOM uint32_t wr_byte_threshold:10;
507  __IM uint32_t _reserved3:2;
508  } b;
509  uint32_t w;
510 } STM_CFG_Type;
511 
512 #define SMPCC_STMCFG_RD_BYTE_THRE_Pos 0U
513 #define SMPCC_STMCFG_RD_BYTE_THRE_Msk (0x3FFUL << SMPCC_STMCFG_RD_BYTE_THRE_Pos)
515 #define SMPCC_STMCFG_RD_DEGREE_Pos 12U
516 #define SMPCC_STMCFG_RD_DEGREE_Msk (0x7UL << SMPCC_STMCFG_RD_DEGREE_Pos)
518 #define SMPCC_STMCFG_RD_DISTANCE_Pos 16U
519 #define SMPCC_STMCFG_RD_DISTANCE_Msk (0x7UL << SMPCC_STMCFG_RD_DISTANCE_Pos)
521 #define SMPCC_STMCFG_WR_BYTE_THRE_Pos 20U
522 #define SMPCC_STMCFG_WR_BYTE_THRE_Msk (0x7FFUL << SMPCC_STMCFG_WR_BYTE_THRE_Pos)
527 typedef union
528 {
529  struct {
530  __IOM uint32_t timeout:11;
531  __IM uint32_t _reserved:21;
532  } b;
533  uint32_t w;
535 
539 typedef union
540 {
541  struct {
542  __IOM uint32_t chk_en:2;
543  __IM uint32_t _reserved:30;
544  } b;
545  uint32_t w;
546 } DFF_PROT_Type;
547 
548 #define SMPCC_DFF_PROT_CHK_EN_Pos 0U
549 #define SMPCC_DFF_PROT_CHK_EN_Msk (0x3UL << SMPCC_DFF_PROT_CHK_EN_Pos)
550 #define SMPCC_DFF_PROT_CHK_EN_ENABLE 2U
551 #define SMPCC_DFF_PROT_CHK_EN_DISABLE 1U
556 typedef union
557 {
558  struct {
559  __IOM uint32_t cc_l2_err_msk:1;
560  __IOM uint32_t cc_core_err_mask:1;
561  __IM uint32_t _reserved:29;
562  } b;
563  uint32_t w;
565 
569 typedef union
570 {
571  struct {
572  __IOM uint64_t cfg:2;
573  __IOM uint64_t addr_hi:62;
574  } b;
575  __IOM uint64_t dw;
576 } NS_RG_Type;
577 
578 #define SMPCC_NS_RG_CFG_Pos 0U
579 #define SMPCC_NS_RG_CFG_Msk (0x3UL << SMPCC_NS_RG_CFG_Pos)
580 #define SMPCC_NS_RG_CFG_DISABLE 0x00U
581 #define SMPCC_NS_RG_CFG_NACL 0x10U
582 #define SMPCC_NS_RG_CFG_NAPOT 0x11U
587 typedef union
588 {
589  struct {
590  __IOM uint32_t event_sel:16;
591  __IOM uint32_t client_sel:5;
592  __IM uint32_t _reserved:11;
593  } b;
594  uint32_t w;
596 
597 #define SMPCC_PMON_EVENT_SEL_Pos 0U
598 #define SMPCC_PMON_EVENT_SEL_Msk (0xFFFFUL << SMPCC_PMON_EVENT_SEL_Pos)
599 #define SMPCC_PMON_EVENT_DISABLE 0U
600 #define SMPCC_PMON_EVENT_DATA_READ_COUNT 1U
601 #define SMPCC_PMON_EVENT_DATA_WRITE_COUNT 2U
602 #define SMPCC_PMON_EVENT_INSTR_READ_COUNT 3U
603 #define SMPCC_PMON_EVENT_DATA_READ_HIT_COUNT 4U
604 #define SMPCC_PMON_EVENT_DATA_WRITE_REPLACE_COUNT 5U
605 #define SMPCC_PMON_EVENT_DATA_READ_REPLACE_COUNT 6U
606 #define SMPCC_PMON_EVENT_DATA_READ_MISS_COUNT 7U
607 #define SMPCC_PMON_EVENT_INSTR_READ_HIT_COUNT 8U
608 #define SMPCC_PMON_EVENT_INSTR_READ_MISS_COUNT 9U
609 #define SMPCC_PMON_EVENT_INSTR_READ_REPLACE_COUNT 10U
611 #define SMPCC_PMON_CLIENT_SEL_Pos 16U
612 #define SMPCC_PMON_CLIENT_SEL_Msk (0x1FUL << SMPCC_PMON_CLIENT_SEL_Pos)
614 #define SMPCC_PMON_EVENT(event, client) \
615  (_VAL2FLD(SMPCC_PMON_EVENT_SEL, event) | \
616  _VAL2FLD(SMPCC_PMON_CLIENT_SEL, client))
617 
621 typedef __IO uint64_t SMP_PMON_CNT_Type;
622 
626 typedef __IO uint64_t CLIENT_ERR_ADDR_Type;
627 
631 typedef union
632 {
633  struct {
634  __IOM uint32_t mask:16;
635  __IM uint32_t _reserved:16;
636  } b;
637  uint32_t w;
639 
643 typedef union
644 {
645  struct {
646  __IOM uint32_t cs:1;
647  __IM uint32_t _reserved:31;
648  } b;
649  uint32_t w;
651 
655 typedef __IO uint64_t CC_INV_RANGE_START_Type;
656 
660 typedef __IO uint64_t CC_INV_RANGE_END_Type;
661 
665 typedef union
666 {
667  struct {
668  __IOM uint32_t num:16;
669  __IM uint32_t _reserved:16;
670  } b;
671  uint32_t w;
673 
677 typedef __IO uint64_t CC_ECC_INJ_ADDR_Type;
678 
682 typedef __IO uint32_t CC_ECC_INJ_DATA_Type;
683 
687 typedef union
688 {
689  struct {
690  __IOM uint32_t wr_rmp_en:1;
691  __IOM uint32_t wr_attri:1;
692  __IOM uint32_t rd_rmp_en:1;
693  __IOM uint32_t rd_attri:1;
694  __IM uint32_t _reserved:28;
695  } b;
696  uint32_t w;
698 
703 #pragma pack(4)
704 typedef struct {
717  __IM uint8_t RESERVED0[12];
718  __IOM CLIENT_ERR_STATUS_Type CLIENT_ERR_STATUS[32];
724  __IOM uint32_t CLM_WAY_EN;
731  __IM uint8_t RESERVED1[12];
732  __IOM NS_RG_Type NS_RG[16];
733  __IOM SMP_PMON_SEL_Type SMP_PMON_SEL[16];
734  __IOM SMP_PMON_CNT_Type SMP_PMON_CNT[16];
735  __IM uint8_t RESERVED2[64];
736  __IOM CLIENT_ERR_ADDR_Type CLIENT_ERR_ADDR[32];
737  __IOM CLIENT_WAY_MASK_Type CLIENT_WAY_MASK[32];
738  __IM uint8_t RESERVED3[800];
742  __IM uint8_t RESERVED4[12];
748 } SMPCC_Type;
749 #pragma pack()
750 
751 #ifndef __SMPCC_BASEADDR
752 /* Base address of SMPCC(__SMPCC_BASEADDR) should be defined in <Device.h> */
753 #error "__SMPCC_BASEADDR is not defined, please check!"
754 #endif
755 
756 /* SMPCC Memory mapping of Device */
757 #define SMPCC_BASE __SMPCC_BASEADDR
758 #define SMPCC ((SMPCC_Type *)SMPCC_BASE) /* end of group NMSIS_Core_SMPCC_Registers */
761 
777 {
778  return SMPCC->SMP_VER;
779 }
780 
788 {
789  return SMPCC->SMP_CFG.b.cc_present;
790 }
791 
799 {
800  return SMPCC->SMP_CFG.b.smp_core_num + 1;
801 }
802 
810 {
811  return SMPCC->SMP_CFG.b.iocp_num;
812 }
813 
821 {
822  return SMPCC->SMP_CFG.b.pmon_num;
823 }
824 
832 {
833  return 1U << SMPCC->CC_CFG.b.cc_set;
834 }
835 
843 {
844  return SMPCC->CC_CFG.b.cc_way + 1;
845 }
846 
854 {
855  return 1 << (SMPCC->CC_CFG.b.cc_lsize + 2);
856 }
857 
865 {
866  return SMPCC->CC_CFG.b.cc_ecc;
867 }
868 
877 __STATIC_FORCEINLINE void SMPCC_EnableSnoop(uint16_t client_msk)
878 {
879  SMPCC->SMP_ENB.b.smp_enable |= client_msk;
880 }
881 
890 __STATIC_FORCEINLINE void SMPCC_DisableSnoop(uint16_t client_msk)
891 {
892  SMPCC->SMP_ENB.b.smp_enable &= ~client_msk;
893 }
894 
903 {
904  SMPCC->CC_CTRL.b.cc_en = SMPCC_CTRL_CC_EN_ENABLE;
905 }
906 
915 {
916  SMPCC->CC_CTRL.b.cc_en = SMPCC_CTRL_CC_EN_DISABLE;
917 }
918 
928 {
929  return SMPCC->CC_CTRL.b.cc_en;
930 }
931 
939 __STATIC_FORCEINLINE uint8_t SMPCC_IsAnySnoopPending(uint32_t client_msk)
940 {
941  return (SMPCC->SNOOP_PENDING.b.snoop_pending & client_msk) != 0;
942 }
943 
952 {
953  return (SMPCC->TRANS_PENDING.b.trans_pending & client_msk) != 0;
954 }
955 
980 {
981 #if (__CPU_PA_SIZE > 32)
982  SMPCC->CLM_ADDR_BASE.clm_base64 = addr;
983 #else
984  SMPCC->CLM_ADDR_BASE.clm32.clm_base32 = (uint32_t)addr;
985 #endif
986  SMPCC->CLM_WAY_EN = 0xFFFFU;
987 }
988 
1014 __STATIC_FORCEINLINE void SMPCC_SetCLMNWays(uint64_t addr, uint32_t way_msk)
1015 {
1016 #if (__CPU_PA_SIZE > 32)
1017  SMPCC->CLM_ADDR_BASE.clm_base64 = addr;
1018 #else
1019  SMPCC->CLM_ADDR_BASE.clm32.clm_base32 = (uint32_t)addr;
1020 #endif
1021  SMPCC->CLM_WAY_EN = way_msk;
1022 }
1023 
1033 {
1034  SMPCC->CLM_WAY_EN = 0x0000U;
1035 }
1036 
1046 {
1047  SMPCC->CC_CTRL.w = val;
1048 }
1049 
1059 {
1060  return SMPCC->CC_CTRL.w;
1061 }
1062 
1071 {
1072  SMPCC->CC_CTRL.b.cc_ecc_en = SMPCC_CTRL_CC_ECC_EN_ENABLE;
1073 }
1074 
1083 {
1084  SMPCC->CC_CTRL.b.cc_ecc_en = SMPCC_CTRL_CC_ECC_EN_DISABLE;
1085 }
1086 
1095 {
1096  SMPCC->CC_CTRL.b.ecc_excp_en = SMPCC_CTRL_CC_ECC_EXCP_EN_ENABLE;
1097 }
1098 
1107 {
1108  SMPCC->CC_CTRL.b.ecc_excp_en = SMPCC_CTRL_CC_ECC_EXCP_EN_DISABLE;
1109 }
1110 
1119 {
1120  SMPCC->CC_CTRL.b.lock_ecc_cfg = SMPCC_CTRL_LOCK_ECC_CFG_LOCK;
1121 }
1122 
1131 {
1132  SMPCC->CC_CTRL.b.lock_ecc_err_inj = SMPCC_CTRL_LOCK_ECC_ERR_INJ_LOCK;
1133 }
1134 
1143 {
1144  SMPCC->CC_CTRL.b.recv_err_irq_en = SMPCC_CTRL_RECV_ERR_IRQ_EN_ENABLE;
1145 }
1146 
1155 {
1156  SMPCC->CC_CTRL.b.recv_err_irq_en = SMPCC_CTRL_RECV_ERR_IRQ_EN_DISABLE;
1157 }
1158 
1167 {
1168  SMPCC->CC_CTRL.b.fatal_err_irq_en = SMPCC_CTRL_FATAL_ERR_IRQ_EN_ENABLE;
1169 }
1170 
1180 {
1181  SMPCC->CC_CTRL.b.bus_err_pend = 0;
1182 }
1183 
1192 {
1193  SMPCC->CC_CTRL.b.fatal_err_irq_en = SMPCC_CTRL_FATAL_ERR_IRQ_EN_DISABLE;
1194 }
1195 
1204 {
1205  SMPCC->CC_CTRL.b.bus_err_irq_en = SMPCC_CTRL_BUS_ERR_IRQ_EN_ENABLE;
1206 }
1207 
1216 {
1217  SMPCC->CC_CTRL.b.bus_err_irq_en = SMPCC_CTRL_BUS_ERR_IRQ_EN_DISABLE;
1218 }
1219 
1228 {
1229  SMPCC->CC_CTRL.b.sup_cmd_en = SMPCC_CTRL_SUP_CMD_EN_ENABLE;
1230 }
1231 
1240 {
1241  SMPCC->CC_CTRL.b.sup_cmd_en = SMPCC_CTRL_SUP_CMD_EN_DISABLE;
1242 }
1243 
1252 {
1253  SMPCC->CC_CTRL.b.use_cmd_en = SMPCC_CTRL_USE_CMD_EN_ENABLE;
1254 }
1255 
1264 {
1265  SMPCC->CC_CTRL.b.use_cmd_en = SMPCC_CTRL_USE_CMD_EN_DISABLE;
1266 }
1267 
1276 {
1277  SMPCC->CC_CTRL.b.ecc_chk_en = SMPCC_CTRL_ECC_CHK_EN_ENABLE;
1278 }
1279 
1288 {
1289  SMPCC->CC_CTRL.b.ecc_chk_en = SMPCC_CTRL_ECC_CHK_EN_DISABLE;
1290 }
1291 
1300 {
1301  SMPCC->CC_CTRL.b.clm_ecc_en = SMPCC_CTRL_CLM_ECC_EN_ENABLE;
1302 }
1303 
1312 {
1313  SMPCC->CC_CTRL.b.clm_ecc_en = SMPCC_CTRL_CLM_ECC_EN_DISABLE;
1314 }
1315 
1324 {
1325  SMPCC->CC_CTRL.b.clm_ecc_chk_en = SMPCC_CTRL_CLM_ECC_CHK_EN_ENABLE;
1326 }
1327 
1336 {
1337  SMPCC->CC_CTRL.b.clm_ecc_chk_en = SMPCC_CTRL_CLM_ECC_CHK_EN_DISABLE;
1338 }
1339 
1348 {
1349  SMPCC->CC_CTRL.b.clm_excp_en = SMPCC_CTRL_CLM_EXCP_EN_ENABLE;
1350 }
1351 
1360 {
1361  SMPCC->CC_CTRL.b.clm_excp_en = SMPCC_CTRL_CLM_EXCP_EN_DISABLE;
1362 }
1363 
1372 {
1373  SMPCC->CC_CTRL.b.pf_sh_cl_en = SMPCC_CTRL_PF_SH_CL_EN_ENABLE;
1374 }
1375 
1384 {
1385  SMPCC->CC_CTRL.b.pf_sh_cl_en = SMPCC_CTRL_PF_SH_CL_EN_DISABLE;
1386 }
1387 
1396 {
1397  SMPCC->CC_CTRL.b.pf_l2_early_en = SMPCC_CTRL_PF_L2_EARLY_EN_ENABLE;
1398 }
1399 
1408 {
1409  SMPCC->CC_CTRL.b.pf_l2_early_en = SMPCC_CTRL_PF_L2_EARLY_EN_DISABLE;
1410 }
1411 
1420 {
1421  SMPCC->CC_CTRL.b.pf_biu_outs_en = SMPCC_CTRL_PF_BIU_OUTS_EN_ENABLE;
1422 }
1423 
1432 {
1433  SMPCC->CC_CTRL.b.pf_biu_outs_en = SMPCC_CTRL_PF_BIU_OUTS_EN_DISABLE;
1434 }
1435 
1444 {
1445  SMPCC->CC_CTRL.b.pf_no_wb = SMPCC_CTRL_PF_NO_WB_ENABLE;
1446 }
1447 
1456 {
1457  SMPCC->CC_CTRL.b.pf_no_wb = SMPCC_CTRL_PF_NO_WB_DISABLE;
1458 }
1459 
1468 {
1469  SMPCC->CC_CTRL.b.i_snoop_d_en = SMPCC_CTRL_I_SNOOP_D_EN_ENABLE;
1470 }
1471 
1480 {
1481  SMPCC->CC_CTRL.b.i_snoop_d_en = SMPCC_CTRL_I_SNOOP_D_EN_DISABLE;
1482 }
1483 
1493 {
1494  return SMPCC->CC_RECV_CNT.b.cnt;
1495 }
1496 
1505 {
1506  SMPCC->CC_RECV_CNT.w = 0;
1507 }
1508 
1518 {
1519  return SMPCC->CC_FATAL_CNT.b.cnt;
1520 }
1521 
1530 {
1531  SMPCC->CC_FATAL_CNT.w = 0;
1532 }
1533 
1543 {
1544  SMPCC->CC_RECV_THV.b.cnt = threshold;
1545 }
1546 
1556 {
1557  return SMPCC->CC_RECV_THV.b.cnt;
1558 }
1559 
1569 {
1570  SMPCC->CC_FATAL_THV.b.cnt = threshold;
1571 }
1572 
1582 {
1583  return SMPCC->CC_FATAL_THV.b.cnt;
1584 }
1585 
1594 {
1595  return SMPCC->CLIENT_ERR_STATUS[client_id].w;
1596 }
1597 
1607 {
1608  SMPCC->STM_CTRL.w = val;
1609 }
1610 
1620 {
1621  return SMPCC->STM_CTRL.w;
1622 }
1623 
1632 {
1633  SMPCC->STM_CTRL.b.rd_stm_en = SMPCC_STMCTRL_RD_STM_EN_ENABLE;
1634 }
1635 
1644 {
1645  SMPCC->STM_CTRL.b.rd_stm_en = SMPCC_STMCTRL_RD_STM_EN_DISABLE;
1646 }
1647 
1656 {
1657  SMPCC->STM_CTRL.b.wr_stm_en = SMPCC_STMCTRL_WR_STM_EN_ENABLE;
1658 }
1659 
1668 {
1669  SMPCC->STM_CTRL.b.wr_stm_en = SMPCC_STMCTRL_WR_STM_EN_DISABLE;
1670 }
1671 
1680 {
1681  SMPCC->STM_CTRL.b.trans_alloc = SMPCC_STMCTRL_TRANS_ALLOC_ENABLE;
1682 }
1683 
1692 {
1693  SMPCC->STM_CTRL.b.trans_alloc = SMPCC_STMCTRL_TRANS_ALLOC_DISABLE;
1694 }
1695 
1704 {
1705  SMPCC->STM_CTRL.b.rd_merge_en = SMPCC_STMCTRL_RD_MERGE_EN_ENABLE;
1706 }
1707 
1716 {
1717  SMPCC->STM_CTRL.b.rd_merge_en = SMPCC_STMCTRL_RD_MERGE_EN_DISABLE;
1718 }
1719 
1728 {
1729  SMPCC->STM_CTRL.b.cross_en = SMPCC_STMCTRL_CROSS_EN_ENABLE;
1730 }
1731 
1740 {
1741  SMPCC->STM_CTRL.b.cross_en = SMPCC_STMCTRL_CROSS_EN_DISABLE;
1742 }
1743 
1754 __STATIC_FORCEINLINE void SMPCC_SetNSRegionNACL(uint8_t region_id, uint64_t addr)
1755 {
1756  SMPCC->NS_RG[region_id].dw = SMPCC_NS_RG_CFG_NACL | addr;
1757 }
1758 
1769 __STATIC_FORCEINLINE void SMPCC_SetNSRegionNAPOT(uint8_t region_id, uint64_t addr)
1770 {
1771  SMPCC->NS_RG[region_id].dw = SMPCC_NS_RG_CFG_NAPOT | addr;
1772 }
1773 
1784 {
1785  SMPCC->NS_RG[region_id].dw = SMPCC_NS_RG_CFG_DISABLE;
1786 }
1787 
1801 __STATIC_FORCEINLINE void SMPCC_SetPMONEventSelect(uint8_t idx, uint8_t client_id, uint8_t event)
1802 {
1803  SMPCC->SMP_PMON_SEL[idx].w = SMPCC_PMON_EVENT(event, client_id);
1804 }
1805 
1819 {
1820  return SMPCC->SMP_PMON_SEL[idx].w;
1821 }
1822 
1835 {
1836  return SMPCC->SMP_PMON_CNT[idx];
1837 }
1838 
1850 {
1851  SMPCC->SMP_PMON_CNT[idx] = 0;
1852 }
1853 
1862 {
1863  return SMPCC->CLIENT_ERR_ADDR[client_id];
1864 }
1865 
1873 __STATIC_FORCEINLINE void SMPCC_MaskClientCCacheWays(uint8_t client_id, uint32_t way_msk)
1874 {
1875  SMPCC->CLIENT_WAY_MASK[client_id].w = way_msk;
1876 }
1877 
1885 {
1886  return SMPCC->CC_ERR_INJ.b.inj_mode;
1887 }
1888 
1896 {
1897  SMPCC->CC_ERR_INJ.w = (SMPCC->CC_ERR_INJ.w & ~SMPCC_ERR_INJ_INJECCCODE_Msk) |
1898  _VAL2FLD(SMPCC_ERR_INJ_INJECCCODE, ecc_code);
1899 }
1900 
1901 #if defined(__CCM_PRESENT) && (__CCM_PRESENT == 1)
1913 __STATIC_FORCEINLINE void SMPCC_CCacheTramErrInject(uint32_t ecc_code, uint32_t *addr, uint16_t way)
1914 {
1915  if (IINFO_IsPreciseECCInjSupported()) {
1916  SMPCC->CC_ECC_INJ_ADDR = (unsigned long)addr;
1917  SMPCC->CC_ECC_INJ_WAY.b.num = way;
1918  SMPCC->CC_ECC_INJ_DATA = *addr;
1919  }
1920  SMPCC_SetECCCode(ecc_code);
1922  MInvalICacheLine((unsigned long)addr);
1923  MFlushInvalDCacheCCacheLine((unsigned long)addr);
1924  __RWMB();
1925  SMPCC->CC_ERR_INJ.b.inj_tag = SMPCC_ERR_INJ_INJTAG_ENABLE;
1926 
1927  if (IINFO_IsPreciseECCInjSupported()) {
1928  SMPCC->CC_ERR_INJ.b.cs = SMPCC_ERR_INJ_CS_START;
1929  /* Wait for the ECC injection to complete */
1930  while (SMPCC->CC_ERR_INJ.b.cs == SMPCC_ERR_INJ_CS_START);
1931  } else {
1932  MLockCCacheLine((unsigned long)addr);
1933  }
1934 
1935  SMPCC->CC_ERR_INJ.b.inj_tag = SMPCC_ERR_INJ_INJTAG_DISABLE;
1936  __RWMB(); // To ensure the ECC error injection is finished
1938  __RWMB(); // To ensure the ECC check is enabled
1939 }
1940 
1952 __STATIC_FORCEINLINE void SMPCC_CCacheDramErrInject(uint32_t ecc_code, uint32_t *addr, uint16_t way)
1953 {
1954  if (IINFO_IsPreciseECCInjSupported()) {
1955  SMPCC->CC_ECC_INJ_ADDR = (unsigned long)addr;
1956  SMPCC->CC_ECC_INJ_WAY.b.num = way;
1957  SMPCC->CC_ECC_INJ_DATA = *addr;
1958  }
1959  SMPCC_SetECCCode(ecc_code);
1961  MInvalICacheLine((unsigned long)addr);
1962  MFlushInvalDCacheCCacheLine((unsigned long)addr);
1963  __RWMB();
1964  SMPCC->CC_ERR_INJ.b.inj_data = SMPCC_ERR_INJ_INJDATA_ENABLE;
1965 
1966  if (IINFO_IsPreciseECCInjSupported()) {
1967  SMPCC->CC_ERR_INJ.b.cs = SMPCC_ERR_INJ_CS_START;
1968  /* Wait for the ECC injection to complete */
1969  while (SMPCC->CC_ERR_INJ.b.cs == SMPCC_ERR_INJ_CS_START);
1970  } else {
1971  MLockCCacheLine((unsigned long)addr);
1972  }
1973 
1974  SMPCC->CC_ERR_INJ.b.inj_data = SMPCC_ERR_INJ_INJDATA_DISABLE;
1975  __RWMB(); // To ensure the ECC error injection is finished
1977  __RWMB(); // To ensure the ECC check is enabled
1978 }
1979 
1988 __STATIC_FORCEINLINE void SMPCC_CLMErrInject(uint32_t ecc_code, uint32_t *addr)
1989 {
1990  if (IINFO_IsPreciseECCInjSupported()) {
1991  SMPCC->CC_ECC_INJ_ADDR = (unsigned long)addr;
1992  /* The way number should be one-hot, but not used for CLM error injection. */
1993  SMPCC->CC_ECC_INJ_WAY.b.num = 1;
1994  SMPCC->CC_ECC_INJ_DATA = *addr;
1995  }
1996  SMPCC_SetECCCode(ecc_code);
1998  MFlushInvalDCacheCCacheLine((unsigned long)addr);
1999  __RWMB();
2000  SMPCC->CC_ERR_INJ.b.inj_clm = SMPCC_ERR_INJ_INJCLM_ENABLE;
2001 
2002  if (IINFO_IsPreciseECCInjSupported()) {
2003  SMPCC->CC_ERR_INJ.b.cs = SMPCC_ERR_INJ_CS_START;
2004  /* Wait for the ECC injection to complete */
2005  while (SMPCC->CC_ERR_INJ.b.cs == SMPCC_ERR_INJ_CS_START);
2006  } else {
2007  MLockCCacheLine((unsigned long)addr);
2008  }
2009 
2010  SMPCC->CC_ERR_INJ.b.inj_clm = SMPCC_ERR_INJ_INJCLM_DISABLE;
2011  __RWMB(); // To ensure the ECC error injection is finished
2013  __RWMB(); // To ensure the ECC check is enabled
2014 }
2015 
2023 {
2025  MInvalICacheLine((unsigned long)addr);
2026  MFlushInvalDCacheCCacheLine((unsigned long)addr);
2027  MLockCCacheLine((unsigned long)addr);
2029 }
2030 #endif /* #if defined(__CCM_PRESENT) && (__CCM_PRESENT == 1) */
2031  /* End of Doxygen Group NMSIS_Core_SMPCC_Functions */
2033 #endif /* #if defined(__SMPCC_PRESENT) && (__SMPCC_PRESENT == 1) */
2034 
2035 #ifdef __cplusplus
2036 }
2037 #endif
2038 #endif /* __CORE_FEATURE_SMPCC_H__ */
__STATIC_INLINE unsigned long MLockCCacheLine(unsigned long addr)
Lock one Cluster Cache line specified by address in M-Mode.
#define __RWMB()
Read & Write Memory barrier.
#define __STATIC_FORCEINLINE
Define a static function that should be always inlined by the compiler.
Definition: nmsis_gcc.h:70
#define MFlushInvalDCacheCCacheLine(addr)
Flush and invalidate one D-Cache and Cluster Cache line specified by address in M-Mode.
__STATIC_INLINE void MInvalICacheLine(unsigned long addr)
Invalidate one I-Cache line specified by address in M-Mode.
#define _VAL2FLD(field, value)
Mask and shift a bit field value for use in a register bit range.
#define __IM
Defines 'read only' structure member permissions.
#define __IOM
Defines 'read/write' structure member permissions.
#define __IO
Defines 'read / write' permissions.
__STATIC_FORCEINLINE void SMPCC_DisableStreamReadCross4K(void)
Disable Stream Read Cross 4K Boundary.
__STATIC_FORCEINLINE void SMPCC_DisableStreamMergeNCRead(void)
Disable Stream Merge Non-Cacheable Read.
__STATIC_FORCEINLINE void SMPCC_LimitCCachePrefetchOutsNum(void)
Limit Cluster Cache Prefetch Outstanding Number.
__STATIC_FORCEINLINE void SMPCC_DisableCLMECCCheck(void)
Disable Cluster Local Memory ECC Check.
__STATIC_FORCEINLINE int32_t SMPCC_IsCCacheEnabled(void)
Get status of cluster cache.
__STATIC_FORCEINLINE void SMPCC_EnableCLMECC(void)
Enable Cluster Local Memory ECC.
__STATIC_FORCEINLINE uint32_t SMPCC_GetCCacheSetNum(void)
Get the number of cache sets.
__STATIC_FORCEINLINE void SMPCC_SetECCCode(uint32_t ecc_code)
Set ECC code for error injection.
__STATIC_FORCEINLINE uint8_t SMPCC_GetCoreNum(void)
Get the number of cores in the cluster.
__STATIC_FORCEINLINE void SMPCC_EnableStreamMergeNCRead(void)
Enable Stream Merge Non-Cacheable Read.
__STATIC_FORCEINLINE void SMPCC_SetSTMControl(uint32_t val)
Set Stream Control Register.
__STATIC_FORCEINLINE void SMPCC_EnableStreamRead(void)
Enable Stream Read.
__STATIC_FORCEINLINE void SMPCC_MaskClientCCacheWays(uint8_t client_id, uint32_t way_msk)
Mask Client Cluster Cache Ways.
__STATIC_FORCEINLINE void SMPCC_EnableCLMECCExcp(void)
Enable Cluster Local Memory ECC Exception.
__STATIC_FORCEINLINE uint8_t SMPCC_GetIOCPNum(void)
Get the number of IO coherency ports.
__STATIC_FORCEINLINE void SMPCC_EnableL1PrefetchShareCacheline(void)
Enable L1 Prefetch to Snoop and Share Cacheline.
__STATIC_FORCEINLINE int32_t SMPCC_IsXorErrorInjectMode(void)
Check if ECC error injection mode is XOR mode.
__STATIC_FORCEINLINE uint8_t SMPCC_IsCCacheSupportECC(void)
Check if cluster cache supports ECC.
__STATIC_FORCEINLINE void SMPCC_ClearBusErrPending(void)
Clear Bus Error Pending Status.
__STATIC_FORCEINLINE void SMPCC_SetCLMAllWays(uint64_t addr)
Set Cluster Local Memory to use all ways.
__STATIC_FORCEINLINE void SMPCC_DisableCCacheECCExcp(void)
Disable Cluster Cache ECC Exception.
__STATIC_FORCEINLINE void SMPCC_EnableUModeCmd(void)
Enable User Mode Commands.
__STATIC_FORCEINLINE void SMPCC_EnableStreamTransAlloc(void)
Enable Stream Translate Allocate.
__STATIC_FORCEINLINE uint16_t SMPCC_GetFatalErrCntThreshold(void)
Get Fatal Error Count Threshold.
__STATIC_FORCEINLINE void SMPCC_DisableCCacheECC(void)
Disable Cluster Cache ECC.
__STATIC_FORCEINLINE void SMPCC_DisableCLMECC(void)
Disable Cluster Local Memory ECC.
__STATIC_FORCEINLINE uint8_t SMPCC_IsAnySnoopPending(uint32_t client_msk)
Check if any client is being snooped.
__STATIC_FORCEINLINE uint32_t SMPCC_GetCCacheWayNum(void)
Get the number of cache ways.
__STATIC_FORCEINLINE void SMPCC_DisableCCachePrefetchNoWb(void)
Disable Cluster Cache Prefetch to Avoid Write Back.
__STATIC_FORCEINLINE SMP_VER_Type SMPCC_GetVersion(void)
Get the SMP version number.
__STATIC_FORCEINLINE void SMPCC_EnableCCacheECCCheck(void)
Enable Cluster Cache ECC Check.
__STATIC_FORCEINLINE void SMPCC_SetPMONEventSelect(uint8_t idx, uint8_t client_id, uint8_t event)
Set Performance Monitor Event Selection.
__STATIC_FORCEINLINE void SMPCC_DisableCCache(void)
Disable cluster cache.
__STATIC_FORCEINLINE void SMPCC_EnableCCacheECC(void)
Enable Cluster Cache ECC.
__STATIC_FORCEINLINE void SMPCC_DisableL1PrefetchShareCacheline(void)
Disable L1 Prefetch to Snoop and Share Cacheline.
__STATIC_FORCEINLINE void SMPCC_SetRecvErrCntThreshold(uint16_t threshold)
Set Recoverable Error Count Threshold.
__STATIC_FORCEINLINE void SMPCC_EnableCLMECCCheck(void)
Enable Cluster Local Memory ECC Check.
__STATIC_FORCEINLINE void SMPCC_DisableStreamRead(void)
Disable Stream Read.
__STATIC_FORCEINLINE void SMPCC_CCacheDramErrInject(uint32_t ecc_code, uint32_t *addr, uint16_t way)
Inject ECC error to cluster cache data RAM.
__STATIC_FORCEINLINE void SMPCC_EnableSnoop(uint16_t client_msk)
Enable snoop for specific clients.
__STATIC_FORCEINLINE void SMPCC_DisableRecvErrIrq(void)
Disable Recoverable Error Interrupt.
__STATIC_FORCEINLINE void SMPCC_ClearRecvErrCount(void)
Clear Recoverable Error Count.
__STATIC_FORCEINLINE void SMPCC_EnableCCache(void)
Enable cluster cache.
__STATIC_FORCEINLINE void SMPCC_DisableBusErrIrq(void)
Disable Bus Error Interrupt.
__STATIC_FORCEINLINE void SMPCC_DisableStreamTransAlloc(void)
Disable Stream Translate Allocate.
__STATIC_FORCEINLINE void SMPCC_DisableCCacheECCCheck(void)
Disable Cluster Cache ECC Check.
__STATIC_FORCEINLINE void SMPCC_SetCLMNWays(uint64_t addr, uint32_t way_msk)
Set Cluster Local Memory to use specific ways.
__STATIC_FORCEINLINE uint8_t SMPCC_IsCCachePresent(void)
Check if cluster cache is present.
__STATIC_FORCEINLINE uint32_t SMPCC_GetClientErrStatus(uint8_t client_id)
Get Client Error Status.
__STATIC_FORCEINLINE void SMPCC_SetNSRegionNAPOT(uint8_t region_id, uint64_t addr)
Set Non-Shareable Region to NAPOT.
__STATIC_FORCEINLINE uint8_t SMPCC_GetPMONNum(void)
Get the number of performance monitors.
__STATIC_FORCEINLINE void SMPCC_DisableSModeCmd(void)
Disable Supervisor Mode Commands.
__STATIC_FORCEINLINE void SMPCC_DisableUModeCmd(void)
Disable User Mode Commands.
__STATIC_FORCEINLINE void SMPCC_CCacheTramErrInject(uint32_t ecc_code, uint32_t *addr, uint16_t way)
Inject ECC error to cluster cache tag RAM.
__STATIC_FORCEINLINE void SMPCC_UnlimitCCachePrefetchOutsNum(void)
Unlimit Cluster Cache Prefetch Outstanding Number.
__STATIC_FORCEINLINE void SMPCC_DisableStreamWrite(void)
Disable Stream Write.
__STATIC_FORCEINLINE void SMPCC_EnableRecvErrIrq(void)
Enable Recoverable Error Interrupt.
__STATIC_FORCEINLINE uint32_t SMPCC_GetFatalErrCount(void)
Get Fatal Error Count.
__STATIC_FORCEINLINE uint32_t SMPCC_GetPMONEventSelect(uint8_t idx)
Get Performance Monitor Event Selection.
__STATIC_FORCEINLINE void SMPCC_EnableCCacheECCExcp(void)
Enable Cluster Cache ECC Exception.
__STATIC_FORCEINLINE void SMPCC_EnableICacheSnoopDCache(void)
Enable ICache to Snoop DCache.
__STATIC_FORCEINLINE void SMPCC_EnableFatalErrIrq(void)
Enable Fatal Error Interrupt.
__STATIC_FORCEINLINE void SMPCC_CCacheErrRestore(void *addr)
Restore cluster cache after error injection.
__STATIC_FORCEINLINE void SMPCC_ClearPMONCount(uint8_t idx)
Clear Performance Monitor Count.
__STATIC_FORCEINLINE uint32_t SMPCC_GetSTMControl(void)
Get Stream Control Register Value.
__STATIC_FORCEINLINE void SMPCC_SetNSRegionNACL(uint8_t region_id, uint64_t addr)
Set Non-Shareable Region to NACL.
__STATIC_FORCEINLINE void SMPCC_DisableICacheSnoopDCache(void)
Disable ICache to Snoop DCache.
__STATIC_FORCEINLINE uint16_t SMPCC_GetRecvErrCntThreshold(void)
Get Recoverable Error Count Threshold.
__STATIC_FORCEINLINE void SMPCC_SetFatalErrCntThreshold(uint16_t threshold)
Set Fatal Error Count Threshold.
__STATIC_FORCEINLINE void SMPCC_SetCCacheControl(uint32_t val)
Set Cluster Cache Control register.
__STATIC_FORCEINLINE uint8_t SMPCC_IsAnyTransactionPending(uint32_t client_msk)
Check if any transaction is pending for clients.
__STATIC_FORCEINLINE void SMPCC_EnableCCacheEarlyPrefetch(void)
Enable Cluster Cache Early Prefetch.
__STATIC_FORCEINLINE void SMPCC_LockECCErrInjection(void)
Lock ECC Error Injection Register.
__STATIC_FORCEINLINE void SMPCC_LockECCConfig(void)
Lock ECC Configuration.
__STATIC_FORCEINLINE uint32_t SMPCC_GetRecvErrCount(void)
Get Recoverable Error Count.
__STATIC_FORCEINLINE void SMPCC_DisableCLMECCExcp(void)
Disable Cluster Local Memory ECC Exception.
__STATIC_FORCEINLINE void SMPCC_EnableStreamReadCross4K(void)
Enable Stream Read Cross 4K Boundary.
__STATIC_FORCEINLINE void SMPCC_DisableSnoop(uint16_t client_msk)
Disable snoop for specific clients.
__STATIC_FORCEINLINE void SMPCC_SetCLMNoWay(void)
Configure Cluster Local Memory to use no ways.
__STATIC_FORCEINLINE void SMPCC_DisableNSRegion(uint8_t region_id)
Disable Non-Shareable Region.
__STATIC_FORCEINLINE uint64_t SMPCC_GetClientErrAddr(uint8_t client_id)
Get Client Error Address.
__STATIC_FORCEINLINE void SMPCC_DisableFatalErrIrq(void)
Disable Fatal Error Interrupt.
__STATIC_FORCEINLINE void SMPCC_EnableSModeCmd(void)
Enable Supervisor Mode Commands.
__STATIC_FORCEINLINE void SMPCC_DisableCCacheEarlyPrefetch(void)
Disable Cluster Cache Early Prefetch.
__STATIC_FORCEINLINE uint64_t SMPCC_GetPMONCount(uint8_t idx)
Get Performance Monitor Count.
__STATIC_FORCEINLINE void SMPCC_EnableStreamWrite(void)
Enable Stream Write.
__STATIC_FORCEINLINE void SMPCC_EnableBusErrIrq(void)
Enable Bus Error Interrupt.
__STATIC_FORCEINLINE uint8_t SMPCC_GetCCacheLineSize(void)
Get the cache line size.
__STATIC_FORCEINLINE uint32_t SMPCC_GetCCacheControl(void)
Get Cluster Cache Control register value.
__STATIC_FORCEINLINE void SMPCC_EnableCCachePrefetchNoWb(void)
Enable Cluster Cache Prefetch to Avoid Write Back.
__STATIC_FORCEINLINE void SMPCC_CLMErrInject(uint32_t ecc_code, uint32_t *addr)
Inject ECC error to CLM (Cluster Local Memory)
__STATIC_FORCEINLINE void SMPCC_ClearFatalErrCount(void)
Clear Fatal Error Count.
#define SMPCC_CTRL_I_SNOOP_D_EN_DISABLE
SMPCC CC_CTRL I_SNOOP_D_EN Disable.
#define SMPCC_ERR_INJ_INJECCCODE_Msk
SMPCC CC_ERR_INJ INJECCCODE Mask.
#define SMPCC_NS_RG_CFG_DISABLE
SMPCC Non-Shareable Region CFG DISABLE.
#define SMPCC_CTRL_CC_ECC_EN_ENABLE
SMPCC CC_CTRL CC_ECC_EN Enable.
#define SMPCC_CTRL_CLM_ECC_CHK_EN_DISABLE
SMPCC CC_CTRL CLM_ECC_CHK_EN Disable.
#define SMPCC_CTRL_CC_ECC_EXCP_EN_DISABLE
SMPCC CC_CTRL ECC_EXCP_EN Disable.
#define SMPCC_CTRL_PF_NO_WB_ENABLE
SMPCC CC_CTRL PF_NO_WB Enable.
#define SMPCC_CTRL_CLM_EXCP_EN_ENABLE
SMPCC CC_CTRL CLM_EXCP_EN Enable.
#define SMPCC_ERR_INJ_CS_START
SMPCC CC_ERR_INJ CS Start.
__IO uint32_t CC_ECC_INJ_DATA_Type
Type to access CC_ECC_INJ_DATA register.
__IO uint64_t CLIENT_ERR_ADDR_Type
Type to access CLIENT_ERR_ADDR register.
#define SMPCC_ERR_INJ_INJDATA_ENABLE
SMPCC CC_ERR_INJ INJDATA Enable.
#define SMPCC_CTRL_LOCK_ECC_CFG_LOCK
SMPCC CC_CTRL LOCK_ECC_CFG Lock.
#define SMPCC_CTRL_FATAL_ERR_IRQ_EN_ENABLE
SMPCC CC_CTRL FATAL_ERR_IRQ_EN Enable.
#define SMPCC_CTRL_CLM_EXCP_EN_DISABLE
SMPCC CC_CTRL CLM_EXCP_EN Disable.
#define SMPCC_CTRL_RECV_ERR_IRQ_EN_ENABLE
SMPCC CC_CTRL RECV_ERR_IRQ_EN Enable.
#define SMPCC_CTRL_CLM_ECC_EN_DISABLE
SMPCC CC_CTRL CLM_ECC_EN Disable.
#define SMPCC_CTRL_PF_NO_WB_DISABLE
SMPCC CC_CTRL PF_NO_WB Disable.
#define SMPCC_CTRL_CC_ECC_EXCP_EN_ENABLE
SMPCC CC_CTRL ECC_EXCP_EN Enable.
#define SMPCC_CTRL_CC_ECC_EN_DISABLE
SMPCC CC_CTRL CC_ECC_EN Disable.
#define SMPCC_STMCTRL_WR_STM_EN_DISABLE
SMPCC WRITE Stream Enable Disable.
#define SMPCC_CTRL_PF_L2_EARLY_EN_DISABLE
SMPCC CC_CTRL PF_L2_EARLY_EN Disable.
#define SMPCC_STMCTRL_CROSS_EN_DISABLE
SMPCC READ STREAM CROSS 4K Disable.
#define SMPCC_CTRL_USE_CMD_EN_ENABLE
SMPCC CC_CTRL USE_CMD_EN Enable.
#define SMPCC_CTRL_SUP_CMD_EN_ENABLE
SMPCC CC_CTRL SUP_CMD_EN Enable.
#define SMPCC_STMCTRL_CROSS_EN_ENABLE
SMPCC READ STREAM CROSS 4K Enable.
#define SMPCC_CTRL_PF_L2_EARLY_EN_ENABLE
SMPCC CC_CTRL PF_L2_EARLY_EN Enable.
#define SMPCC_CTRL_PF_BIU_OUTS_EN_ENABLE
SMPCC CC_CTRL PF_BIU_OUTS_EN Enable.
__IO uint64_t SMP_PMON_CNT_Type
Type to access SMP_PMON_CNT register.
#define SMPCC_CTRL_PF_SH_CL_EN_DISABLE
SMPCC CC_CTRL PF_SH_CL_EN Disable.
#define SMPCC_CTRL_ECC_CHK_EN_ENABLE
SMPCC CC_CTRL ECC_CHK_EN Enable.
#define SMPCC_CTRL_CLM_ECC_CHK_EN_ENABLE
SMPCC CC_CTRL CLM_ECC_CHK_EN Enable.
__IO uint64_t CC_ECC_INJ_ADDR_Type
Type to access CC_ECC_INJ_ADDR register.
#define SMPCC_NS_RG_CFG_NAPOT
SMPCC Non-Shareable Region CFG NAPOT.
#define SMPCC_CTRL_FATAL_ERR_IRQ_EN_DISABLE
SMPCC CC_CTRL FATAL_ERR_IRQ_EN Disable.
#define SMPCC_PMON_EVENT(event, client)
#define SMPCC_STMCTRL_TRANS_ALLOC_ENABLE
SMPCC TRANSLATE ALLOC ATTRIBUTE Enable.
#define SMPCC_STMCTRL_RD_MERGE_EN_DISABLE
SMPCC READ Merge Enable Disable.
#define SMPCC_CTRL_PF_SH_CL_EN_ENABLE
SMPCC CC_CTRL PF_SH_CL_EN Enable.
#define SMPCC_STMCTRL_RD_STM_EN_ENABLE
SMPCC READ Stream Enable Enable.
#define SMPCC_CTRL_BUS_ERR_IRQ_EN_ENABLE
SMPCC CC_CTRL BUS_ERR_IRQ_EN Enable.
#define SMPCC_CTRL_I_SNOOP_D_EN_ENABLE
SMPCC CC_CTRL I_SNOOP_D_EN Enable.
__IO uint64_t CC_INV_RANGE_START_Type
Type to access CC_INV_RANGE_START register.
#define SMPCC_STMCTRL_TRANS_ALLOC_DISABLE
SMPCC TRANSLATE ALLOC ATTRIBUTE Disable.
#define SMPCC_CTRL_LOCK_ECC_ERR_INJ_LOCK
SMPCC CC_CTRL LOCK_ECC_ERR_INJ Lock.
#define SMPCC_CTRL_CLM_ECC_EN_ENABLE
SMPCC CC_CTRL CLM_ECC_EN Enable.
#define SMPCC_STMCTRL_WR_STM_EN_ENABLE
SMPCC WRITE Stream Enable Enable.
#define SMPCC_NS_RG_CFG_NACL
SMPCC Non-Shareable Region CFG NACL.
#define SMPCC_ERR_INJ_INJTAG_DISABLE
SMPCC CC_ERR_INJ INJTAG Disable.
#define SMPCC_STMCTRL_RD_STM_EN_DISABLE
SMPCC READ Stream Enable Disable.
#define SMPCC_CTRL_RECV_ERR_IRQ_EN_DISABLE
SMPCC CC_CTRL RECV_ERR_IRQ_EN Disable.
#define SMPCC_CTRL_USE_CMD_EN_DISABLE
SMPCC CC_CTRL USE_CMD_EN Disable.
#define SMPCC_ERR_INJ_INJCLM_ENABLE
SMPCC CC_ERR_INJ INJCLM Enable.
__IO uint64_t CC_BUS_ERR_ADDR_Type
Type to access CC_BUS_ERR_ADDR register.
#define SMPCC_CTRL_ECC_CHK_EN_DISABLE
SMPCC CC_CTRL ECC_CHK_EN Disable.
#define SMPCC_ERR_INJ_INJDATA_DISABLE
SMPCC CC_ERR_INJ INJDATA Disable.
#define SMPCC_CTRL_CC_EN_DISABLE
SMPCC CC_CTRL CC_EN Disable.
#define SMPCC_CTRL_SUP_CMD_EN_DISABLE
SMPCC CC_CTRL SUP_CMD_EN Disable.
#define SMPCC_CTRL_PF_BIU_OUTS_EN_DISABLE
SMPCC CC_CTRL PF_BIU_OUTS_EN Disable.
#define SMPCC_CTRL_BUS_ERR_IRQ_EN_DISABLE
SMPCC CC_CTRL BUS_ERR_IRQ_EN Disable.
#define SMPCC_ERR_INJ_INJTAG_ENABLE
SMPCC CC_ERR_INJ INJTAG Enable.
#define SMPCC_CTRL_CC_EN_ENABLE
SMPCC CC_CTRL CC_EN Enable.
#define SMPCC_STMCTRL_RD_MERGE_EN_ENABLE
SMPCC READ Merge Enable Enable.
__IO uint64_t CC_INV_RANGE_END_Type
Type to access CC_INV_RANGE_END register.
#define SMPCC_ERR_INJ_INJCLM_DISABLE
SMPCC CC_ERR_INJ INJCLM Disable.
#define SMPCC
SMPCC configuration struct.
Access to the structure of SMPCC Memory Map.
__IOM CLM_ADDR_BASE_Type CLM_ADDR_BASE
Offset: 0x0D0 (R/W) Cluster Local Memory base address.
__IM SNOOP_PENDING_Type SNOOP_PENDING
Offset: 0x0C8 (R) indicate the core is being snooped or not in SCU.
__IOM uint32_t CLM_WAY_EN
Offset: 0x0D8 (R/W) CC way enable register.
__IM TRANS_PENDING_Type TRANS_PENDING
Offset: 0x0CC (R) indicate the core's transaction is finished or not in the SCU.
__IOM CC_ECC_INJ_DATA_Type CC_ECC_INJ_DATA
Offset: 0x74C (R/W) Cluster Cache ECC inject data register, repeate to fill a cache line.
__IOM ECC_ERR_MSK_Type ECC_ERR_MSK
Offset: 0x0F0 (R/W) Mask L2M ECC Error register.
__IOM CC_CMD_Type CC_uCMD
Offset: 0x0C4 (R/W) user mode CC command and status register.
__IOM CC_CMD_Type CC_sCMD
Offset: 0x0C0 (R/W) supervisor mode CC command and status register.
__IOM CC_RECV_CNT_Type CC_RECV_CNT
Offset: 0x01C (R/W) CC ECC recoverable error count register.
__IOM CC_BUS_ERR_ADDR_Type CC_BUS_ERR_ADDR
Offset: 0x02C (R/W) CC bus error address register.
__IOM DFF_PROT_Type DFF_PROT
Offset: 0x0EC (R/W) Hardware Register protect Enable register.
__IOM CC_CMD_Type CC_mCMD
Offset: 0x014 (R/W) machine mode CC command and status register.
__IOM CC_ERR_INJ_Type CC_ERR_INJ
Offset: 0x018 (R/W) CC ECC error injection control register.
const SMP_VER_Type SMP_VER
Offset: 0x000 (R) SMP version register.
__IM CC_CFG_Type CC_CFG
Offset: 0x008 (R) CC config register.
__IOM CC_ECC_INJ_ADDR_Type CC_ECC_INJ_ADDR
Offset: 0x744 (R/W) Cluster Cache ECC inject address regsiter.
__IOM STM_CTRL_Type STM_CTRL
Offset: 0x0E0 (R/W) Stream read/write control register.
__IOM CC_FATAL_CNT_Type CC_FATAL_CNT
Offset: 0x020 (R/W) CC ECC fatal error count register.
__IOM CC_INV_RANGE_END_Type CC_INV_RANGE_END
Offset: 0x72C (R/W) Cluster Cache invalid range end address register.
__IM SMP_CFG_Type SMP_CFG
Offset: 0x004 (R) SMP Configuration register.
__IOM CC_ECC_INJ_WAY_Type CC_ECC_INJ_WAY
Offset: 0x740 (R/W) Cluster Cache ECC inject way register.
__IOM CC_RECV_THV_Type CC_RECV_THV
Offset: 0x024 (R/W) CC ECC recoverable error threshold register.
__IOM STM_TIMEOUT_Type STM_TIMEOUT
Offset: 0x0E8 (R/W) Stream read/write timeout register.
__IOM CC_FATAL_THV_Type CC_FATAL_THV
Offset: 0x028 (R/W) CC ECC fatal error threshold register.
__IOM CC_INVALID_ALL_Type CC_INVALID_ALL
Offset: 0x0DC (R/W) CC invalidate all register.
__IOM IOCP_ATTR_RMP_Type IOCP_ATTR_RMP
Offset: 0x750 (R/W) IOCP attribute remap register.
__IOM STM_CFG_Type STM_CFG
Offset: 0x0E4 (R/W) Stream read/write configuration register.
__IOM CC_INV_RANGE_Type CC_INV_RANGE
Offset: 0x720 (R/W) Cluster Cache invalid rage register.
__IOM CC_CTRL_Type CC_CTRL
Offset: 0x010 (R/W) CC control register.
__IOM CC_INV_RANGE_START_Type CC_INV_RANGE_START
Offset: 0x724 (R/W) Cluster Cache invalid range start address register.
__IOM SMP_ENB_Type SMP_ENB
Offset: 0x00C (R/W) SMP enable register.
Union type to access CC_CFG information register.
__IM uint32_t cc_tcycle
bit: 12..14 L2 tag ram access cycle = cc_tcycle + 1
__IM uint32_t cc_dcycle
bit: 15..17 L2 Data sram access cycle = cc_dcycle + 1
__IM uint32_t cc_ecc
bit: 11 cluster cache ECC supports ECC or not
__IM uint32_t cc_lsize
bit: 8..10 cluster cache line size = 2^(cc_lsize + 2)
__IM uint32_t cc_set
bit: 0..3 cluster cache set number = 2^(cc_set)
uint32_t w
Type used for word access.
__IM uint32_t _reserved
bit: 18..31 reserved
__IM uint32_t cc_way
bit: 4..7 cluster cache way number = cc_way + 1
Union type to access CC_CMD register.
__IM uint32_t _reserved
bit: 5..22 reserved
__IOM uint32_t feisc
bit: 24 fatal error interrupt status, write 1 to clean
__IM uint32_t complete
bit: 31 completion status
uint32_t w
Type used for word access.
__IOM uint32_t besc
bit: 25 bus error status, write 1 to clean
__IOM uint32_t cmd
bit: 0..4 cluster cache maintain command code
__IM uint32_t result_code
bit: 26..30 result code
__IOM uint32_t reisc
bit: 23 recoverable error interrupt status, write 1 to clean
Union type to access CC_CTRL configure register.
__IOM uint32_t use_cmd_en
bit: 10 enable U mode can operate register CC_uCMD and SMP_PMON_SEL
__IOM uint32_t clm_ecc_en
bit: 12 clm ecc enable bit
__IOM uint32_t early_wr_err
bit: 20 early write response has error
__IOM uint32_t iocc_err
bit: 19 iocc has error
__IOM uint32_t pf_sh_cl_en
bit: 15 enable L1 prefetch to snoop and share cacheline from other cores
__IOM uint32_t ecc_chk_en
bit: 11 cc ecc check enable bit
__IOM uint32_t pf_l2_early_en
bit: 16 enable L2 prefetch to initialize external bus read access while lookup the cluster cache
__IOM uint32_t cc_ecc_en
bit: 1 cluster cache ECC enable bit
__IOM uint32_t clm_ecc_chk_en
bit: 14 clm ecc check enable bit
uint32_t w
Type used for word access.
__IOM uint32_t bus_err_pend
bit: 7 indicate if there is bus error pending
__IOM uint32_t lock_ecc_err_inj
bit: 4 lock cc ecc error injection register
__IOM uint32_t recv_err_irq_en
bit: 5 enable the interrupt when recoverable error count exceeds the threshold
__IOM uint32_t cc_en
bit: 0 cluster cache enable bit
__IOM uint32_t pf_biu_outs_en
bit: 17 enable the limit of outstanding L2 prefetch to the number of L2 prefetch line-buffer
__IOM uint32_t clm_excp_en
bit: 13 clm ecc exception enable bit
__IOM uint32_t pf_no_wb
bit: 21 enable L2 prefetch to abort and avoid dirty cacheline write back when filling the cluster cac...
__IOM uint32_t lock_ecc_cfg
bit: 3 lock the cc ecc configuration bit
__IOM uint32_t ecc_excp_en
bit: 2 cluster cache ECC exception enable bit
__IM uint32_t _reserved
bit: 22..31 reserved
__IOM uint32_t fatal_err_irq_en
bit: 6 enable the interrupt when fatal error count exceeds the threshold
__IOM uint32_t i_snoop_d_en
bit: 18 snoop to dcache for icache refill reads enable
__IOM uint32_t sup_cmd_en
bit: 9 enable S mode can operate register CC_sCMD and SMP_PMON_SEL
__IOM uint32_t bus_err_irq_en
bit: 8 enable the buss error interrupt of cc maintain operation
Union type to access CC_ECC_INJ_WAY register.
__IOM uint32_t num
bit: 0..15 Set precise ecc inject way number, one-hot
__IM uint32_t _reserved
bit: 16..31 reserved
uint32_t w
Type used for word access.
Union type to access CC_ERR_INJ register.
__IM uint32_t _reserved0
bit: 5..23 reserved
__IOM uint32_t inj_clm
bit: 2 ECC error injection to clm ram
__IOM uint32_t cs
bit: 4 Precise injection error control and status.
__IOM uint32_t inj_mode
bit: 3 ECC error injection mode: 0-direct write mode, 1-xor write mode
uint32_t w
Type used for word access.
__IM uint32_t inj_ecc_code
24..32 ECC code for injection
__IOM uint32_t inj_data
bit: 0 ECC error injection to data ram
__IOM uint32_t inj_tag
bit: 1 ECC error injection to tag ram
Union type to access CC_FATAL_CNT register.
__IOM uint32_t cnt
bit: 0..15 count of the fatal error
__IM uint32_t _reserved
bit: 16..31 reserved
uint32_t w
Type used for word access.
Union type to access CC_FATAL_THV register.
uint32_t w
Type used for word access.
__IM uint32_t _reserved
bit: 16..31 reserved
__IOM uint32_t cnt
bit: 0..15 count of the fatal error threshold value
Union type to access CC_INVALID_ALL register.
__IM uint32_t _reserved
bit: 1..31 reserved
__IOM uint32_t cs
bit: 0 write 1 to invalid all cluster cache, and hardware auto clean when operation is done
uint32_t w
Type used for word access.
Union type to access CC_INV_RANGE register.
__IM uint32_t _reserved
bit: 1..31 reserved
__IOM uint32_t cs
bit: 0 Set cs can enable inv range, it clear by hardware
uint32_t w
Type used for word access.
Union type to access CC_RECV_CNT register.
uint32_t w
Type used for word access.
__IOM uint32_t cnt
bit: 0..15 count of the recoverable error
__IM uint32_t _reserved
bit: 16..31 reserved
Union type to access CC_RECV_THV register.
__IOM uint32_t cnt
bit: 0..15 count of the recoverable error threshold value
__IM uint32_t _reserved
bit: 16..31 reserved
uint32_t w
Type used for word access.
Union type to access CLIENT_ERR_STATUS register.
__IOM uint32_t write_bus_err
bit: 1 write bus error
__IOM uint32_t cc_scu_ecc_err
bit: 2 cc scu ecc error
uint32_t w
Type used for word access.
__IOM uint32_t iocp_bus_err
bit: 3 iocp bus error
__IOM uint32_t read_bus_err
bit: 0 read bus error
__IM uint32_t _reserved
bit: 4..31 reserved
Union type to access CLIENT_WAY_MASK register.
__IOM uint32_t mask
bit: 0..15 mask this way for the client
__IM uint32_t _reserved
bit: 16..31 reserved
uint32_t w
Type used for word access.
Union type to access CLM_ADDR_BASE register.
uint64_t clm_base64
Type used access whole 64-bits.
__IOM uint32_t clm_base32
Union type to access CLM_WAY_EN register.
uint32_t w
Type used for word access.
__IM uint32_t _reserved
bit: 16..31 reserved
__IOM uint32_t ena
bit: 0..15 This way is used as CLM or not
Union type to access DFF_PROT register.
__IM uint32_t _reserved
bit: 2..31 reserved
uint32_t w
Type used for word access.
__IOM uint32_t chk_en
bit: 0..1 register protect check enable.
Union type to access ECC_ERR_MSK register.
__IM uint32_t _reserved
bit: 2..31 reserved
uint32_t w
Type used for word access.
__IOM uint32_t cc_core_err_mask
bit: 1 mask core double bit error output
__IOM uint32_t cc_l2_err_msk
bit: 0 mask L2 double bit error output
Union type to access IOCP_ATTR_RMP register.
__IOM uint32_t rd_attri
bit: 3 Remap allocate and non-alloc.
__IOM uint32_t wr_rmp_en
bit: 0 Set write trans attribute remap enable
__IM uint32_t _reserved
bit: 4..31 reserved
uint32_t w
Type used for word access.
__IOM uint32_t wr_attri
bit: 1 Remap allocate and non-alloc.
__IOM uint32_t rd_rmp_en
bit: 2 Set read trans attribute remap enable
Union type to access NS_RG register.
__IOM uint64_t cfg
bit: 0..1 0x00: disable region; 0x10:NACL; 0x11: NAPOT
__IOM uint64_t dw
Type used for double word access.
__IOM uint64_t addr_hi
bit: 2..63 address of the region
Union type to access SMP_CFG information register.
__IM uint32_t iocp_num
bit: 7..12 IO coherency port number in the cluster
__IM uint32_t cc_present
bit: 0 cluster cache present or not
__IM uint32_t w
Type used for word access.
__IM uint32_t pmon_num
bit: 13..18 performance monitor number in the cluster
__IM uint32_t smp_core_num
bit: 1..6 core number in cluster
__IM uint32_t _reserved
bit: 19..31 reserved
Union type to access SMP_ENB configure register.
__IOM uint32_t smp_enable
bit: 0..15 SMP enable bits for clients in cluster
__IM uint32_t _reserved
bit: 16..31 reserved
uint32_t w
Type used for word access.
Union type to access SMP_PMON_SEL register.
__IOM uint32_t event_sel
bit: 0..15 select the event for this performance monitor counter
__IM uint32_t _reserved
bit: 21..31 reserved
uint32_t w
Type used for word access.
__IOM uint32_t client_sel
bit: 16..20 specify the core in the cluster or external master number hooked to I/O coherency port
Union type to access SMP_VER information register.
__IM uint32_t w
Type used for word access.
__IM uint32_t min_ver
bit: 8..15 minor version number
__IM uint32_t _reserved
bit: 24..31 reserved
__IM uint32_t maj_ver
bit: 16..23 major version number
__IM uint32_t mic_ver
bit: 0..7 micro version number
Union type to access SNOOP_PENDING register.
__IM uint32_t _reserved
bit: 16..31 reserved
__IM uint32_t w
Type used for word access.
__IM uint32_t snoop_pending
bit: 0..15 snoop pending bit for each client
Union type to access STM_CFG register.
__IM uint32_t _reserved3
bit: 30..31 reserved
__IOM uint32_t rd_byte_threshold
bit: 0..9 the prefetch number for read stream
__IOM uint32_t wr_byte_threshold
bit: 20..29 the line buffer timeout free time when no same cacheline transactions
__IM uint32_t _reserved0
bit: 10..11 reserved
__IOM uint32_t rd_degree
bit: 12..14 the delta between prefetch address and current bus address
uint32_t w
Type used for word access.
__IOM uint32_t rd_distance
bit: 16..18 the threshold bytes matching write stream training successfully
__IM uint32_t _reserved2
bit: 19 reserved
__IM uint32_t _reserved1
bit: 15 reserved
Union type to access STM_CTRL register.
__IOM uint32_t cross_en
bit: 4 read stream cross 4k enable
__IOM uint32_t trans_alloc
bit: 2 translate allocate attribute to non-alloc attribute enable
__IOM uint32_t rd_merge_en
bit: 3 non-cacheable attribute read merge enable
__IOM uint32_t rd_stm_en
bit: 0 read stream enable
__IM uint32_t _reserved
bit: 5..31 reserved
__IOM uint32_t wr_stm_en
bit: 1 write stream enable
uint32_t w
Type used for word access.
Union type to access STM_TIMEOUT register.
__IOM uint32_t timeout
bit: 0..10 write streaming wait clk num
__IM uint32_t _reserved
bit: 11..31 reserved
uint32_t w
Type used for word access.
Union type to access TRANS_PENDING register.
__IM uint32_t _reserved
bit: 16..30 reserved
__IM uint32_t trans_pending
bit: 0..15 transaction pending bit for each client
__IM uint32_t ext_trans
bit: 31 external memory bus transaction pending
__IM uint32_t w
Type used for word access.