AM64x MCU+ SDK  08.04.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 #ifdef __cplusplus
82 extern "C" {
83 #endif
84 
85 typedef int32_t SDL_Result;
86 
92 typedef enum {
102 
107 typedef enum {
112  SDL_ESM_INSTANCE_MAX=0xFFFF
114 
115 
117 #define SDL_ESM_INTNUMBER_INVALID (0xffffffffu)
118 
120 #define SDL_ESM_INST_INVALID (0xfffffffeu)
121 
123 #define SDL_ESM_ERRORADDR_INVALID (0xffffffffu)
124 
126 #define SDL_ESM_ERRORRAMID_INVALID (0xffffffffu)
127 
129 #define SDL_ESM_ERRORBITOFFSET_INVALID (0xffffffffffffffffu)
130 
132 #define SDL_ESM_ERRORBITGROUP_INVALID (0xffffffffu)
133 
135 #define SDL_ESM_MAX_EVENT_MAP_NUM_WORDS (32u)
136 
145 typedef uint32_t sdlEsmEccErrorSource_t;
146 
148 #define SDL_ESM_ECC_PARAM_MCU_CPU0_SEC_ERROR (1u)
149 
150 #define SDL_ESM_ECC_PARAM_MCU_CPU0_DED_ERROR (2u)
151 
152 #define SDL_ESM_ECC_PARAM_MCU_CPU1_SEC_ERROR (3u)
153 
154 #define SDL_ESM_ECC_PARAM_MCU_CPU1_DED_ERROR (4u)
155 
156 #define SDL_ESM_ECC_PARAM_MCU_CBASS_SEC_ERROR (5u)
157 
158 #define SDL_ESM_ECC_PARAM_MCU_CBASS_DED_ERROR (6u)
159 
163 #define SDL_ESM_ECC_PARAM_MAIN_MSMC_AGGR0_SEC_ERROR (10001u)
164 
165 #define SDL_ESM_ECC_PARAM_MAIN_MSMC_AGGR0_DED_ERROR (10002u)
166 
167 #define SDL_ESM_ECC_PARAM_MAIN_A72_AGGR0_SEC_ERROR (10003u)
168 
169 #define SDL_ESM_ECC_PARAM_MAIN_A72_AGGR0_DED_ERROR (10004u)
170 
171 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);
172 
179 typedef struct SDL_ESM_Errorconfig_s
180 {
181  uint32_t groupNumber;
183  uint32_t bitNumber;
186 
193 typedef struct SDL_ESM_InitConfig_s
194 {
197  uint32_t enableBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
199  uint32_t priorityBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
201  uint32_t errorpinBitmap[SDL_ESM_MAX_EVENT_MAP_NUM_WORDS];
206  uint32_t pinmininterval;
208 
215 void SDL_ESM_hiInterruptHandler (void *arg);
216 
223 void SDL_ESM_loInterruptHandler (void *arg);
224 
232 
243 int32_t SDL_ESM_getIntNumber(SDL_ESM_Inst esmInstType,
244  SDL_ESM_IntType esmIntType);
245 
246 
249 #ifdef __cplusplus
250 }
251 #endif /* extern "C" */
252 
253 #endif /* INCLUDE_SDL_ESM_H_ */
SDL_ESM_ErrorConfig_t
ESM error configuration.
Definition: esm/sdl_esm.h:180
SDL_ESM_IntType
SDL_ESM_IntType
Definition: esm/sdl_esm.h:92
sdlEsmEccErrorSource_t
uint32_t sdlEsmEccErrorSource_t
Source of the ECC error which maps to the ESM interrupt source.
Definition: esm/sdl_esm.h:145
SDL_ESM_config
ESM init configuration.
Definition: esm/sdl_esm.h:194
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:97
SDL_ESM_INST_MCU_ESM0
@ SDL_ESM_INST_MCU_ESM0
Definition: esm/sdl_esm.h:109
SDL_ESM_INST_MAIN_ESM0
@ SDL_ESM_INST_MAIN_ESM0
Definition: esm/sdl_esm.h:110
SDL_ESM_INT_TYPE_LO
@ SDL_ESM_INT_TYPE_LO
Definition: esm/sdl_esm.h:95
SDL_Result
int32_t SDL_Result
Definition: esm/sdl_esm.h:85
SDL_ESM_config::pinmininterval
uint32_t pinmininterval
Definition: esm/sdl_esm.h:206
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:135
SDL_ESM_Inst
SDL_ESM_Inst
Definition: esm/sdl_esm.h:107
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:171
SDL_ESM_config::esmErrorConfig
SDL_ESM_ErrorConfig_t esmErrorConfig
Definition: esm/sdl_esm.h:195
SDL_ESM_INT_TYPE_HI
@ SDL_ESM_INT_TYPE_HI
Definition: esm/sdl_esm.h:93
SDL_ESM_INT_TYPE_MAX
@ SDL_ESM_INT_TYPE_MAX
Definition: esm/sdl_esm.h:99
SDL_ESM_ErrorConfig_t::bitNumber
uint32_t bitNumber
Definition: esm/sdl_esm.h:183
SDL_ESM_ErrorConfig_t::groupNumber
uint32_t groupNumber
Definition: esm/sdl_esm.h:181
SDL_ESM_INSTANCE_MAX
@ SDL_ESM_INSTANCE_MAX
Definition: esm/sdl_esm.h:112