RTEMS 6.1-rc2
Loading...
Searching...
No Matches
fsl_iee.h
1/*
2 * Copyright (c) 2016, Freescale Semiconductor, Inc.
3 * Copyright 2017-2021 NXP
4 * All rights reserved.
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
9#ifndef _FSL_IEE_H_
10#define _FSL_IEE_H_
11
12#include "fsl_common.h"
13
19/*******************************************************************************
20 * Definitions
21 ******************************************************************************/
22
37#define FSL_IEE_DRIVER_VERSION (MAKE_VERSION(2, 1, 1))
41typedef enum _iee_region
42{
50 kIEE_Region7 = 7U
52
54typedef enum _iee_aes_bypass
55{
57 kIEE_AesBypass = 1U
59
61typedef enum _iee_aes_mode
62{
69
72{
76
78typedef enum _iee_aes_key_num
79{
81 kIEE_AesKey2 = 2U
83
85typedef struct _iee_config
86{
90 uint32_t pageOffset;
92
93/*******************************************************************************
94 * API
95 ******************************************************************************/
96#if defined(__cplusplus)
97extern "C" {
98#endif
99
107void IEE_Init(IEE_Type *base);
108
123
134
147 IEE_Type *base, iee_region_t region, iee_aes_key_num_t keyNum, const uint8_t *key, size_t keySize);
148
157static inline uint32_t IEE_GetOffset(uint32_t addressIee, uint32_t addressMemory)
158{
159 return (addressMemory - addressIee) >> 12;
160}
161
171void IEE_LockRegionConfig(IEE_Type *base, iee_region_t region);
172
173#if defined(__cplusplus)
174}
175#endif
176
181#endif /* _FSL_IEE_H_ */
void IEE_SetRegionConfig(IEE_Type *base, iee_region_t region, iee_config_t *config)
Sets the IEE module according to the configuration structure.
Definition: fsl_iee.c:78
_iee_aes_key_size
IEE AES key size.
Definition: fsl_iee.h:72
struct _iee_config iee_config_t
IEE configuration structure.
void IEE_LockRegionConfig(IEE_Type *base, iee_region_t region)
Lock the IEE region configuration.
Definition: fsl_iee.c:138
uint32_t pageOffset
Definition: fsl_iee.h:90
iee_aes_key_size_t keySize
Definition: fsl_iee.h:89
status_t IEE_SetRegionKey(IEE_Type *base, iee_region_t region, iee_aes_key_num_t keyNum, const uint8_t *key, size_t keySize)
Sets the IEE module key.
Definition: fsl_iee.c:98
enum _iee_aes_mode iee_aes_mode_t
IEE AES mode.
_iee_region
IEE region.
Definition: fsl_iee.h:42
iee_aes_mode_t mode
Definition: fsl_iee.h:88
iee_aes_bypass_t bypass
Definition: fsl_iee.h:87
enum _iee_region iee_region_t
IEE region.
void IEE_Init(IEE_Type *base)
Resets IEE module to factory default values.
Definition: fsl_iee.c:34
_iee_aes_key_num
IEE AES ke number.
Definition: fsl_iee.h:79
enum _iee_aes_key_num iee_aes_key_num_t
IEE AES ke number.
_iee_aes_bypass
IEE AES enablement/bypass.
Definition: fsl_iee.h:55
enum _iee_aes_bypass iee_aes_bypass_t
IEE AES enablement/bypass.
_iee_aes_mode
IEE AES mode.
Definition: fsl_iee.h:62
enum _iee_aes_key_size iee_aes_key_size_t
IEE AES key size.
void IEE_GetDefaultConfig(iee_config_t *config)
Loads default values to the IEE configuration structure.
Definition: fsl_iee.c:58
@ kIEE_AesCTR256XTS512
Definition: fsl_iee.h:74
@ kIEE_AesCTR128XTS256
Definition: fsl_iee.h:73
@ kIEE_Region6
Definition: fsl_iee.h:49
@ kIEE_Region5
Definition: fsl_iee.h:48
@ kIEE_Region1
Definition: fsl_iee.h:44
@ kIEE_Region2
Definition: fsl_iee.h:45
@ kIEE_Region3
Definition: fsl_iee.h:46
@ kIEE_Region4
Definition: fsl_iee.h:47
@ kIEE_Region0
Definition: fsl_iee.h:43
@ kIEE_Region7
Definition: fsl_iee.h:50
@ kIEE_AesKey1
Definition: fsl_iee.h:80
@ kIEE_AesKey2
Definition: fsl_iee.h:81
@ kIEE_AesUseMdField
Definition: fsl_iee.h:56
@ kIEE_AesBypass
Definition: fsl_iee.h:57
@ kIEE_ModeAesCTRWAddress
Definition: fsl_iee.h:65
@ kIEE_ModeAesXTS
Definition: fsl_iee.h:64
@ kIEE_ModeAesCTRWOAddress
Definition: fsl_iee.h:66
@ kIEE_ModeAesCTRkeystream
Definition: fsl_iee.h:67
@ kIEE_ModeNone
Definition: fsl_iee.h:63
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
Definition: MIMXRT1166_cm4.h:45581
IEE configuration structure.
Definition: fsl_iee.h:86
Definition: deflate.c:114