AM263x MCU+ SDK  08.05.00
sdl_ecc.h File Reference

Introduction

Header file contains enumerations, structure definitions and function.

declarations for SDL ECC interface.

Go to the source code of this file.

Data Structures

struct  SDL_ECC_InitConfig_t
 
struct  SDL_ECC_InjectErrorConfig_t
 
struct  SDL_ECC_ErrorInfo_t
 

Macros

#define SDL_ECC_R5F_MEM_SUBTYPE_ATCM0_BANK0_VECTOR_ID   (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_ATCM0_BANK0_RAM_ID)
 Select memory subtype ATCM0 BANK0. More...
 
#define SDL_ECC_R5F_MEM_SUBTYPE_ATCM0_BANK1_VECTOR_ID   (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_ATCM0_BANK1_RAM_ID)
 Select memory subtype ATCM0 BANK1. More...
 
#define SDL_ECC_R5F_MEM_SUBTYPE_B0TCM0_BANK0_VECTOR_ID   (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_B0TCM0_BANK0_RAM_ID)
 Select memory subtype B0TCM0 BANK0. More...
 
#define SDL_ECC_R5F_MEM_SUBTYPE_B0TCM0_BANK1_VECTOR_ID   (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_B0TCM0_BANK1_RAM_ID)
 Select memory subtype B0TCM0 BANK1. More...
 
#define SDL_ECC_R5F_MEM_SUBTYPE_B1TCM0_BANK0_VECTOR_ID   (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_B1TCM0_BANK0_RAM_ID)
 Select memory subtype B1TCM0 BANK0. More...
 
#define SDL_ECC_R5F_MEM_SUBTYPE_B1TCM0_BANK1_VECTOR_ID   (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_B1TCM0_BANK1_RAM_ID)
 Select memory subtype B1TCM0 BANK1. More...
 
#define SDL_ECC_R5F_MEM_SUBTYPE_KS_VIM_RAM_VECTOR_ID   (SDL_R5FSS0_CORE0_ECC_AGGR_CPU0_KS_VIM_RAMECC_RAM_ID)
 Select memory subtype VIM RAM. More...
 

Typedefs

typedef uint32_t SDL_ECC_MemType
 This enumerator indicate ECC memory type. More...
 
typedef uint32_t SDL_ECC_MemSubType
 This enumerator indicate ECC memory Sub Type. More...
 
typedef void(* SDL_ECC_ErrorCallback_t) (uint32_t errorSrc, uint32_t address)
 
typedef void(* SDL_ECC_VIMDEDVector_t) (void)
 

Enumerations

enum  SDL_ECC_AggregatorType { SDL_ECC_AGGR_TYPE_INJECT_ONLY = 1, SDL_ECC_AGGR_TYPE_FULL_FUNCTION = 2 }
 
enum  SDL_ECC_InjectErrorType {
  SDL_INJECT_ECC_NO_ERROR = 0, SDL_INJECT_ECC_ERROR_FORCING_1BIT_ONCE = 1, SDL_INJECT_ECC_ERROR_FORCING_2BIT_ONCE = 2, SDL_INJECT_ECC_ERROR_FORCING_1BIT_N_ROW_ONCE = 3,
  SDL_INJECT_ECC_ERROR_FORCING_2BIT_N_ROW_ONCE = 4, SDL_INJECT_ECC_ERROR_FORCING_1BIT_REPEAT = 5, SDL_INJECT_ECC_ERROR_FORCING_2BIT_REPEAT = 6, SDL_INJECT_ECC_ERROR_FORCING_1BIT_N_ROW_REPEAT = 7,
  SDL_INJECT_ECC_ERROR_FORCING_2BIT_N_ROW_REPEAT = 8
}
 ECC Inject error types. More...
 
enum  SDL_ECC_RamIdType { SDL_ECC_RAM_ID_TYPE_WRAPPER = 0, SDL_ECC_RAM_ID_TYPE_INTERCONNECT = 1 }
 

Functions

int32_t SDL_ECC_initEsm (const SDL_ESM_Inst esmInstType)
 Initializes an module for usage with ECC module. More...
 
int32_t SDL_ECC_init (SDL_ECC_MemType eccMemType, const SDL_ECC_InitConfig_t *pECCInitConfig)
 Initializes ECC module for ECC detection. More...
 
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. More...
 
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. More...
 
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. More...
 
int32_t SDL_ECC_getStaticRegisters (SDL_ECC_MemType eccMemType, SDL_ECC_staticRegs *pStaticRegs)
 Gets the static registers for the specified ECC instance. More...
 
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. More...
 
int32_t SDL_ECC_ackIntr (SDL_ECC_MemType eccMemType, SDL_Ecc_AggrIntrSrc intrSrc)
 Acknowledge the ECC interrupt. More...
 
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 error is not supported an error is returned. More...
 
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. More...
 
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 functions when ECC errors occur. NOTE: This is application supplied and not part of the SDL If not supplied by application this will result in an linker error. More...
 

Macro Definition Documentation

◆ SDL_ECC_R5F_MEM_SUBTYPE_ATCM0_BANK0_VECTOR_ID

#define SDL_ECC_R5F_MEM_SUBTYPE_ATCM0_BANK0_VECTOR_ID   (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_ATCM0_BANK0_RAM_ID)

Select memory subtype ATCM0 BANK0.

◆ SDL_ECC_R5F_MEM_SUBTYPE_ATCM0_BANK1_VECTOR_ID

#define SDL_ECC_R5F_MEM_SUBTYPE_ATCM0_BANK1_VECTOR_ID   (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_ATCM0_BANK1_RAM_ID)

Select memory subtype ATCM0 BANK1.

◆ SDL_ECC_R5F_MEM_SUBTYPE_B0TCM0_BANK0_VECTOR_ID

#define SDL_ECC_R5F_MEM_SUBTYPE_B0TCM0_BANK0_VECTOR_ID   (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_B0TCM0_BANK0_RAM_ID)

Select memory subtype B0TCM0 BANK0.

◆ SDL_ECC_R5F_MEM_SUBTYPE_B0TCM0_BANK1_VECTOR_ID

#define SDL_ECC_R5F_MEM_SUBTYPE_B0TCM0_BANK1_VECTOR_ID   (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_B0TCM0_BANK1_RAM_ID)

Select memory subtype B0TCM0 BANK1.

◆ SDL_ECC_R5F_MEM_SUBTYPE_B1TCM0_BANK0_VECTOR_ID

#define SDL_ECC_R5F_MEM_SUBTYPE_B1TCM0_BANK0_VECTOR_ID   (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_B1TCM0_BANK0_RAM_ID)

Select memory subtype B1TCM0 BANK0.

◆ SDL_ECC_R5F_MEM_SUBTYPE_B1TCM0_BANK1_VECTOR_ID

#define SDL_ECC_R5F_MEM_SUBTYPE_B1TCM0_BANK1_VECTOR_ID   (SDL_R5FSS0_CORE0_ECC_AGGR_PULSAR_SL_B1TCM0_BANK1_RAM_ID)

Select memory subtype B1TCM0 BANK1.

◆ SDL_ECC_R5F_MEM_SUBTYPE_KS_VIM_RAM_VECTOR_ID

#define SDL_ECC_R5F_MEM_SUBTYPE_KS_VIM_RAM_VECTOR_ID   (SDL_R5FSS0_CORE0_ECC_AGGR_CPU0_KS_VIM_RAMECC_RAM_ID)

Select memory subtype VIM RAM.

Typedef Documentation

◆ SDL_ECC_MemType

typedef uint32_t SDL_ECC_MemType

This enumerator indicate ECC memory type.



◆ SDL_ECC_MemSubType

typedef uint32_t SDL_ECC_MemSubType

This enumerator indicate ECC memory Sub Type.



◆ SDL_ECC_ErrorCallback_t

typedef void(* SDL_ECC_ErrorCallback_t) (uint32_t errorSrc, uint32_t address)

/brief Format of ECC error Call back function

◆ SDL_ECC_VIMDEDVector_t

typedef void(* SDL_ECC_VIMDEDVector_t) (void)

/brief Format of VIM DED vector function

Enumeration Type Documentation

◆ SDL_ECC_AggregatorType


\brief This enumerator defines the different ECC aggregator types

Enumerator
SDL_ECC_AGGR_TYPE_INJECT_ONLY 

Ecc aggregator inject only

SDL_ECC_AGGR_TYPE_FULL_FUNCTION 

Ecc aggregator full funtionality

◆ SDL_ECC_InjectErrorType

ECC Inject error types.



Enumerator
SDL_INJECT_ECC_NO_ERROR 

No error

SDL_INJECT_ECC_ERROR_FORCING_1BIT_ONCE 

1-Bit ECC Error forcing once

SDL_INJECT_ECC_ERROR_FORCING_2BIT_ONCE 

2-Bit ECC Error forcing once

SDL_INJECT_ECC_ERROR_FORCING_1BIT_N_ROW_ONCE 

1-Bit ECC Error Force once on next any Ram read

SDL_INJECT_ECC_ERROR_FORCING_2BIT_N_ROW_ONCE 

2-Bit ECC Error Force once on next Ram read

SDL_INJECT_ECC_ERROR_FORCING_1BIT_REPEAT 

1-Bit ECC Error forcing once

SDL_INJECT_ECC_ERROR_FORCING_2BIT_REPEAT 

2-Bit ECC Error forcing once

SDL_INJECT_ECC_ERROR_FORCING_1BIT_N_ROW_REPEAT 

1-Bit ECC Error Force once on next any Ram read

SDL_INJECT_ECC_ERROR_FORCING_2BIT_N_ROW_REPEAT 

2-Bit ECC Error Force once on next Ram read

◆ SDL_ECC_RamIdType


\brief This enumerator defines the different ECC RAM ID types

Enumerator
SDL_ECC_RAM_ID_TYPE_WRAPPER 

Ecc RAM ID Wrapper type

SDL_ECC_RAM_ID_TYPE_INTERCONNECT 

Ecc RAM ID Interconnect/CBASS type

Function Documentation

◆ SDL_ECC_initEsm()

int32_t SDL_ECC_initEsm ( const SDL_ESM_Inst  esmInstType)

Initializes an module for usage with ECC module.

============================================================================*

Parameters
esmInstTypeInstance of
Returns
SDL_PASS : Success; SDL_FAIL for failures

◆ SDL_ECC_init()

int32_t SDL_ECC_init ( SDL_ECC_MemType  eccMemType,
const SDL_ECC_InitConfig_t pECCInitConfig 
)

Initializes ECC module for ECC detection.

============================================================================*

Parameters
eccMemTypeECC memory type
pECCInitConfigPointer to Ecc init configuration
Returns
SDL_PASS : Success; SDL_FAIL for failuresn

◆ SDL_ECC_initMemory()

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.

============================================================================

Parameters
eccMemTypeECC memory type
memSubTypeMemory subtype
Returns
SDL_PASS : Success; SDL_FAIL for failures

◆ SDL_ECC_selfTest()

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.

============================================================================

Parameters
eccMemTypeECC memory type
memSubTypeMemory subtype
errorTypeECC Self test type
pECCErrorConfigPointer to Error configuration
selfTestTimeOutNumber of retries before time out
Returns
SDL_PASS : Success; SDL_FAIL for failures

◆ SDL_ECC_injectError()

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.

============================================================================

Parameters
eccMemTypeECC memory type
memSubTypeMemory subtype
errorTypeECC error type
pECCErrorConfigPointer to Error configuration
Returns
SDL_PASS : Success; SDL_FAIL for failures

◆ SDL_ECC_getStaticRegisters()

int32_t SDL_ECC_getStaticRegisters ( SDL_ECC_MemType  eccMemType,
SDL_ECC_staticRegs pStaticRegs 
)

Gets the static registers for the specified ECC instance.

============================================================================

Parameters
eccMemTypeECC memory type
pStaticRegsPointer to Static registers structure
Returns
SDL_PASS : Success; SDL_FAIL for failures

◆ SDL_ECC_getErrorInfo()

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.

============================================================================

Parameters
eccMemTypeECC memory type
intrSrcinterrupt source
pErrorInfoPointer to the Error Information
Returns
SDL_PASS : Success; SDL_FAIL for failures

◆ SDL_ECC_ackIntr()

int32_t SDL_ECC_ackIntr ( SDL_ECC_MemType  eccMemType,
SDL_Ecc_AggrIntrSrc  intrSrc 
)

Acknowledge the ECC interrupt.

============================================================================

Parameters
eccMemTypeECC memory type
intrSrcinterrupt source
Returns
SDL_PASS : Success; SDL_FAIL for failures

◆ SDL_ECC_getESMErrorInfo()

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 error is not supported an error is returned.

============================================================================

Parameters
instanceESM instance
intSrcESM interrupt number
eccMemTypePointer to the ECC memory type
intrSrcTypePointer to the interrupt source type
Returns
SDL_PASS : Success; SDL_FAIL for failures

◆ SDL_ECC_clearNIntrPending()

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.

============================================================================

Parameters
eccMemTypeECC memory type
memSubTypeMemory subtype
intrSrcinterrupt source
subTypeerror subtype (valid for EDC types only)
numEventsnumber of pending interrupts to clear
Returns
SDL_PASS : Success; SDL_FAIL for failures

◆ SDL_ECC_applicationCallbackFunction()

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 functions when ECC errors occur. NOTE: This is application supplied and not part of the SDL If not supplied by application this will result in an linker error.

============================================================================

Parameters
eccMemTypeECC Memory Type
errorSrcError source for the ECC error event.
addressAddress at which the ECC error occurred.
ramIdRAM ID at which the ECC error occurred.
bitErrorOffsetOffset at which the ECC error occurred.
bitErrorGroupgroup checker that reported the error (Interconnect ECC type only).