RTEMS 6.1-rc1
fsl_key_manager.h
1/*
2 * Copyright 2020-2021, NXP
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8#ifndef _FSL_KEYMGR_H_
9#define _FSL_KEYMGR_H_
10
11#include "fsl_common.h"
12
18/*******************************************************************************
19 * Definitions
20 ******************************************************************************/
21
39#define FSL_KEYMGR_DRIVER_VERSION (MAKE_VERSION(2, 0, 2))
42typedef enum _keymgr_lock
43{
44 kKEYMGR_Unlock = 0u,
45 kKEYMGR_Lock = 1u,
46} keymgr_lock_t;
47
48typedef enum _keymgr_allow
49{
50 kKEYMGR_Disallow = 0u,
51 kKEYMGR_Allow = 1u,
52} keymgr_allow_t;
53
54typedef enum _keymgr_slot
55{
56 kKEYMGR_Slot0 = 0u,
57 kKEYMGR_Slot1 = 1u,
58 kKEYMGR_Slot2 = 2u,
59 kKEYMGR_Slot3 = 3u,
60 kKEYMGR_Slot4 = 4u,
61} keymgr_slot_t;
62
63#define KEYMGR_IEE_RELOAD 1u
64#define KEYMGR_SEL_OCOTP 0u
65#define KEYMGR_SEL_UDF 0u
66#define KEYMGR_SEL_PUF 1u
67
68#define keymgr_select_t uint8_t
69
71typedef struct _domain_slot_config
72{
73 keymgr_lock_t lockControl;
74 keymgr_allow_t allowUser;
75 keymgr_allow_t allowNonSecure;
76 keymgr_lock_t lockList;
77 uint8_t whiteList;
80
81/*******************************************************************************
82 * API
83 ******************************************************************************/
84#if defined(__cplusplus)
85extern "C" {
86#endif
87
98status_t KEYMGR_MasterKeyControll(KEY_MANAGER_Type *base, keymgr_select_t select, keymgr_lock_t lock);
99
110status_t KEYMGR_OTFAD1KeyControll(KEY_MANAGER_Type *base, keymgr_select_t select, keymgr_lock_t lock);
111
122status_t KEYMGR_OTFAD2KeyControll(KEY_MANAGER_Type *base, keymgr_select_t select, keymgr_lock_t lock);
123
132
141void KEYMGR_PUFKeyLock(KEY_MANAGER_Type *base, keymgr_lock_t lock);
142
154
162void KEYMGR_Init(KEY_MANAGER_Type *base);
163
172
173#if defined(__cplusplus)
174}
175#endif
176
181#endif /* _FSL_IEE_H_ */
keymgr_allow_t allowNonSecure
Definition: fsl_key_manager.h:75
keymgr_lock_t lockControl
Definition: fsl_key_manager.h:73
status_t KEYMGR_GetDefaultConfig(domain_slot_config_t *config)
Sets the default configuration of Key manager slot.
Definition: fsl_key_manager.c:136
void KEYMGR_Init(KEY_MANAGER_Type *base)
Resets Key Manager module to factory default values.
Definition: fsl_key_manager.c:213
keymgr_allow_t allowUser
Definition: fsl_key_manager.h:74
struct _domain_slot_config domain_slot_config_t
Key Manager slot configuration structure.
status_t KEYMGR_OTFAD2KeyControll(KEY_MANAGER_Type *base, keymgr_select_t select, keymgr_lock_t lock)
Configures OTFAD2 key settings.
Definition: fsl_key_manager.c:89
status_t KEYMGR_OTFAD1KeyControll(KEY_MANAGER_Type *base, keymgr_select_t select, keymgr_lock_t lock)
Configures OTFAD1 key settings.
Definition: fsl_key_manager.c:63
void KEYMGR_PUFKeyLock(KEY_MANAGER_Type *base, keymgr_lock_t lock)
Lock the key select from PUF.
Definition: fsl_key_manager.c:124
status_t KEYMGR_MasterKeyControll(KEY_MANAGER_Type *base, keymgr_select_t select, keymgr_lock_t lock)
Configures Master key settings.
Definition: fsl_key_manager.c:37
uint8_t whiteList
Definition: fsl_key_manager.h:77
status_t KEYMGR_SlotControl(KEY_MANAGER_Type *base, domain_slot_config_t *config, keymgr_slot_t slot)
Configures Slot Domain control.
Definition: fsl_key_manager.c:161
keymgr_lock_t lockList
Definition: fsl_key_manager.h:76
void KEYMGR_IEEKeyReload(KEY_MANAGER_Type *base)
Restart load key signal for IEE.
Definition: fsl_key_manager.c:112
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
Definition: MIMXRT1166_cm4.h:55329
Key Manager slot configuration structure.
Definition: fsl_key_manager.h:72
Definition: deflate.c:114