SDL API Guide for J7200
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 {
133 
138 typedef enum {
150 
151 
156 typedef enum {
162 
167 typedef enum {
175 } SDL_ESM_Inst;
176 
187 #define SDL_ESM_INTNUMBER_INVALID (0xffffffffu)
188 
190 #define SDL_ESM_INST_INVALID (0xfffffffeu)
191 
193 #define SDL_ESM_ERRORADDR_INVALID (0xffffffffu)
194 
196 #define SDL_ESM_ERRORRAMID_INVALID (0xffffffffu)
197 
199 #define SDL_ESM_ERRORBITOFFSET_INVALID (0xffffffffffffffffu)
200 
202 #define SDL_ESM_ERRORBITGROUP_INVALID (0xffffffffu)
203 
205 #define SDL_ESM_MAX_EVENT_MAP_NUM_WORDS (32u)
206 
224 typedef uint32_t sdlEsmEccErrorSource_t;
225 
227 #define SDL_ESM_ECC_PARAM_MCU_CPU0_SEC_ERROR (1u)
228 
229 #define SDL_ESM_ECC_PARAM_MCU_CPU0_DED_ERROR (2u)
230 
231 #define SDL_ESM_ECC_PARAM_MCU_CPU1_SEC_ERROR (3u)
232 
233 #define SDL_ESM_ECC_PARAM_MCU_CPU1_DED_ERROR (4u)
234 
235 #define SDL_ESM_ECC_PARAM_MCU_CBASS_SEC_ERROR (5u)
236 
237 #define SDL_ESM_ECC_PARAM_MCU_CBASS_DED_ERROR (6u)
238 
239 /* @} */
240 
249 #define SDL_ESM_ECC_PARAM_MAIN_MSMC_AGGR0_SEC_ERROR (10001u)
250 
251 #define SDL_ESM_ECC_PARAM_MAIN_MSMC_AGGR0_DED_ERROR (10002u)
252 
253 #define SDL_ESM_ECC_PARAM_MAIN_A72_AGGR0_SEC_ERROR (10003u)
254 
255 #define SDL_ESM_ECC_PARAM_MAIN_A72_AGGR0_DED_ERROR (10004u)
256 
263 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);
264 
271 typedef struct SDL_ESM_Errorconfig_s
272 {
273  uint32_t groupNumber;
275  uint32_t bitNumber;
278 
285 typedef struct SDL_ESM_InitConfig_s
286 {
289  uint32_t enableBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
291  uint32_t priorityBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
293  uint32_t errorpinBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
298  uint32_t pinmininterval;
300 
316 void SDL_ESM_hiInterruptHandler_MCU (uintptr_t arg);
317 
326 void SDL_ESM_hiInterruptHandler_WKUP (uintptr_t arg);
327 
336 void SDL_ESM_hiInterruptHandler_MAIN (uintptr_t arg);
337 
346 void SDL_ESM_loInterruptHandler_MCU (uintptr_t arg);
347 
356 void SDL_ESM_loInterruptHandler_WKUP (uintptr_t arg);
357 
366 void SDL_ESM_loInterruptHandler_MAIN (uintptr_t arg);
367 
376 void SDL_ESM_configInterruptHandler_MCU(uintptr_t arg);
377 
386 void SDL_ESM_configInterruptHandler_WKUP(uintptr_t arg);
387 
396 void SDL_ESM_configInterruptHandler_MAIN(uintptr_t arg);
397 
408 int32_t SDL_ESM_getIntNumber(SDL_ESM_Inst esmInstType,
409  SDL_ESM_IntType esmIntType);
410 
411 
414 #ifdef __cplusplus
415 }
416 #endif /* extern "C" */
417 
418 #endif /* INCLUDE_SDL_ESM_H_ */
SDL_ESM_CCM_IntSrc
Defines the different SDL ESM interrupt sources
Definition: ip/sdl_esm.h:138
SDL_ESM_Inst
Defines the different ESM instance types
Definition: ip/sdl_esm.h:167
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:159
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:205
uint32_t pinmininterval
Definition: ip/sdl_esm.h:298
Definition: ip/sdl_esm.h:143
Definition: ip/sdl_esm.h:157
Definition: ip/sdl_esm.h:172
Definition: ip/sdl_esm.h:141
Definition: ip/sdl_esm.h:139
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:224
ESM init configuration.
Definition: ip/sdl_esm.h:285
ESM error configuration.
Definition: ip/sdl_esm.h:271
uint32_t bitNumber
Definition: ip/sdl_esm.h:275
Definition: ip/sdl_esm.h:174
SDL_ESM_ErrorConfig_t esmErrorConfig
Definition: ip/sdl_esm.h:287
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:273
Definition: ip/sdl_esm.h:145
Definition: ip/sdl_esm.h:170
void SDL_ESM_configInterruptHandler_WKUP(uintptr_t arg)
Esm Config Interrupt Handler for WKUP Instance.
Definition: ip/sdl_esm.h:130
Definition: ip/sdl_esm.h:124
Definition: ip/sdl_esm.h:168
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:263
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:147
SDL_ESM_WDT_IntSrc
Defines the different Timer id events
Definition: ip/sdl_esm.h:156
void SDL_ESM_hiInterruptHandler_MCU(uintptr_t arg)
Esm Hi Interrupt Handler for MCU Esm Instance.