AM263Px MCU+ SDK: sdl_ecc_bus_safety.h Source File

| AM263Px MCU+ SDK 26.00.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 #if defined (SOC_AM261X)
109 /* offset of bus safety Err Status Register */
110 uint32_t busSftyErrStat;
111 #endif
112 /* offset of bus safety Err Stat CMD Register */
113 uint32_t busSftyErrStatCmd;
114 /* offset of bus safety Err Stat Write Register */
115 uint32_t busSftyErrStatWr;
116 /* offset of bus safety Err Stat Read Register */
117 uint32_t busSftyErrStatRd;
118 /* offset of bus safety Err Stat Write Resp Register */
119 uint32_t busSftyErrStatWrResp;
120 }SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S;
121
122
123 typedef struct
124 {
125 /*enable the bus safety for core(mss/dss) */
126 uint32_t coreSftyCtrl;
127 /* offset of bus safety Control Register */
128 uint32_t busSftyCtrl;
129 /* offset of bus safety FI Register */
130 uint32_t busSftyFi;
131 /* offset of bus safety Error Register */
132 }SDL_ECC_BUS_SAFETY_staticRegs;
133
141 typedef enum
142 {
143 SDL_ECC_BUS_SAFETY_FI_MAIN =0,
144 SDL_ECC_BUS_SAFETY_FI_SAFE = 1,
145 SDL_ECC_BUS_SAFETY_FI_GLOBAL_MAIN =2,
146 SDL_ECC_BUS_SAFETY_FI_GLOBAL_SAFE=3,
147 SDL_ECC_BUS_SAFETY_FI_INVALID = 4,
148 } SDL_ECC_BUS_SAFETY_busSftyFiType;
149
150 typedef enum
151 {
152 SDL_ECC_BUS_SAFETY_MAIN_CMD_INTERFACE =0,
153 SDL_ECC_BUS_SAFETY_MAIN_WRITE_INTERFACE =1,
154 SDL_ECC_BUS_SAFETY_MAIN_WRITE_STATUS_INTERFACE=2,
155 SDL_ECC_BUS_SAFETY_MAIN_READ_INTERFACE =3,
156 SDL_ECC_BUS_SAFETY_FI_TYPE_INVALID =4,
157 }SDL_ECC_BUS_SAFETY_busSftyFiRedType;
158
161 /* ========================================================================== */
162 /* Variable Declarations */
163 /* ========================================================================== */
164 /* ========================================================================== */
165 /* Function Declarations */
166 /* ========================================================================== */
167
186 int32_t SDL_ECC_BUS_SAFETY_DSS_secExecute(uint32_t busSftyNode,uint32_t addr, uint32_t wr_data);
187
201 int32_t SDL_ECC_BUS_SAFETY_DSS_dedExecute(uint32_t busSftyNode, uint32_t addr, uint32_t wr_data);
202
216 int32_t SDL_ECC_BUS_SAFETY_DSS_redExecute(uint32_t busSftyNode,\
217 SDL_ECC_BUS_SAFETY_busSftyFiType fiType, SDL_ECC_BUS_SAFETY_busSftyFiRedType redType );
218
219
229 int32_t SDL_ECC_BUS_SAFETY_DSS_secErrorClear(uint32_t busSftyNode);
230
231
242 int32_t SDL_ECC_BUS_SAFETY_DSS_getSecErrorStatus(uint32_t busSftyNode , uint32_t *status);
243
254 int32_t SDL_ECC_BUS_SAFETY_DSS_dedErrorClear(uint32_t busSftyNode);
255
268 int32_t SDL_ECC_BUS_SAFETY_DSS_getDedErrorStatus(uint32_t busSftyNode , uint32_t *status);
269
280 int32_t SDL_ECC_BUS_SAFETY_DSS_redErrorClear(uint32_t busSftyNode);
281
293 int32_t SDL_ECC_BUS_SAFETY_DSS_getRedErrorStatus(uint32_t busSftyNode , uint32_t *status);
294
307 int32_t SDL_ECC_BUS_SAFETY_DSS_readStaticRegs(uint32_t busSftyNode ,\
308 SDL_ECC_BUS_SAFETY_staticRegs *pStaticRegs);
309
323 int32_t SDL_ECC_BUS_SAFETY_MSS_secExecute(uint32_t busSftyNode,uint32_t addr, uint32_t wr_data);
324
338 int32_t SDL_ECC_BUS_SAFETY_MSS_dedExecute(uint32_t busSftyNode, uint32_t addr, uint32_t wr_data);
339
353 int32_t SDL_ECC_BUS_SAFETY_MSS_redExecute(uint32_t busSftyNode,\
354 SDL_ECC_BUS_SAFETY_busSftyFiType fiType, SDL_ECC_BUS_SAFETY_busSftyFiRedType redType );
355
365 int32_t SDL_ECC_BUS_SAFETY_MSS_secErrorClear(uint32_t busSftyNode);
366
367
378 int32_t SDL_ECC_BUS_SAFETY_MSS_getSecErrorStatus(uint32_t busSftyNode , uint32_t *status);
379
390 int32_t SDL_ECC_BUS_SAFETY_MSS_dedErrorClear(uint32_t busSftyNode);
391
404 int32_t SDL_ECC_BUS_SAFETY_MSS_getDedErrorStatus(uint32_t busSftyNode , uint32_t *status);
405
416 int32_t SDL_ECC_BUS_SAFETY_MSS_redErrorClear(uint32_t busSftyNode);
417
429 int32_t SDL_ECC_BUS_SAFETY_MSS_getRedErrorStatus(uint32_t busSftyNode , uint32_t *status);
430
443 int32_t SDL_ECC_BUS_SAFETY_MSS_readStaticRegs(uint32_t busSftyNode ,\
444 SDL_ECC_BUS_SAFETY_staticRegs *pStaticRegs);
445
446
447
454 uint32_t SDL_ECC_BUS_SAFETY_DSS_AWR2944_AWR2943_Detect(void);
455
459 #ifdef _cplusplus
460 }
461 #endif /*extern "C" */
462
463 #endif
SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S::busSftyErrStatWr
uint32_t busSftyErrStatWr
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:115
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:147
SDL_ECC_BUS_SAFETY_FI_TYPE_INVALID
@ SDL_ECC_BUS_SAFETY_FI_TYPE_INVALID
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:156
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:145
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:119
SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S::busSftyErrStatRd
uint32_t busSftyErrStatRd
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:117
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:153
SDL_ECC_BUS_SAFETY_busSftyFiRedType
SDL_ECC_BUS_SAFETY_busSftyFiRedType
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:151
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:146
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:113
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:143
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:124
SDL_ECC_BUS_SAFETY_busSftyFiType
SDL_ECC_BUS_SAFETY_busSftyFiType
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:142
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:152
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:154
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:128
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:130
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:155
SDL_ECC_BUS_SAFETY_staticRegs::coreSftyCtrl
uint32_t coreSftyCtrl
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:126
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:144
SDL_ECC_BUS_SAFETY_Base_Addr_Offset_S::busSftyFi
uint32_t busSftyFi
Definition: ecc_bus_safety/v0/sdl_ecc_bus_safety.h:105