• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  * Description: security_unified init header file.
15  *
16  * Create: 2023-03-29
17 */
18 
19 #ifndef SECURITY_INIT_H
20 #define SECURITY_INIT_H
21 
22 #ifdef __cplusplus
23 #if __cplusplus
24 extern "C" {
25 #endif
26 #endif
27 
28 /**
29  * @defgroup security_unified_env_init env_init
30  * @ingroup  drivers_driver_security_unified
31  * @{
32  */
33 
34 /**
35  * @if Eng
36  * @brief  security_unified initialization, called by system initialize.
37  * @else
38  * @brief  安全驱动模块初始化,系统起来跑安全相关业务前调用,不需要用户调用。
39  * @endif
40  */
41 void uapi_drv_cipher_env_init(void);
42 
43 /**
44  * @if Eng
45  * @brief  security_unified deinitialization, called by system deinitialize.
46  * @else
47  * @brief  安全驱动模块去初始化,系统深睡前调用,不需要用户调用。
48  * @endif
49  */
50 void uapi_drv_cipher_env_deinit(void);
51 
52 /**
53  * @if Eng
54  * @brief  security_unified initialization, called by system wakeup resume function.
55  * @else
56  * @brief  安全驱动模块初始化,系统深睡唤醒时调用,不需要用户调用。
57  * @endif
58  */
59 void uapi_drv_cipher_env_resume(void);
60 
61 /**
62  * @if Eng
63  * @brief  security_unified deinitialization, called by system deepsleep suspend function.
64  * @else
65  * @brief  安全驱动模块去初始化,系统深睡前调用,不需要用户调用。
66  * @endif
67  */
68 void uapi_drv_cipher_env_suspend(void);
69 
70 /**
71  * @if Eng
72  * @brief  The interrupt mode of the safety drive module is deactivated,
73     and the interrupt of the safety drive must be deactivated in the NMI.
74  * @else
75  * @brief  安全驱动模块关闭中断模式,在 NMI 中要关闭安全驱动的中断。
76  * @endif
77  */
78 void uapi_drv_cipher_wait_func_disable_all(void);
79 
80 /**
81  * @if Eng
82  * @brief  The safety driver module turns on interrupt mode. Interrupts are on by default.
83  * @else
84  * @brief  安全驱动模块打开中断模式。默认情况中断是打开的。
85  * @endif
86  */
87 void uapi_drv_cipher_wait_func_enable_all(void);
88 
89 /**
90  * @}
91  */
92 
93 #ifdef __cplusplus
94 #if __cplusplus
95 }
96 #endif
97 #endif
98 
99 #endif  /* SECURITY_INIT_H */