|
AM243x MCU+ SDK
10.00.00
|
|
Go to the documentation of this file.
47 #ifndef INCLUDE_SDL_ECC_H_
48 #define INCLUDE_SDL_ECC_H_
55 #if defined(SOC_AM263X)
58 #if defined(SOC_AM263PX) || defined(SOC_AM261X)
59 #include <sdl/esm/v2/sdl_esm.h>
61 #if defined(SOC_AM273X) || defined(SOC_AWR294X)
62 #include <sdl/esm/v1/sdl_esm.h>
64 #if defined(SOC_AM64X) || defined(SOC_AM243X)
77 #if defined(SOC_AM263X) || defined(SOC_AM263PX) || defined(SOC_AM261X)
79 #define SDL_SOC_ECC_AGGR (0U)
80 #define SDL_R5FSS0_CORE0_ECC_AGGR (1U)
81 #define SDL_R5FSS0_CORE1_ECC_AGGR (2U)
82 #define SDL_R5FSS1_CORE0_ECC_AGGR (3U)
83 #define SDL_R5FSS1_CORE1_ECC_AGGR (4U)
84 #define SDL_HSM_ECC_AGGR (5U)
85 #define SDL_ICSSM_ICSS_G_CORE_BORG_ECC_AGGR (6U)
86 #define SDL_MCAN0_MCANSS_MSGMEM_WRAP_ECC_AGGR (7U)
87 #define SDL_MCAN1_MCANSS_MSGMEM_WRAP_ECC_AGGR (8U)
88 #if defined(SOC_AM263X) || defined(SOC_AM263PX)
89 #define SDL_MCAN2_MCANSS_MSGMEM_WRAP_ECC_AGGR (9U)
90 #define SDL_MCAN3_MCANSS_MSGMEM_WRAP_ECC_AGGR (10U)
92 #if defined(SOC_AM263PX)
93 #define SDL_MCAN4_MCANSS_MSGMEM_WRAP_ECC_AGGR (11U)
94 #define SDL_MCAN5_MCANSS_MSGMEM_WRAP_ECC_AGGR (12U)
95 #define SDL_MCAN6_MCANSS_MSGMEM_WRAP_ECC_AGGR (13U)
96 #define SDL_MCAN7_MCANSS_MSGMEM_WRAP_ECC_AGGR (14U)
97 #define SDL_FSS_OSPI_RAM_ECC_AGGR (15U)
98 #define SDL_FSS_FOTA_8051_RAM_ECC_AGGR (16U)
99 #define SDL_CPSW3GCSS_ECC_AGGR (17U)
101 #define SDL_CPSW3GCSS_ECC_AGGR (11U)
103 #define SDL_ECC_MEMTYPE_MAX (SDL_CPSW3GCSS_ECC_AGGR + 1U)
106 #define SDL_R5SS0_CPU0_TCM (0U)
107 #define SDL_R5SS1_CPU0_TCM (1U)
109 #define SDL_R5FSS0_CORE0_ATCM0 (1U)
110 #define SDL_R5FSS0_CORE0_B0TCM0 (3U)
111 #define SDL_R5FSS0_CORE0_B1TCM0 (5U)
113 #define SDL_R5FSS0_CORE1_ATCM1 (2U)
114 #define SDL_R5FSS0_CORE1_B0TCM1 (4U)
115 #define SDL_R5FSS0_CORE1_B1TCM1 (6U)
117 #define SDL_R5FSS1_CORE0_ATCM0 (7U)
118 #define SDL_R5FSS1_CORE0_B0TCM0 (9U)
119 #define SDL_R5FSS1_CORE0_B1TCM0 (11U)
121 #define SDL_R5FSS1_CORE1_ATCM1 (8U)
122 #define SDL_R5FSS1_CORE1_B0TCM1 (10U)
123 #define SDL_R5FSS1_CORE1_B1TCM1 (12U)
125 #define SDL_TPCC0 (2)
128 #if defined(SOC_AM273X) || defined(SOC_AWR294X)
129 #define SDL_R5FSS0_CORE0_ECC_AGGR (0U)
130 #define SDL_R5FSS0_CORE1_ECC_AGGR (1U)
131 #define SDL_MSS_ECC_AGG_MSS (2U)
132 #define SDL_DSS_ECC_AGG (3U)
133 #define SDL_MSS_MCANA_ECC (4U)
134 #define SDL_MSS_MCANB_ECC (5U)
135 #define SDL_CPSW3GCSS_ECC_AGGR (6U)
136 #define SDL_ECC_MEMTYPE_MAX (SDL_CPSW3GCSS_ECC_AGGR + 1U)
138 #define SDL_TCM_PARITY_ATCM0 (1U)
139 #define SDL_TCM_PARITY_ATCM1 (2U)
140 #define SDL_TCM_PARITY_B0TCM0 (3U)
141 #define SDL_TCM_PARITY_B0TCM1 (4U)
142 #define SDL_TCM_PARITY_B1TCM0 (5U)
143 #define SDL_TCM_PARITY_B1TCM1 (6U)
146 #define SDL_TPCC0A (2U)
147 #define SDL_TPCC0B (3U)
148 #define SDL_DSS_TPCCA (4U)
149 #define SDL_DSS_TPCCB (5U)
150 #define SDL_DSS_TPCCC (6U)
153 #if defined(SOC_AM64X) || defined(SOC_AM243X)
154 #define SDL_PSRAMECC0_PSRAM256X32E_ECC_AGGR (0u)
155 #define SDL_MMCSD1_EMMCSD4SS_ECC_AGGR_RXMEM (1u)
156 #define SDL_ADC0_ADC12_CORE_FIFO_RAM_ECC_AGGR (2u)
157 #define SDL_ECC_AGGR1 (3u)
158 #define SDL_ECC_AGGR0 (4u)
159 #define SDL_SA2_UL0_SA2_UL_SA2_UL_ECC_AGGR (5u)
160 #define SDL_MCAN0_MCANSS_MSGMEM_WRAP_ECC_AGGR (6u)
161 #define SDL_DMASS0_DMSS_AM64_ECCAGGR (7u)
162 #define SDL_MMCSD1_EMMCSD4SS_ECC_AGGR_TXMEM (8u)
163 #define SDL_MCAN1_MCANSS_MSGMEM_WRAP_ECC_AGGR (9u)
164 #define SDL_PRU_ICSSG1_ICSS_G_16FF_CORE_BORG_ECC_AGGR (10u)
165 #define SDL_PRU_ICSSG0_ICSS_G_16FF_CORE_BORG_ECC_AGGR (11u)
166 #define SDL_MSRAM_256K2_MSRAM32KX64E_ECC_AGGR (12u)
167 #define SDL_FSS0_FSS_UL_OSPI0_OSPI_WRAP_ECC_AGGR (13u)
168 #define SDL_CPSW0_CPSW_3GUSS_CORE_ECC_CPSW_ECC_AGGR (14u)
169 #define SDL_GICSS0_GIC500SS_1_2_ECC_AGGR (15u)
170 #define SDL_PCIE0_PCIE_G2X1_64_CORE_AXI_ECC_AGGR (16u)
171 #define SDL_PCIE0_PCIE_G2X1_64_CORE_CORE_ECC_AGGR (17u)
172 #define SDL_USB0_USB3P0SS64_16FFC_USB3P0SS64_CORE_A__ECC_AGGR (18u)
173 #define SDL_PDMA1_PDMA_AM64_MAIN1_ECCAGGR (19u)
174 #define SDL_DMSC0_DMSC_LITE_ECC_AGGR_TXMEM (20u)
175 #define SDL_MSRAM_256K1_MSRAM32KX64E_ECC_AGGR_TXMEM (21u)
176 #define SDL_MSRAM_256K0_MSRAM32KX64E_ECC_AGGR (22u)
177 #define SDL_MSRAM_256K3_MSRAM32KX64E_ECC_AGGR (23u)
178 #define SDL_MSRAM_256K5_MSRAM32KX64E_ECC_AGGR (24u)
179 #define SDL_MSRAM_256K4_MSRAM32KX64E_ECC_AGGR (25u)
180 #define SDL_MSRAM_256K7_MSRAM32KX64E_ECC_AGGR (26u)
181 #define SDL_MSRAM_256K6_MSRAM32KX64E_ECC_AGGR (27u)
182 #define SDL_MCU_M4FSS0_BLAZAR_ECCAGGR (28u)
183 #define SDL_PDMA0_PDMA_AM64_MAIN0_ECCAGGR (29u)
184 #define SDL_MMCSD0_EMMC8SS_16FFC_ECC_AGGR_RXMEM (30u)
185 #define SDL_MMCSD0_EMMC8SS_16FFC_ECC_AGGR_TXMEM (31u)
186 #define SDL_VTM0_K3VTM_N16FFC_ECCAGGR (32u)
187 #define SDL_R5FSS1_PULSAR_LITE_CPU0_ECC_AGGR (33u)
188 #define SDL_R5FSS1_PULSAR_LITE_CPU1_ECC_AGGR (34u)
189 #define SDL_R5FSS0_PULSAR_LITE_CPU0_ECC_AGGR (35u)
190 #define SDL_R5FSS0_PULSAR_LITE_CPU1_ECC_AGGR (36u)
191 #if defined(SOC_AM64X)
192 #define SDL_COMPUTE_CLUSTER0_SAM64_A53_256KB_WRAP_A53_DUAL_WRAP_CBA_WRAP_A53_DUAL_WRAP_CBA_COREPAC_ECC_AGGR_CORE0 (37u)
193 #define SDL_COMPUTE_CLUSTER0_SAM64_A53_256KB_WRAP_A53_DUAL_WRAP_CBA_WRAP_A53_DUAL_WRAP_CBA_COREPAC_ECC_AGGR_COREPAC (38u)
194 #define SDL_COMPUTE_CLUSTER0_SAM64_A53_256KB_WRAP_A53_DUAL_WRAP_CBA_WRAP_A53_DUAL_WRAP_CBA_COREPAC_ECC_AGGR_CORE1 (39u)
195 #define SDL_ECC_MEMTYPE_MAX (SDL_COMPUTE_CLUSTER0_SAM64_A53_256KB_WRAP_A53_DUAL_WRAP_CBA_WRAP_A53_DUAL_WRAP_CBA_COREPAC_ECC_AGGR_CORE1 + 1U)
197 #if defined(SOC_AM243X)
198 #define SDL_ECC_MEMTYPE_MAX (SDL_R5FSS0_PULSAR_LITE_CPU1_ECC_AGGR + 1U)
205 #if defined(SOC_AM273X) || defined(SOC_AWR294X) || defined(SOC_AM263X) || defined(SOC_AM263PX) || defined(SOC_AM261X)
207 #define SDL_ECC_R5F_MEM_SUBTYPE_ATCM0_BANK0_VECTOR_ID (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_ATCM0_BANK0_RAM_ID)
209 #define SDL_ECC_R5F_MEM_SUBTYPE_ATCM0_BANK1_VECTOR_ID (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_ATCM0_BANK1_RAM_ID)
211 #define SDL_ECC_R5F_MEM_SUBTYPE_B0TCM0_BANK0_VECTOR_ID (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_B0TCM0_BANK0_RAM_ID)
213 #define SDL_ECC_R5F_MEM_SUBTYPE_B0TCM0_BANK1_VECTOR_ID (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_B0TCM0_BANK1_RAM_ID)
215 #define SDL_ECC_R5F_MEM_SUBTYPE_B1TCM0_BANK0_VECTOR_ID (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_B1TCM0_BANK0_RAM_ID)
217 #define SDL_ECC_R5F_MEM_SUBTYPE_B1TCM0_BANK1_VECTOR_ID (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_B1TCM0_BANK1_RAM_ID)
219 #define SDL_ECC_R5F_MEM_SUBTYPE_KS_VIM_RAM_VECTOR_ID (SDL_R5FSS0_CORE0_ECC_AGGR_CPU0_KS_VIM_RAMECC_RAM_ID)
222 #if defined(SOC_AM64X) || defined(SOC_AM243X)
223 #define SDL_ECC_R5F_MEM_SUBTYPE_ATCM0_BANK0_VECTOR_ID (SDL_R5FSS0_PULSAR_LITE_CPU0_ECC_AGGR_PULSAR_LITE_ATCM0_BANK0_RAM_ID)
225 #define SDL_ECC_R5F_MEM_SUBTYPE_ATCM0_BANK1_VECTOR_ID (SDL_R5FSS0_PULSAR_LITE_CPU0_ECC_AGGR_PULSAR_LITE_ATCM0_BANK1_RAM_ID)
227 #define SDL_ECC_R5F_MEM_SUBTYPE_B0TCM0_BANK0_VECTOR_ID (SDL_R5FSS0_PULSAR_LITE_CPU0_ECC_AGGR_PULSAR_LITE_B0TCM0_BANK0_RAM_ID)
229 #define SDL_ECC_R5F_MEM_SUBTYPE_B0TCM0_BANK1_VECTOR_ID (SDL_R5FSS0_PULSAR_LITE_CPU0_ECC_AGGR_PULSAR_LITE_B0TCM0_BANK1_RAM_ID)
231 #define SDL_ECC_R5F_MEM_SUBTYPE_B1TCM0_BANK0_VECTOR_ID (SDL_R5FSS0_PULSAR_LITE_CPU0_ECC_AGGR_PULSAR_LITE_B1TCM0_BANK0_RAM_ID)
233 #define SDL_ECC_R5F_MEM_SUBTYPE_B1TCM0_BANK1_VECTOR_ID (SDL_R5FSS0_PULSAR_LITE_CPU0_ECC_AGGR_PULSAR_LITE_B1TCM0_BANK1_RAM_ID)
235 #define SDL_ECC_R5F_MEM_SUBTYPE_KS_VIM_RAM_VECTOR_ID (SDL_R5FSS0_PULSAR_LITE_CPU0_ECC_AGGR_CPU0_KS_VIM_RAMECC_RAM_ID)
326 typedef struct SDL_ECC_InitConfig_s
339 typedef struct SDL_ECC_InjectErrorConfig_s
353 typedef struct SDL_ECC_ErrorInfo_s
430 uint32_t selfTestTimeOut);
541 uint64_t bitErrorOffset,
542 uint32_t bitErrorGroup);
543 #if defined(SOC_AM263X) || defined(SOC_AM263PX) || defined(SOC_AM261X)
564 int32_t SDL_cleartcmStatusRegs(uint32_t clearVal);
566 #if defined(SOC_AM273X)|| defined(SOC_AWR294X)
586 void SDL_ECC_dss_l2_parity_init(
void);
597 void SDL_ECC_dss_l2_parity_errorInject(uint32_t injectError, uint32_t injectErrAdd, uint32_t
value);
609 void SDL_ECC_DSP_Aggregated_EDC_Errors(uint32_t exception_mask_flag);
618 int32_t SDL_ECC_dss_l1p_edc_CMD_EN(
void);
627 int32_t SDL_ECC_dss_l1p_CMD_SUSP(
void);
636 int32_t SDL_ECC_dss_l2_edc_CMD_EN(
void);
645 int32_t SDL_ECC_dss_l2_CMD_SUSP(
void);
656 void SDL_ECC_IDMA1_transfer(uint32_t srcAddr, uint32_t destAddr);
673 uint32_t paramregvalue,
676 #if defined(SOC_AM263PX) || defined(SOC_AM261X)
682 void SDL_ECC_enableTMUROMParity(
void);
690 void SDL_ECC_enableTMUROMParityForceError(
void);
698 void SDL_ECC_disableTMUROMParity(
void);
706 void SDL_ECC_disableTMUROMParityErrorForce(
void);
714 void SDL_ECC_clearTMUROMParityError(
void);
void(* SDL_ECC_ErrorCallback_t)(uint32_t errorSrc, uint32_t address)
Definition: sdl_ecc.h:312
Definition: sdl_ecc.h:327
int32_t SDL_ECC_initMemory(SDL_ECC_MemType eccMemType, SDL_ECC_MemSubType memSubType)
Initializes Memory to be ready for ECC error detection. Assumes ECC is already enabled.
SDL_ECC_MemSubType memSubType
Definition: sdl_ecc.h:357
uint32_t numRams
Definition: sdl_ecc.h:328
@ SDL_INJECT_ECC_ERROR_FORCING_2BIT_ONCE
Definition: sdl_ecc.h:268
int32_t SDL_ECC_injectError(SDL_ECC_MemType eccMemType, SDL_ECC_MemSubType memSubType, SDL_ECC_InjectErrorType errorType, const SDL_ECC_InjectErrorConfig_t *pECCErrorConfig)
Injects ECC error at specified location Assumes ECC is already enabled.
int32_t SDL_ECC_ackIntr(SDL_ECC_MemType eccMemType, SDL_Ecc_AggrIntrSrc intrSrc)
Acknowledge the ECC interrupt.
uint32_t chkGrp
Definition: sdl_ecc.h:345
Header file contains enumerations, structure definitions and function declarations for SDL Error Sign...
uint32_t SDL_Ecc_AggrEDCErrorSubType
This enumerator defines the types of possible EDC errors.
Definition: V1/sdl_ip_ecc.h:190
int32_t SDL_ECC_getStaticRegisters(SDL_ECC_MemType eccMemType, SDL_ECC_staticRegs *pStaticRegs)
Gets the static registers for the specified ECC instance.
@ SDL_ECC_AGGR_TYPE_INJECT_ONLY
Definition: sdl_ecc.h:250
@ SDL_INJECT_ECC_ERROR_FORCING_1BIT_N_ROW_ONCE
Definition: sdl_ecc.h:270
@ SDL_INJECT_ECC_ERROR_FORCING_1BIT_ONCE
Definition: sdl_ecc.h:266
int32_t SDL_ECC_selfTest(SDL_ECC_MemType eccMemType, SDL_ECC_MemSubType memSubType, SDL_ECC_InjectErrorType errorType, const SDL_ECC_InjectErrorConfig_t *pECCErrorConfig, uint32_t selfTestTimeOut)
Runs self test by injecting and error and monitor response Assumes ECC is already enabled.
uint32_t bitErrorGroup
Definition: sdl_ecc.h:365
@ SDL_INJECT_ECC_ERROR_FORCING_2BIT_N_ROW_ONCE
Definition: sdl_ecc.h:272
SDL_Ecc_AggrIntrSrc intrSrc
Definition: sdl_ecc.h:359
@ SDL_INJECT_ECC_ERROR_FORCING_1BIT_REPEAT
Definition: sdl_ecc.h:274
Header file contains enumerations, structure definitions and function declarations for SDL COMMON int...
Definition: sdl_ecc.h:340
@ SDL_INJECT_ECC_NO_ERROR
Definition: sdl_ecc.h:264
uint32_t value
Definition: tisci_otp_revision.h:2
uint32_t * pErrMem
Definition: sdl_ecc.h:341
This structure contains the static register group for Ecc aggregator used by the SDL_ecc_aggrReadStat...
Definition: V1/sdl_ip_ecc.h:310
@ SDL_ECC_AGGR_TYPE_FULL_FUNCTION
Definition: sdl_ecc.h:252
void(* SDL_ECC_VIMDEDVector_t)(void)
Definition: sdl_ecc.h:315
SDL_ECC_InjectErrorType
ECC Inject error types.
Definition: sdl_ecc.h:262
int32_t SDL_ECC_initEsm(const SDL_ESM_Inst esmInstType)
Initializes an module for usage with ECC module.
uint64_t bitErrorOffset
Definition: sdl_ecc.h:367
uint32_t flipBitMask
Definition: sdl_ecc.h:343
SDL_ECC_AggregatorType
Definition: sdl_ecc.h:249
@ SDL_INJECT_ECC_ERROR_FORCING_2BIT_REPEAT
Definition: sdl_ecc.h:276
@ SDL_ECC_RAM_ID_TYPE_INTERCONNECT
Definition: sdl_ecc.h:291
uint32_t SDL_Ecc_AggrIntrSrc
This enumerator defines the types of possible ECC errors.
Definition: V1/sdl_ip_ecc.h:181
int32_t SDL_ECC_getESMErrorInfo(SDL_ESM_Inst instance, uint32_t intSrc, SDL_ECC_MemType *eccMemType, SDL_Ecc_AggrIntrSrc *intrSrcType)
Retrieves the ECC error information for the specified ESM error. If it isn't an ECC error or the ECC ...
Definition: sdl_ecc.h:354
SDL_ECC_MemSubType * pMemSubTypeList
Definition: sdl_ecc.h:331
uint32_t SDL_ECC_MemSubType
This enumerator indicate ECC memory Sub Type.
Definition: sdl_ecc.h:300
@ SDL_INJECT_ECC_ERROR_FORCING_1BIT_N_ROW_REPEAT
Definition: sdl_ecc.h:278
int32_t SDL_ECC_clearNIntrPending(SDL_ECC_MemType eccMemType, SDL_ECC_MemSubType memSubType, SDL_Ecc_AggrIntrSrc intrSrc, SDL_Ecc_AggrEDCErrorSubType subType, uint32_t numEvents)
Clears N pending interrupts for the specified memtype, subtype and interrupt source.
uint32_t injectBitErrCnt
Definition: sdl_ecc.h:363
int32_t SDL_ECC_getErrorInfo(SDL_ECC_MemType eccMemType, SDL_Ecc_AggrIntrSrc intrSrc, SDL_ECC_ErrorInfo_t *pErrorInfo)
Retrieves the ECC error information for the specified memtype and interrupt source.
uint32_t bitErrCnt
Definition: sdl_ecc.h:361
SDL_ECC_MemType eccMemType
Definition: sdl_ecc.h:355
void SDL_ECC_applicationCallbackFunction(SDL_ECC_MemType eccMemType, uint32_t errorSrc, uint32_t address, uint32_t ramId, uint64_t bitErrorOffset, uint32_t bitErrorGroup)
Application provided external callback function for ECC handling Called inside the reference function...
@ SDL_INJECT_ECC_ERROR_FORCING_2BIT_N_ROW_REPEAT
Definition: sdl_ecc.h:280
SDL_ECC_RamIdType
Definition: sdl_ecc.h:288
@ SDL_ECC_RAM_ID_TYPE_WRAPPER
Definition: sdl_ecc.h:289
uint32_t SDL_ECC_MemType
This enumerator indicate ECC memory type.
Definition: sdl_ecc.h:307
int32_t SDL_ECC_init(SDL_ECC_MemType eccMemType, const SDL_ECC_InitConfig_t *pECCInitConfig)
Initializes ECC module for ECC detection.
int32_t SDL_ECC_tpccParity(SDL_ECC_MemType eccMemType, uint32_t bitValue, uint32_t paramregvalue, uint32_t regval)
Injects TPCC Parity error.