blob: 13b73421670cbe8b23c3303177ac08c4bc73b6fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
|
/*
* Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
* http://www.gnu.org/copyleft/gpl.html
*/
/*!
* @file mxc_rtic.h
*
* @brief The header file for Run-Time Integrity Checker (RTIC) module.
* This file contains all register defines and bit definition of RTIC module.
*
* @ingroup MXC_Security
*/
#ifndef __MXC_RTIC_H__
#define __MXC_RTIC_H__
#include <asm/arch/mxc_security_api.h>
#include <asm/arch/hardware.h>
#include <asm-generic/errno-base.h>
/*
* RTIC status register
*/
#define RTIC_STATUS IO_ADDRESS(RTIC_BASE_ADDR + 0x00)
/*
* RTIC Command Register
*/
#define RTIC_COMMAND IO_ADDRESS(RTIC_BASE_ADDR + 0x04)
/*
* RTIC Control Register
*/
#define RTIC_CONTROL IO_ADDRESS(RTIC_BASE_ADDR + 0x08)
/*
* RTIC Delay Timer/DMA Throttle
*/
#define RTIC_DMA IO_ADDRESS(RTIC_BASE_ADDR + 0x0C)
/*
* RTIC Memory A Address 1
*/
#define RTIC_MEMAADDR1 IO_ADDRESS(RTIC_BASE_ADDR + 0x10)
/*
* RTIC Memory A Length 1
*/
#define RTIC_MEMALEN1 IO_ADDRESS(RTIC_BASE_ADDR + 0x14)
/*
* RTIC Memory A Address 2
*/
#define RTIC_MEMAADDR2 IO_ADDRESS(RTIC_BASE_ADDR + 0x18)
/*
* RTIC Memory A Length 2
*/
#define RTIC_MEMALEN2 IO_ADDRESS(RTIC_BASE_ADDR + 0x1C)
/*
* RTIC Memory B Address 1
*/
#define RTIC_MEMBADDR1 IO_ADDRESS(RTIC_BASE_ADDR + 0x30)
/*
* RTIC Memory B Length 1
*/
#define RTIC_MEMBLEN1 IO_ADDRESS(RTIC_BASE_ADDR + 0x34)
/*
* RTIC Memory B Address 2
*/
#define RTIC_MEMBADDR2 IO_ADDRESS(RTIC_BASE_ADDR + 0x38)
/*
* RTIC Memory B Length 2
*/
#define RTIC_MEMBLEN2 IO_ADDRESS(RTIC_BASE_ADDR + 0x3C)
/*
* RTIC Memory C Address 1
*/
#define RTIC_MEMCADDR1 IO_ADDRESS(RTIC_BASE_ADDR + 0x50)
/*
* RTIC Memory C Length 1
*/
#define RTIC_MEMCLEN1 IO_ADDRESS(RTIC_BASE_ADDR + 0x54)
/*
* RTIC Memery C Address 2
*/
#define RTIC_MEMCADDR2 IO_ADDRESS(RTIC_BASE_ADDR + 0x58)
/*
* RTIC Memory C Length 2
*/
#define RTIC_MEMCLEN2 IO_ADDRESS(RTIC_BASE_ADDR + 0x5C)
/*
* RTIC Memory D Address 1
*/
#define RTIC_MEMDADDR1 IO_ADDRESS(RTIC_BASE_ADDR + 0x70)
/*
* RTIC Memory D Length 1
*/
#define RTIC_MEMDLEN1 IO_ADDRESS(RTIC_BASE_ADDR + 0x74)
/*
* RTIC Memory D Address 2
*/
#define RTIC_MEMDADDR2 IO_ADDRESS(RTIC_BASE_ADDR + 0x78)
/*
* RTIC Memory D Length 2
*/
#define RTIC_MEMDLEN2 IO_ADDRESS(RTIC_BASE_ADDR + 0x7C)
/*
* RTIC Fault address Register.
*/
#define RTIC_FAULTADDR IO_ADDRESS(RTIC_BASE_ADDR + 0x90)
/*
* RTIC Watchdog Timeout
*/
#define RTIC_WDTIMER IO_ADDRESS(RTIC_BASE_ADDR + 0x94)
/*
* RTIC Memory A Hash Result Word A
*/
#define RTIC_MEMAHASHRES0 IO_ADDRESS(RTIC_BASE_ADDR + 0xA0)
/*
* RTIC Memory B Hash Result Word A
*/
#define RTIC_MEMBHASHRES0 IO_ADDRESS(RTIC_BASE_ADDR + 0xC0)
/*
* RTIC Memory C Hash Result Word A
*/
#define RTIC_MEMCHASHRES0 IO_ADDRESS(RTIC_BASE_ADDR + 0xE0)
/*
* RTIC Memory D Hash Result Word A
*/
#define RTIC_MEMDHASHRES0 IO_ADDRESS(RTIC_BASE_ADDR + 0x100)
/*
* RTIC Memory Integrity Status
*/
#define RTIC_STAT_MEMBLK 0x100
/*
* RTIC Address Error
*/
#define RTIC_STAT_ADDR_ERR 0x200
/*
* RTIC Length Error
*/
#define RTIC_STAT_LEN_ERR 0x400
/*
* RTIC Clear Interrupts command
*/
#define RTIC_CMD_CLRIRQ 0x01
/*
* RTIC SW reset command
*/
#define RTIC_CMD_SW_RESET 0x02
/*
* RTIC Hash Once command
*/
#define RTIC_CMD_HASH_ONCE 0x04
/*
* RTIC Run Time Check Command
*/
#define RTIC_CMD_RUN_TIME_CHK 0x08
/*
* RTIC IRQ EN
*/
#define RTIC_CTL_IRQ_EN 0x01
/*
* RTIC Hash ALGO 256 Memory block A enable
*/
#define RTIC_CTL_HASHALGO_MEMA_BLK_EN 0x1000
/*
* RTIC Hash ALGO 256 Memory block B Enable
*/
#define RTIC_CTL_HASHALGO_MEMB_BLK_EN 0x2000
/*
* RTIC Hash ALGO 256 Memory block C Enable
*/
#define RTIC_CTL_HASHALGO_MEMC_BLK_EN 0x4000
/*
* RTIC Hash ALGO 256 Memory block D Enable
*/
#define RTIC_CTL_HASHALGO_MEMD_BLK_EN 0x8000
/*
* RTIC Hash Once Memory block A enable
*/
#define RTIC_CTL_HASHONCE_MEMA_BLK_EN 0x10
/*
* RTIC Hash Once Memory block B Enable
*/
#define RTIC_CTL_HASHONCE_MEMB_BLK_EN 0x20
/*
* RTIC Hash Once Memory block C Enable
*/
#define RTIC_CTL_HASHONCE_MEMC_BLK_EN 0x40
/*
* RTIC Hash Once Memory block D Enable
*/
#define RTIC_CTL_HASHONCE_MEMD_BLK_EN 0x80
/*
* RTIC Run Time Memory blk A Enable
*/
#define RTIC_CTL_RUNTIME_MEMA_BLK_EN 0x100
/*
* RTIC Run Time Memory blk B Enable
*/
#define RTIC_CTL_RUNTIME_MEMB_BLK_EN 0x200
/*
* RTIC Run Time Memory blk C Enable
*/
#define RTIC_CTL_RUNTIME_MEMC_BLK_EN 0x400
/*
* RTIC Run Time Memory blk D Enable
*/
#define RTIC_CTL_RUNTIME_MEMD_BLK_EN 0x800
/*!
* Maximum block length that can be configured to the RTIC module.
*/
#define RTIC_MAX_BLOCK_LENGTH 0xFFFFFFFC
/*!
* This define is used to clear DMA Burst in RTIC Control register.
*/
#define DMA_BURST_CLR 0xE
//#ifndef CONFIG_ARCH_MX27
/*!
* This define will clear Hash Once DMA Throttle Programmable timer.
*/
#define HASH_ONCE_DMA_THROTTLE_CLR (0xFF << 16)
//#endif /* CONFIG_ARCH_MX27 */
/*!
* This define is used to configure DMA Burst read as 1 word.
*/
#define DMA_1_WORD 0x00
/*!
* This define is used to configure DMA Burst read as 2 words.
*/
#define DMA_2_WORD 0x02
/*!
* This define is used to configure DMA Burst read as 4 words.
*/
#define DMA_4_WORD 0x04
/*!
* This define is used to configure DMA Burst read as 8 words.
*/
#define DMA_8_WORD 0x06
/*!
* This define is used to configure DMA Burst read as 16 words.
*/
#define DMA_16_WORD 0x08
/*!
* This define is used for checking RTIC is busy or not.
*/
#define RTIC_BUSY 0x01
#ifndef CONFIG_ARCH_MX27
/*!
* This define is used for checking RUN Time Disable bit is set or not.
*/
#define RTIC_RUN_TIME_DISABLE 0x10
#endif /* CONFIG_ARCH_MX27 */
/*!
* This define is used to check Done bit set in RTIC Status register.
*/
#define RTIC_DONE 0x02
#endif /* __MXC_RTIC_H__ */
|