SDL API Guide for J721E
ip/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  */
37 
71 #ifndef INCLUDE_SDL_ESM_H_
72 #define INCLUDE_SDL_ESM_H_
73 
74 #include <stdint.h>
75 #include <stdbool.h>
76 #include <sdl_types.h>
77 
78 
79 #ifdef __cplusplus
80 extern "C" {
81 #endif
82 
121 typedef int32_t SDL_Result;
122 
123 typedef enum {
131 
136 typedef enum {
148 
149 
154 typedef enum {
160 
165 typedef enum {
173 } SDL_ESM_Inst;
174 
185 #define SDL_ESM_INTNUMBER_INVALID (0xffffffffu)
186 
188 #define SDL_ESM_INST_INVALID (0xfffffffeu)
189 
191 #define SDL_ESM_ERRORADDR_INVALID (0xffffffffu)
192 
194 #define SDL_ESM_ERRORRAMID_INVALID (0xffffffffu)
195 
197 #define SDL_ESM_ERRORBITOFFSET_INVALID (0xffffffffffffffffu)
198 
200 #define SDL_ESM_ERRORBITGROUP_INVALID (0xffffffffu)
201 
203 #define SDL_ESM_MAX_EVENT_MAP_NUM_WORDS (32u)
204 
222 typedef uint32_t sdlEsmEccErrorSource_t;
223 
225 #define SDL_ESM_ECC_PARAM_MCU_CPU0_SEC_ERROR (1u)
226 
227 #define SDL_ESM_ECC_PARAM_MCU_CPU0_DED_ERROR (2u)
228 
229 #define SDL_ESM_ECC_PARAM_MCU_CPU1_SEC_ERROR (3u)
230 
231 #define SDL_ESM_ECC_PARAM_MCU_CPU1_DED_ERROR (4u)
232 
233 #define SDL_ESM_ECC_PARAM_MCU_CBASS_SEC_ERROR (5u)
234 
235 #define SDL_ESM_ECC_PARAM_MCU_CBASS_DED_ERROR (6u)
236 
237 /* @} */
238 
247 #define SDL_ESM_ECC_PARAM_MAIN_MSMC_AGGR0_SEC_ERROR (10001u)
248 
249 #define SDL_ESM_ECC_PARAM_MAIN_MSMC_AGGR0_DED_ERROR (10002u)
250 
251 #define SDL_ESM_ECC_PARAM_MAIN_A72_AGGR0_SEC_ERROR (10003u)
252 
253 #define SDL_ESM_ECC_PARAM_MAIN_A72_AGGR0_DED_ERROR (10004u)
254 
261 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);
262 
269 typedef struct SDL_ESM_Errorconfig_s
270 {
271  uint32_t groupNumber;
273  uint32_t bitNumber;
276 
283 typedef struct SDL_ESM_InitConfig_s
284 {
287  uint32_t enableBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
289  uint32_t priorityBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
291  uint32_t errorpinBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
296  uint32_t pinmininterval;
298 
314 void SDL_ESM_hiInterruptHandler_MCU (uintptr_t arg);
315 
324 void SDL_ESM_hiInterruptHandler_WKUP (uintptr_t arg);
325 
334 void SDL_ESM_hiInterruptHandler_MAIN (uintptr_t arg);
335 
344 void SDL_ESM_loInterruptHandler_MCU (uintptr_t arg);
345 
354 void SDL_ESM_loInterruptHandler_WKUP (uintptr_t arg);
355 
364 void SDL_ESM_loInterruptHandler_MAIN (uintptr_t arg);
365 
374 void SDL_ESM_configInterruptHandler_MCU(uintptr_t arg);
375 
384 void SDL_ESM_configInterruptHandler_WKUP(uintptr_t arg);
385 
394 void SDL_ESM_configInterruptHandler_MAIN(uintptr_t arg);
395 
406 int32_t SDL_ESM_getIntNumber(SDL_ESM_Inst esmInstType,
407  SDL_ESM_IntType esmIntType);
408 
409 
412 #ifdef __cplusplus
413 }
414 #endif /* extern "C" */
415 
416 #endif /* INCLUDE_SDL_ESM_H_ */
SDL_ESM_CCM_IntSrc
Defines the different SDL ESM interrupt sources
Definition: ip/sdl_esm.h:136
SDL_ESM_Inst
Defines the different ESM instance types
Definition: ip/sdl_esm.h:165
Definition: ip/sdl_esm.h:128
Definition: ip/sdl_esm.h:126
void SDL_ESM_loInterruptHandler_WKUP(uintptr_t arg)
Esm Lo Interrupt Handler for WKUP Esm Instance.
Definition: ip/sdl_esm.h:157
void SDL_ESM_configInterruptHandler_MCU(uintptr_t arg)
Esm Config Interrupt Handler for MCU Instance.
#define SDL_ESM_MAX_EVENT_MAP_NUM_WORDS
Maximum number of EVENT words.
Definition: ip/sdl_esm.h:203
uint32_t pinmininterval
Definition: ip/sdl_esm.h:296
Definition: ip/sdl_esm.h:141
Definition: ip/sdl_esm.h:155
Definition: ip/sdl_esm.h:170
Definition: ip/sdl_esm.h:139
Definition: ip/sdl_esm.h:137
void SDL_ESM_hiInterruptHandler_MAIN(uintptr_t arg)
Esm Hi Interrupt Handler for MAIN Esm Instance.
uint32_t sdlEsmEccErrorSource_t
Source of the ECC error which maps to the ESM interrupt source.
Definition: ip/sdl_esm.h:222
ESM init configuration.
Definition: ip/sdl_esm.h:283
ESM error configuration.
Definition: ip/sdl_esm.h:269
uint32_t bitNumber
Definition: ip/sdl_esm.h:273
Definition: ip/sdl_esm.h:172
SDL_ESM_ErrorConfig_t esmErrorConfig
Definition: ip/sdl_esm.h:285
int32_t SDL_Result
This enumerator defines the values for ESM interrupt types
Definition: ip/sdl_esm.h:121
void SDL_ESM_configInterruptHandler_MAIN(uintptr_t arg)
Esm Config Interrupt Handler for MAIN Instance.
uint32_t groupNumber
Definition: ip/sdl_esm.h:271
Definition: ip/sdl_esm.h:143
Definition: ip/sdl_esm.h:168
void SDL_ESM_configInterruptHandler_WKUP(uintptr_t arg)
Esm Config Interrupt Handler for WKUP Instance.
Definition: ip/sdl_esm.h:124
Definition: ip/sdl_esm.h:166
SDL_ESM_IntType
Definition: ip/sdl_esm.h:123
int32_t SDL_ESM_getIntNumber(SDL_ESM_Inst esmInstType, SDL_ESM_IntType esmIntType)
Esm get Interrupt Number corresponding to the input interrupt type.
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: ip/sdl_esm.h:261
void SDL_ESM_loInterruptHandler_MAIN(uintptr_t arg)
Esm Lo Interrupt Handler for MAIN Esm Instance.
void SDL_ESM_loInterruptHandler_MCU(uintptr_t arg)
Esm Lo Interrupt Handler for MCU Esm Instance.
void SDL_ESM_hiInterruptHandler_WKUP(uintptr_t arg)
Esm Hi Interrupt Handler for WKUP Esm Instance.
Definition: ip/sdl_esm.h:145
SDL_ESM_WDT_IntSrc
Defines the different Timer id events
Definition: ip/sdl_esm.h:154
void SDL_ESM_hiInterruptHandler_MCU(uintptr_t arg)
Esm Hi Interrupt Handler for MCU Esm Instance.