WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
hal_keyslot_reg.h
浏览该文件的文档.
1
9#ifndef HAL_KEYSLOT_REG_H
10#define HAL_KEYSLOT_REG_H
11
12#define KS_CPU_LOCK 1
13#define KS_CPU_UNLOCK 0
14
15#define KCTRL_REG_OFFSET (0x00001000)
16
17#define KC_TEECPU_LOCK_CMD (KCTRL_REG_OFFSET + 0xB00)
18#define KC_REECPU_LOCK_CMD (KCTRL_REG_OFFSET + 0xB04)
19#define KC_PCPU_LOCK_CMD (KCTRL_REG_OFFSET + 0xB08)
20#define KC_AIDSP_LOCK_CMD (KCTRL_REG_OFFSET + 0xB0c)
21#define KC_TEECPU_FLUSH_BUSY (KCTRL_REG_OFFSET + 0xB10)
22#define KC_REECPU_FLUSH_BUSY (KCTRL_REG_OFFSET + 0xB14)
23#define KC_PCPU_FLUSH_BUSY (KCTRL_REG_OFFSET + 0xB18)
24#define KC_AIDSP_FLUSH_BUSY (KCTRL_REG_OFFSET + 0xB1c)
25#define KC_RD_SLOT_NUM (KCTRL_REG_OFFSET + 0xB30)
26#define KC_RD_LOCK_STATUS (KCTRL_REG_OFFSET + 0xB34)
27
28#define NOCPU_LOCK_KEYSLOT 0x0
29#define REECPU_LOCK_KEYSLOT 0x01
30#define TEECPU_LOCK_KEYSLOT 0x10
31#define AIDSP_LOCK_KEYSLOT 0x110
32#define PCPU_LOCK_KEYSLOT 0x100
33
42
43/* define the union u_kc_cpu_lock_cmd */
44typedef union {
45 struct {
46 unsigned int key_slot_num : 10; /* [9..0] */
47 unsigned int reserved_0 : 5; /* [14..10] */
48 unsigned int flush_hmac_kslot_ind : 1; /* [15] */
49 unsigned int tscipher_ind : 1; /* [16] */
50 unsigned int reserved_1 : 3; /* [19..17] */
51 unsigned int lock_cmd : 1; /* [20] */
52 unsigned int reserved_2 : 11; /* [31..21] */
53 } bits;
54 unsigned int u32;
56
57/* define the union u_kc_teecpu_lock_cmd */
58typedef union {
59 struct {
60 unsigned int tee_key_slot_num : 10; /* [9..0] */
61 unsigned int reserved_0 : 5; /* [14..10] */
62 unsigned int tee_flush_hmac_kslot_ind : 1; /* [15] */
63 unsigned int tee_tscipher_ind : 1; /* [16] */
64 unsigned int reserved_1 : 3; /* [19..17] */
65 unsigned int tee_lock_cmd : 1; /* [20] */
66 unsigned int reserved_2 : 11; /* [31..21] */
67 } bits;
68 unsigned int u32;
70
71/* define the union u_kc_reecpu_lock_cmd */
72typedef union {
73 struct {
74 unsigned int ree_key_slot_num : 10; /* [9..0] */
75 unsigned int reserved_0 : 5; /* [14..10] */
76 unsigned int ree_flush_hmac_kslot_ind : 1; /* [15] */
77 unsigned int ree_tscipher_ind : 1; /* [16] */
78 unsigned int reserved_1 : 3; /* [19..17] */
79 unsigned int ree_lock_cmd : 1; /* [20] */
80 unsigned int reserved_2 : 11; /* [31..21] */
81 } bits;
82 unsigned int u32;
84
85/* define the union u_kc_pcpu_lock_cmd */
86typedef union {
87 struct {
88 unsigned int pcpu_key_slot_num : 10; /* [9..0] */
89 unsigned int reserved_0 : 5; /* [14..10] */
90 unsigned int pcpu_flush_hmac_kslot_ind : 1; /* [15] */
91 unsigned int pcpu_tscipher_ind : 1; /* [16] */
92 unsigned int reserved_1 : 3; /* [19..17] */
93 unsigned int pcpu_lock_cmd : 1; /* [20] */
94 unsigned int reserved_2 : 11; /* [31..21] */
95 } bits;
96 unsigned int u32;
98
99/* define the union u_kc_aidsp_lock_cmd */
100typedef union {
101 struct {
102 unsigned int aidsp_key_slot_num : 10; /* [9..0] */
103 unsigned int reserved_0 : 5; /* [14..10] */
104 unsigned int aidsp_flush_hmac_kslot_ind : 1; /* [15] */
105 unsigned int aidsp_tscipher_ind : 1; /* [16] */
106 unsigned int reserved_1 : 3; /* [19..17] */
107 unsigned int aidsp_lock_cmd : 1; /* [20] */
108 unsigned int reserved_2 : 11; /* [31..21] */
109 } bits;
110 unsigned int u32;
112
113/* define the union kc_flush_busy */
114typedef union {
115 struct {
116 unsigned int flush_busy : 1; /* [0] */
117 unsigned int flush_unlock_fail : 1; /* [1] */
118 unsigned int flush_timeout_err : 1; /* [2] */
119 unsigned int reserved_0 : 29; /* [31..3] */
120 } bits;
121 unsigned int u32;
123
124/* define the union kc_send_dbg */
125typedef union {
126 struct {
127 unsigned int main_fsm_cur : 8; /* [7..0] */
128 unsigned int reserved_1 : 24; /* [31..8] */
129 } bits;
130 unsigned int u32;
132
133/* define the union kc_rob_alarm */
134typedef union {
135 struct {
136 unsigned int kc_rob_alarm : 4; /* [3..0] */
137 unsigned int reserved_0 : 28; /* [31..4] */
138 } bits;
139 unsigned int u32;
141
142/* define the union kc_rd_slot_num */
143typedef union {
144 struct {
145 unsigned int slot_num_cfg : 10; /* [9..0] */
146 unsigned int reserved_0 : 5; /* [14..10] */
147 unsigned int slot_cfg_type : 1; /* [15] */
148 unsigned int tscipher_slot_ind : 1; /* [16] */
149 unsigned int reserved_1 : 15; /* [31..17] */
150 } bits;
151 unsigned int u32;
153
154/* define the union kc_rd_lock_status */
155typedef union {
156 struct {
157 unsigned int rd_lock_status : 3; /* [2..0] */
158 unsigned int reserved_0 : 29; /* [31..3] */
159 } bits;
160 unsigned int u32;
162
163#endif
ks_slot_stat
Definition hal_keyslot_reg.h:34
@ KS_STAT_PCPU_LOCK
Definition hal_keyslot_reg.h:38
@ KS_STAT_MAX
Definition hal_keyslot_reg.h:40
@ KS_STAT_REE_LOCK
Definition hal_keyslot_reg.h:36
@ KS_STAT_TEE_LOCK
Definition hal_keyslot_reg.h:37
@ KS_STAT_UN_LOCK
Definition hal_keyslot_reg.h:35
@ KS_STAT_AIDSP_LOCK
Definition hal_keyslot_reg.h:39
Definition hal_keyslot_reg.h:100
unsigned int reserved_2
Definition hal_keyslot_reg.h:108
unsigned int aidsp_tscipher_ind
Definition hal_keyslot_reg.h:105
unsigned int aidsp_flush_hmac_kslot_ind
Definition hal_keyslot_reg.h:104
unsigned int u32
Definition hal_keyslot_reg.h:110
unsigned int reserved_1
Definition hal_keyslot_reg.h:106
unsigned int aidsp_lock_cmd
Definition hal_keyslot_reg.h:107
unsigned int aidsp_key_slot_num
Definition hal_keyslot_reg.h:102
unsigned int reserved_0
Definition hal_keyslot_reg.h:103
Definition hal_keyslot_reg.h:44
unsigned int reserved_2
Definition hal_keyslot_reg.h:52
unsigned int u32
Definition hal_keyslot_reg.h:54
unsigned int tscipher_ind
Definition hal_keyslot_reg.h:49
unsigned int reserved_1
Definition hal_keyslot_reg.h:50
unsigned int reserved_0
Definition hal_keyslot_reg.h:47
unsigned int key_slot_num
Definition hal_keyslot_reg.h:46
unsigned int flush_hmac_kslot_ind
Definition hal_keyslot_reg.h:48
unsigned int lock_cmd
Definition hal_keyslot_reg.h:51
Definition hal_keyslot_reg.h:114
unsigned int flush_unlock_fail
Definition hal_keyslot_reg.h:117
unsigned int flush_timeout_err
Definition hal_keyslot_reg.h:118
unsigned int flush_busy
Definition hal_keyslot_reg.h:116
unsigned int u32
Definition hal_keyslot_reg.h:121
unsigned int reserved_0
Definition hal_keyslot_reg.h:119
Definition hal_keyslot_reg.h:86
unsigned int pcpu_lock_cmd
Definition hal_keyslot_reg.h:93
unsigned int pcpu_key_slot_num
Definition hal_keyslot_reg.h:88
unsigned int reserved_0
Definition hal_keyslot_reg.h:89
unsigned int reserved_2
Definition hal_keyslot_reg.h:94
unsigned int u32
Definition hal_keyslot_reg.h:96
unsigned int pcpu_tscipher_ind
Definition hal_keyslot_reg.h:91
unsigned int reserved_1
Definition hal_keyslot_reg.h:92
unsigned int pcpu_flush_hmac_kslot_ind
Definition hal_keyslot_reg.h:90
Definition hal_keyslot_reg.h:155
unsigned int rd_lock_status
Definition hal_keyslot_reg.h:157
unsigned int reserved_0
Definition hal_keyslot_reg.h:158
unsigned int u32
Definition hal_keyslot_reg.h:160
Definition hal_keyslot_reg.h:143
unsigned int slot_num_cfg
Definition hal_keyslot_reg.h:145
unsigned int tscipher_slot_ind
Definition hal_keyslot_reg.h:148
unsigned int reserved_0
Definition hal_keyslot_reg.h:146
unsigned int reserved_1
Definition hal_keyslot_reg.h:149
unsigned int u32
Definition hal_keyslot_reg.h:151
unsigned int slot_cfg_type
Definition hal_keyslot_reg.h:147
Definition hal_keyslot_reg.h:72
unsigned int ree_key_slot_num
Definition hal_keyslot_reg.h:74
unsigned int ree_tscipher_ind
Definition hal_keyslot_reg.h:77
unsigned int reserved_0
Definition hal_keyslot_reg.h:75
unsigned int reserved_2
Definition hal_keyslot_reg.h:80
unsigned int ree_flush_hmac_kslot_ind
Definition hal_keyslot_reg.h:76
unsigned int u32
Definition hal_keyslot_reg.h:82
unsigned int ree_lock_cmd
Definition hal_keyslot_reg.h:79
unsigned int reserved_1
Definition hal_keyslot_reg.h:78
Definition hal_keyslot_reg.h:134
unsigned int kc_rob_alarm
Definition hal_keyslot_reg.h:136
unsigned int reserved_0
Definition hal_keyslot_reg.h:137
unsigned int u32
Definition hal_keyslot_reg.h:139
Definition hal_keyslot_reg.h:125
unsigned int u32
Definition hal_keyslot_reg.h:130
unsigned int reserved_1
Definition hal_keyslot_reg.h:128
unsigned int main_fsm_cur
Definition hal_keyslot_reg.h:127
Definition hal_keyslot_reg.h:58
unsigned int reserved_1
Definition hal_keyslot_reg.h:64
unsigned int tee_flush_hmac_kslot_ind
Definition hal_keyslot_reg.h:62
unsigned int reserved_0
Definition hal_keyslot_reg.h:61
unsigned int reserved_2
Definition hal_keyslot_reg.h:66
unsigned int tee_tscipher_ind
Definition hal_keyslot_reg.h:63
unsigned int tee_lock_cmd
Definition hal_keyslot_reg.h:65
unsigned int u32
Definition hal_keyslot_reg.h:68
unsigned int tee_key_slot_num
Definition hal_keyslot_reg.h:60