AM62Ax MCU+ SDK  09.01.00
esm/sdl_esm.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Texas Instruments Incorporated 2023
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
33 /*
34  * SDL ESM
35  *
36  * Software Diagnostics Reference module for Error Signaling Module
37  *
38 */
76 #ifndef INCLUDE_SDL_ESM_H_
77 #define INCLUDE_SDL_ESM_H_
78 
79 #include <stdint.h>
80 #include <stdbool.h>
81 
82 #include <sdl/esm/soc/sdl_esm_soc.h>
83 
84 #ifdef __cplusplus
85 extern "C" {
86 #endif
87 
88 typedef int32_t SDL_Result;
89 
95 typedef enum {
105 
112 #define SDL_ESM_INTNUMBER_INVALID (0xffffffffu)
113 
115 #define SDL_ESM_INST_INVALID (0xfffffffeu)
116 
118 #define SDL_ESM_ERRORADDR_INVALID (0xffffffffu)
119 
121 #define SDL_ESM_ERRORRAMID_INVALID (0xffffffffu)
122 
124 #define SDL_ESM_ERRORBITOFFSET_INVALID (0xffffffffffffffffu)
125 
127 #define SDL_ESM_ERRORBITGROUP_INVALID (0xffffffffu)
128 
130 #define SDL_ESM_MAX_EVENT_MAP_NUM_WORDS (32u)
131 
140 typedef uint32_t sdlEsmEccErrorSource_t;
141 
143 #define SDL_ESM_ECC_PARAM_MCU_CPU0_SEC_ERROR (1u)
144 
145 #define SDL_ESM_ECC_PARAM_MCU_CPU0_DED_ERROR (2u)
146 
147 #define SDL_ESM_ECC_PARAM_MCU_CPU1_SEC_ERROR (3u)
148 
149 #define SDL_ESM_ECC_PARAM_MCU_CPU1_DED_ERROR (4u)
150 
151 #define SDL_ESM_ECC_PARAM_MCU_CBASS_SEC_ERROR (5u)
152 
153 #define SDL_ESM_ECC_PARAM_MCU_CBASS_DED_ERROR (6u)
154 
158 #define SDL_ESM_ECC_PARAM_MAIN_MSMC_AGGR0_SEC_ERROR (10001u)
159 
160 #define SDL_ESM_ECC_PARAM_MAIN_MSMC_AGGR0_DED_ERROR (10002u)
161 
162 #define SDL_ESM_ECC_PARAM_MAIN_A72_AGGR0_SEC_ERROR (10003u)
163 
164 #define SDL_ESM_ECC_PARAM_MAIN_A72_AGGR0_DED_ERROR (10004u)
165 
166 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);
167 
174 typedef struct SDL_ESM_Errorconfig_s
175 {
176  uint32_t groupNumber;
178  uint32_t bitNumber;
181 
188 typedef struct SDL_ESM_InitConfig_s
189 {
192  uint32_t enableBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
194  uint32_t priorityBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
196  uint32_t errorpinBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
201  uint32_t pinmininterval;
203 
210 void SDL_ESM_hiInterruptHandler (void *arg);
211 
218 void SDL_ESM_loInterruptHandler (void *arg);
219 
227 
238 int32_t SDL_ESM_getIntNumber(SDL_ESM_Inst esmInstType,
239  SDL_ESM_IntType esmIntType);
240 
241 
244 #ifdef __cplusplus
245 }
246 #endif /* extern "C" */
247 
248 #endif /* INCLUDE_SDL_ESM_H_ */
SDL_ESM_ErrorConfig_t
ESM error configuration.
Definition: esm/sdl_esm.h:175
SDL_ESM_IntType
SDL_ESM_IntType
Definition: esm/sdl_esm.h:95
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:140
SDL_ESM_config
ESM init configuration.
Definition: esm/sdl_esm.h:189
index
uint16_t index
Definition: tisci_rm_proxy.h:3
SDL_ESM_INT_TYPE_CFG
@ SDL_ESM_INT_TYPE_CFG
Definition: esm/sdl_esm.h:100
SDL_ESM_INT_TYPE_LO
@ SDL_ESM_INT_TYPE_LO
Definition: esm/sdl_esm.h:98
SDL_Result
int32_t SDL_Result
Definition: esm/sdl_esm.h:88
SDL_ESM_config::pinmininterval
uint32_t pinmininterval
Definition: esm/sdl_esm.h:201
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:130
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:166
SDL_ESM_config::esmErrorConfig
SDL_ESM_ErrorConfig_t esmErrorConfig
Definition: esm/sdl_esm.h:190
SDL_ESM_INT_TYPE_HI
@ SDL_ESM_INT_TYPE_HI
Definition: esm/sdl_esm.h:96
SDL_ESM_INT_TYPE_MAX
@ SDL_ESM_INT_TYPE_MAX
Definition: esm/sdl_esm.h:102
SDL_ESM_ErrorConfig_t::bitNumber
uint32_t bitNumber
Definition: esm/sdl_esm.h:178
SDL_ESM_ErrorConfig_t::groupNumber
uint32_t groupNumber
Definition: esm/sdl_esm.h:176