AM263x MCU+ SDK  09.02.00
ecc_bus_safety/v0/sdl_ecc_bus_safety.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2022-23 Texas Instruments Incorporated
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 
51 #ifndef SDL_ECC_BUS_SAFETY_H_
52 #define SDL_ECC_BUS_SAFETY_H_
53 
54 /* ========================================================================== */
55 /* Include Files */
56 /* ========================================================================== */
57 #include "sdl_ecc_bus_safety_hw.h"
58 #include <sdl/ecc_bus_safety/v0/soc/sdl_ecc_bus_safety_soc.h>
59 
60 #ifdef _cplusplus
61 extern "C" {
62 #endif
63 
82 /* ========================================================================== */
83 /* Macros & Typedefs */
84 /* ========================================================================== */
85 
86 /* ========================================================================== */
87 /* Structure Declarations */
88 /* ========================================================================== */
89 
94 typedef struct
95 {
96  /* Base address of the Core Control Register */
97  uint32_t baseAddr;
98  /* Node Start address */
99  uint32_t nodeStartAddr;
100  /* Node End address */
101  uint32_t nodeEndAddr;
102  /* offset of bus safety Control Register */
103  uint32_t busSftyCtrl;
104  /* offset of bus safety FI Register */
105  uint32_t busSftyFi;
106  /* offset of bus safety Error Register */
107  uint32_t busSftyErr;
108  /* offset of bus safety Err Stat CMD Register */
110  /* offset of bus safety Err Stat Write Register */
112  /* offset of bus safety Err Stat Read Register */
114  /* offset of bus safety Err Stat Write Resp Register */
117 
118 
119 typedef struct
120 {
121  /*enable the bus safety for core(mss/dss) */
122  uint32_t coreSftyCtrl;
123  /* offset of bus safety Control Register */
124  uint32_t busSftyCtrl;
125  /* offset of bus safety FI Register */
126  uint32_t busSftyFi;
127  /* offset of bus safety Error Register */
129 
137 typedef enum
138 {
145 
146 typedef enum
147 {
154 
157 /* ========================================================================== */
158 /* Variable Declarations */
159 /* ========================================================================== */
160 /* ========================================================================== */
161 /* Function Declarations */
162 /* ========================================================================== */
163 
182 int32_t SDL_ECC_BUS_SAFETY_DSS_secExecute(uint32_t busSftyNode,uint32_t addr, uint32_t wr_data);
183 
197 int32_t SDL_ECC_BUS_SAFETY_DSS_dedExecute(uint32_t busSftyNode, uint32_t addr, uint32_t wr_data);
198 
212 int32_t SDL_ECC_BUS_SAFETY_DSS_redExecute(uint32_t busSftyNode,\
214 
215 
225 int32_t SDL_ECC_BUS_SAFETY_DSS_secErrorClear(uint32_t busSftyNode);
226 
227 
238 int32_t SDL_ECC_BUS_SAFETY_DSS_getSecErrorStatus(uint32_t busSftyNode , uint32_t *status);
239 
250 int32_t SDL_ECC_BUS_SAFETY_DSS_dedErrorClear(uint32_t busSftyNode);
251 
264 int32_t SDL_ECC_BUS_SAFETY_DSS_getDedErrorStatus(uint32_t busSftyNode , uint32_t *status);
265 
276 int32_t SDL_ECC_BUS_SAFETY_DSS_redErrorClear(uint32_t busSftyNode);
277 
289 int32_t SDL_ECC_BUS_SAFETY_DSS_getRedErrorStatus(uint32_t busSftyNode , uint32_t *status);
290 
303 int32_t SDL_ECC_BUS_SAFETY_DSS_readStaticRegs(uint32_t busSftyNode ,\
304  SDL_ECC_BUS_SAFETY_staticRegs *pStaticRegs);
305 
319 int32_t SDL_ECC_BUS_SAFETY_MSS_secExecute(uint32_t busSftyNode,uint32_t addr, uint32_t wr_data);
320 
334 int32_t SDL_ECC_BUS_SAFETY_MSS_dedExecute(uint32_t busSftyNode, uint32_t addr, uint32_t wr_data);
335 
349 int32_t SDL_ECC_BUS_SAFETY_MSS_redExecute(uint32_t busSftyNode,\
351 
361 int32_t SDL_ECC_BUS_SAFETY_MSS_secErrorClear(uint32_t busSftyNode);
362 
363 
374 int32_t SDL_ECC_BUS_SAFETY_MSS_getSecErrorStatus(uint32_t busSftyNode , uint32_t *status);
375 
386 int32_t SDL_ECC_BUS_SAFETY_MSS_dedErrorClear(uint32_t busSftyNode);
387 
400 int32_t SDL_ECC_BUS_SAFETY_MSS_getDedErrorStatus(uint32_t busSftyNode , uint32_t *status);
401 
412 int32_t SDL_ECC_BUS_SAFETY_MSS_redErrorClear(uint32_t busSftyNode);
413 
425 int32_t SDL_ECC_BUS_SAFETY_MSS_getRedErrorStatus(uint32_t busSftyNode , uint32_t *status);
426 
439 int32_t SDL_ECC_BUS_SAFETY_MSS_readStaticRegs(uint32_t busSftyNode ,\
440  SDL_ECC_BUS_SAFETY_staticRegs *pStaticRegs);
441 
442 
443 
451 
455 #ifdef _cplusplus
456 }
457 #endif /*extern "C" */
458 
459 #endif
SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S::busSftyErrStatWr
uint32_t busSftyErrStatWr
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:111
SDL_ECC_BUS_SAFETY_MSS_secExecute
int32_t SDL_ECC_BUS_SAFETY_MSS_secExecute(uint32_t busSftyNode, uint32_t addr, uint32_t wr_data)
This API is used for SEC test on MSS.
SDL_ECC_BUS_SAFETY_MSS_secErrorClear
int32_t SDL_ECC_BUS_SAFETY_MSS_secErrorClear(uint32_t busSftyNode)
This API is used to clear SEC error on MSS.
SDL_ECC_BUS_SAFETY_DSS_dedExecute
int32_t SDL_ECC_BUS_SAFETY_DSS_dedExecute(uint32_t busSftyNode, uint32_t addr, uint32_t wr_data)
This API is used for DED test on DSS.
SDL_ECC_BUS_SAFETY_DSS_secErrorClear
int32_t SDL_ECC_BUS_SAFETY_DSS_secErrorClear(uint32_t busSftyNode)
This API is used to clear SEC error on DSS.
SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S::busSftyCtrl
uint32_t busSftyCtrl
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:103
SDL_ECC_BUS_SAFETY_MSS_redErrorClear
int32_t SDL_ECC_BUS_SAFETY_MSS_redErrorClear(uint32_t busSftyNode)
This API is used to clear RED error on MSS.
SDL_ECC_BUS_SAFETY_MSS_dedExecute
int32_t SDL_ECC_BUS_SAFETY_MSS_dedExecute(uint32_t busSftyNode, uint32_t addr, uint32_t wr_data)
This API is used for DED test on MSS.
SDL_ECC_BUS_SAFETY_DSS_AWR2944_AWR2943_Detect
uint32_t SDL_ECC_BUS_SAFETY_DSS_AWR2944_AWR2943_Detect(void)
This API is used to detect the device AWR2944/ Awr2943.
SDL_ECC_BUS_SAFETY_DSS_getDedErrorStatus
int32_t SDL_ECC_BUS_SAFETY_DSS_getDedErrorStatus(uint32_t busSftyNode, uint32_t *status)
This API is used to get DED error Status on DSS.
SDL_ECC_BUS_SAFETY_FI_INVALID
@ SDL_ECC_BUS_SAFETY_FI_INVALID
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:143
SDL_ECC_BUS_SAFETY_FI_TYPE_INVALID
@ SDL_ECC_BUS_SAFETY_FI_TYPE_INVALID
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:152
SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S::nodeEndAddr
uint32_t nodeEndAddr
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:101
SDL_ECC_BUS_SAFETY_DSS_getSecErrorStatus
int32_t SDL_ECC_BUS_SAFETY_DSS_getSecErrorStatus(uint32_t busSftyNode, uint32_t *status)
This API is used to get SEC error Status on DSS.
SDL_ECC_BUS_SAFETY_MSS_redExecute
int32_t SDL_ECC_BUS_SAFETY_MSS_redExecute(uint32_t busSftyNode, SDL_ECC_BUS_SAFETY_busSftyFiType fiType, SDL_ECC_BUS_SAFETY_busSftyFiRedType redType)
This API is used for RED test on MSS.
SDL_ECC_BUS_SAFETY_FI_GLOBAL_MAIN
@ SDL_ECC_BUS_SAFETY_FI_GLOBAL_MAIN
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:141
SDL_ECC_BUS_SAFETY_MSS_getSecErrorStatus
int32_t SDL_ECC_BUS_SAFETY_MSS_getSecErrorStatus(uint32_t busSftyNode, uint32_t *status)
This API is used to get SEC error Status on MSS.
SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S::busSftyErrStatWrResp
uint32_t busSftyErrStatWrResp
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:115
SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S::busSftyErrStatRd
uint32_t busSftyErrStatRd
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:113
SDL_ECC_BUS_SAFETY_DSS_secExecute
int32_t SDL_ECC_BUS_SAFETY_DSS_secExecute(uint32_t busSftyNode, uint32_t addr, uint32_t wr_data)
This API is used for SEC test on DSS.
SDL_ECC_BUS_SAFETY_MAIN_WRITE_INTERFACE
@ SDL_ECC_BUS_SAFETY_MAIN_WRITE_INTERFACE
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:149
SDL_ECC_BUS_SAFETY_busSftyFiRedType
SDL_ECC_BUS_SAFETY_busSftyFiRedType
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:147
SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S::nodeStartAddr
uint32_t nodeStartAddr
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:99
SDL_ECC_BUS_SAFETY_FI_GLOBAL_SAFE
@ SDL_ECC_BUS_SAFETY_FI_GLOBAL_SAFE
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:142
SDL_ECC_BUS_SAFETY_MSS_readStaticRegs
int32_t SDL_ECC_BUS_SAFETY_MSS_readStaticRegs(uint32_t busSftyNode, SDL_ECC_BUS_SAFETY_staticRegs *pStaticRegs)
This API is used to get MSS static register values.
SDL_ECC_BUS_SAFETY_DSS_getRedErrorStatus
int32_t SDL_ECC_BUS_SAFETY_DSS_getRedErrorStatus(uint32_t busSftyNode, uint32_t *status)
This API is used to get RED error Status on DSS.
SDL_ECC_BUS_SAFETY_DSS_readStaticRegs
int32_t SDL_ECC_BUS_SAFETY_DSS_readStaticRegs(uint32_t busSftyNode, SDL_ECC_BUS_SAFETY_staticRegs *pStaticRegs)
This API is used to get DSS static register values.
SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S::busSftyErrStatCmd
uint32_t busSftyErrStatCmd
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:109
SDL_ECC_BUS_SAFETY_MSS_getDedErrorStatus
int32_t SDL_ECC_BUS_SAFETY_MSS_getDedErrorStatus(uint32_t busSftyNode, uint32_t *status)
This API is used to get DED error Status on MSS.
SDL_ECC_BUS_SAFETY_FI_MAIN
@ SDL_ECC_BUS_SAFETY_FI_MAIN
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:139
SDL_ECC_BUS_SAFETY_DSS_dedErrorClear
int32_t SDL_ECC_BUS_SAFETY_DSS_dedErrorClear(uint32_t busSftyNode)
This API is used to clear DED error on DSS.
SDL_ECC_BUS_SAFETY_staticRegs
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:120
SDL_ECC_BUS_SAFETY_busSftyFiType
SDL_ECC_BUS_SAFETY_busSftyFiType
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:138
SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S::baseAddr
uint32_t baseAddr
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:97
SDL_ECC_BUS_SAFETY_MAIN_CMD_INTERFACE
@ SDL_ECC_BUS_SAFETY_MAIN_CMD_INTERFACE
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:148
SDL_ECC_BUS_SAFETY_MSS_getRedErrorStatus
int32_t SDL_ECC_BUS_SAFETY_MSS_getRedErrorStatus(uint32_t busSftyNode, uint32_t *status)
This API is used to get RED error Status on MSS.
SDL_ECC_BUS_SAFETY_MAIN_WRITE_STATUS_INTERFACE
@ SDL_ECC_BUS_SAFETY_MAIN_WRITE_STATUS_INTERFACE
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:150
SDL_ECC_BUS_SAFETY_MSS_dedErrorClear
int32_t SDL_ECC_BUS_SAFETY_MSS_dedErrorClear(uint32_t busSftyNode)
This API is used to clear DED error on MSS.
SDL_ECC_BUS_SAFETY_staticRegs::busSftyCtrl
uint32_t busSftyCtrl
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:124
SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:95
SDL_ECC_BUS_SAFETY_staticRegs::busSftyFi
uint32_t busSftyFi
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:126
SDL_ECC_BUS_SAFETY_DSS_redExecute
int32_t SDL_ECC_BUS_SAFETY_DSS_redExecute(uint32_t busSftyNode, SDL_ECC_BUS_SAFETY_busSftyFiType fiType, SDL_ECC_BUS_SAFETY_busSftyFiRedType redType)
This API is used for RED test on DSS.
SDL_ECC_BUS_SAFETY_MAIN_READ_INTERFACE
@ SDL_ECC_BUS_SAFETY_MAIN_READ_INTERFACE
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:151
SDL_ECC_BUS_SAFETY_staticRegs::coreSftyCtrl
uint32_t coreSftyCtrl
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:122
SDL_ECC_BUS_SAFETY_DSS_redErrorClear
int32_t SDL_ECC_BUS_SAFETY_DSS_redErrorClear(uint32_t busSftyNode)
This API is used to clear RED error on DSS.
SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S::busSftyErr
uint32_t busSftyErr
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:107
SDL_ECC_BUS_SAFETY_FI_SAFE
@ SDL_ECC_BUS_SAFETY_FI_SAFE
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:140
SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S::busSftyFi
uint32_t busSftyFi
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:105