AM62x MCU+ SDK  09.00.00
esm/sdl_esm.h
Go to the documentation of this file.
1 /*
2  * SDL ESM
3  *
4  * Software Diagnostics Reference module for Error Signaling Module
5  *
6  * Copyright (c) Texas Instruments Incorporated 2021
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in the
17  * documentation and/or other materials provided with the
18  * distribution.
19  *
20  * Neither the name of Texas Instruments Incorporated nor the names of
21  * its contributors may be used to endorse or promote products derived
22  * from this software without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35  *
36  */
74 #ifndef INCLUDE_SDL_ESM_H_
75 #define INCLUDE_SDL_ESM_H_
76 
77 #include <stdint.h>
78 #include <stdbool.h>
79 
80 
81 #if defined(SOC_AM62X)
83 #endif
84 
85 #if defined(SOC_AM62AX)
86 #include <sdl/esm/soc/am62ax/sdl_esm_soc.h>
87 #endif
88 
89 #if defined(SOC_AM64X)
90 #include <sdl/esm/soc/am64x/sdl_esm_soc.h>
91 #endif
92 
93 #ifdef __cplusplus
94 extern "C" {
95 #endif
96 
97 typedef int32_t SDL_Result;
98 
104 typedef enum {
114 
121 #define SDL_ESM_INTNUMBER_INVALID (0xffffffffu)
122 
124 #define SDL_ESM_INST_INVALID (0xfffffffeu)
125 
127 #define SDL_ESM_ERRORADDR_INVALID (0xffffffffu)
128 
130 #define SDL_ESM_ERRORRAMID_INVALID (0xffffffffu)
131 
133 #define SDL_ESM_ERRORBITOFFSET_INVALID (0xffffffffffffffffu)
134 
136 #define SDL_ESM_ERRORBITGROUP_INVALID (0xffffffffu)
137 
139 #define SDL_ESM_MAX_EVENT_MAP_NUM_WORDS (32u)
140 
149 typedef uint32_t sdlEsmEccErrorSource_t;
150 
152 #define SDL_ESM_ECC_PARAM_MCU_CPU0_SEC_ERROR (1u)
153 
154 #define SDL_ESM_ECC_PARAM_MCU_CPU0_DED_ERROR (2u)
155 
156 #define SDL_ESM_ECC_PARAM_MCU_CPU1_SEC_ERROR (3u)
157 
158 #define SDL_ESM_ECC_PARAM_MCU_CPU1_DED_ERROR (4u)
159 
160 #define SDL_ESM_ECC_PARAM_MCU_CBASS_SEC_ERROR (5u)
161 
162 #define SDL_ESM_ECC_PARAM_MCU_CBASS_DED_ERROR (6u)
163 
167 #define SDL_ESM_ECC_PARAM_MAIN_MSMC_AGGR0_SEC_ERROR (10001u)
168 
169 #define SDL_ESM_ECC_PARAM_MAIN_MSMC_AGGR0_DED_ERROR (10002u)
170 
171 #define SDL_ESM_ECC_PARAM_MAIN_A72_AGGR0_SEC_ERROR (10003u)
172 
173 #define SDL_ESM_ECC_PARAM_MAIN_A72_AGGR0_DED_ERROR (10004u)
174 
175 typedef int32_t (* SDL_ESM_applicationCallback) (SDL_ESM_Inst instance, SDL_ESM_IntType intrType, uint32_t grpChannel, uint32_t index, uint32_t intSrc, void *arg);
176 
183 typedef struct SDL_ESM_Errorconfig_s
184 {
185  uint32_t groupNumber;
187  uint32_t bitNumber;
190 
197 typedef struct SDL_ESM_InitConfig_s
198 {
201  uint32_t enableBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
203  uint32_t priorityBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
205  uint32_t errorpinBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
210  uint32_t pinmininterval;
212 
219 void SDL_ESM_hiInterruptHandler (void *arg);
220 
227 void SDL_ESM_loInterruptHandler (void *arg);
228 
236 
247 int32_t SDL_ESM_getIntNumber(SDL_ESM_Inst esmInstType,
248  SDL_ESM_IntType esmIntType);
249 
250 
253 #ifdef __cplusplus
254 }
255 #endif /* extern "C" */
256 
257 #endif /* INCLUDE_SDL_ESM_H_ */
SDL_ESM_ErrorConfig_t
ESM error configuration.
Definition: esm/sdl_esm.h:184
SDL_ESM_IntType
SDL_ESM_IntType
Definition: esm/sdl_esm.h:104
SDL_ESM_Inst
SDL_ESM_Inst
Definition: sdl_esm_soc.h:59
sdlEsmEccErrorSource_t
uint32_t sdlEsmEccErrorSource_t
Source of the ECC error which maps to the ESM interrupt source.
Definition: esm/sdl_esm.h:149
SDL_ESM_config
ESM init configuration.
Definition: esm/sdl_esm.h:198
index
uint16_t index
Definition: tisci_rm_proxy.h:3
sdl_esm_soc.h
SDL_ESM_INT_TYPE_CFG
@ SDL_ESM_INT_TYPE_CFG
Definition: esm/sdl_esm.h:109
SDL_ESM_INT_TYPE_LO
@ SDL_ESM_INT_TYPE_LO
Definition: esm/sdl_esm.h:107
SDL_Result
int32_t SDL_Result
Definition: esm/sdl_esm.h:97
SDL_ESM_config::pinmininterval
uint32_t pinmininterval
Definition: esm/sdl_esm.h:210
SDL_ESM_hiInterruptHandler
void SDL_ESM_hiInterruptHandler(void *arg)
Esm Hi Interrupt Handler for MCU Esm Instance.
SDL_ESM_loInterruptHandler
void SDL_ESM_loInterruptHandler(void *arg)
Esm Lo Interrupt Handler for MCU Esm Instance.
SDL_ESM_configInterruptHandler
void SDL_ESM_configInterruptHandler(void *arg)
Esm Config Interrupt Handler for MCU Instance.
SDL_ESM_getIntNumber
int32_t SDL_ESM_getIntNumber(SDL_ESM_Inst esmInstType, SDL_ESM_IntType esmIntType)
Esm get Interrupt Number corresponding to the input interrupt type.
SDL_ESM_MAX_EVENT_MAP_NUM_WORDS
#define SDL_ESM_MAX_EVENT_MAP_NUM_WORDS
Maximum number of EVENT words.
Definition: esm/sdl_esm.h:139
SDL_ESM_applicationCallback
int32_t(* SDL_ESM_applicationCallback)(SDL_ESM_Inst instance, SDL_ESM_IntType intrType, uint32_t grpChannel, uint32_t index, uint32_t intSrc, void *arg)
Definition: esm/sdl_esm.h:175
SDL_ESM_config::esmErrorConfig
SDL_ESM_ErrorConfig_t esmErrorConfig
Definition: esm/sdl_esm.h:199
SDL_ESM_INT_TYPE_HI
@ SDL_ESM_INT_TYPE_HI
Definition: esm/sdl_esm.h:105
SDL_ESM_INT_TYPE_MAX
@ SDL_ESM_INT_TYPE_MAX
Definition: esm/sdl_esm.h:111
SDL_ESM_ErrorConfig_t::bitNumber
uint32_t bitNumber
Definition: esm/sdl_esm.h:187
SDL_ESM_ErrorConfig_t::groupNumber
uint32_t groupNumber
Definition: esm/sdl_esm.h:185