AM62x MCU+ SDK  10.00.00
safety_checkers_rm.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2024 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 
57 #ifndef SAFETY_CHECKERS_RM_H_
58 #define SAFETY_CHECKERS_RM_H_
59 
60 /* ========================================================================== */
61 /* Include Files */
62 /* ========================================================================== */
63 
64 /* None */
65 
66 #ifdef __cplusplus
67 extern "C" {
68 #endif
69 
77 /* ========================================================================== */
78 /* Macros & Typedefs */
79 /* ========================================================================== */
80 
82 #define SAFETY_CHECKERS_RM_MAX_REG_PER_GROUP (20U)
83 
86 /* ========================================================================== */
87 /* Global Variables */
88 /* ========================================================================== */
89 
90 /* None */
91 
99 /* ========================================================================== */
100 /* Structure Declarations */
101 /* ========================================================================== */
102 
109 typedef struct
110 {
111  /* Base address of register region */
112  uint32_t baseAddr;
113  /* Number of different registers in a memory region */
114  uint32_t regNum;
115  /* Total number of registers in a register group */
116  uint32_t regArrayLen;
117  /* Start address of register group */
118  uint32_t regStartOffset;
119  /* Block Offset Value for register group */
120  uint32_t regOffsetArr [SAFETY_CHECKERS_RM_MAX_REG_PER_GROUP];
122 
125 /* ========================================================================== */
126 /* Internal/Private Function Declarations */
127 /* ========================================================================== */
128 
129 /* None */
130 
138 /* ========================================================================== */
139 /* Function Declarations */
140 /* ========================================================================== */
141 
158 int32_t SafetyCheckers_rmGetRegCfg(uintptr_t *rmRegCfg, uint32_t size);
159 
174 int32_t SafetyCheckers_rmVerifyRegCfg(const uintptr_t *rmRegCfg, uint32_t size);
175 
178 /* ========================================================================== */
179 /* Static Function Definitions */
180 /* ========================================================================== */
181 
182 /* None */
183 
184 #ifdef __cplusplus
185 }
186 #endif
187 
188 #endif /* #ifndef SAFETY_CHECKERS_RM_H_ */
189 
SafetyCheckers_RmRegData::regStartOffset
uint32_t regStartOffset
Definition: safety_checkers_rm.h:118
size
uint16_t size
Definition: tisci_boardcfg.h:1
SafetyCheckers_RmRegData::baseAddr
uint32_t baseAddr
Definition: safety_checkers_rm.h:112
SafetyCheckers_RmRegData::regNum
uint32_t regNum
Definition: safety_checkers_rm.h:114
SafetyCheckers_rmGetRegCfg
int32_t SafetyCheckers_rmGetRegCfg(uintptr_t *rmRegCfg, uint32_t size)
API to get the register value for all the RM control modules E.g. When the RM register configuration ...
SafetyCheckers_RmRegData
Structure to hold the base address and the register details of RM control module registers.
Definition: safety_checkers_rm.h:110
SafetyCheckers_rmVerifyRegCfg
int32_t SafetyCheckers_rmVerifyRegCfg(const uintptr_t *rmRegCfg, uint32_t size)
API to read back and compare the RM control module registers data E.g. When the RM verify register ...
SafetyCheckers_RmRegData::regArrayLen
uint32_t regArrayLen
Definition: safety_checkers_rm.h:116
SAFETY_CHECKERS_RM_MAX_REG_PER_GROUP
#define SAFETY_CHECKERS_RM_MAX_REG_PER_GROUP
Maximum number of registers in a register group.
Definition: safety_checkers_rm.h:82