WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
drv_common.h
浏览该文件的文档.
1
9#ifndef DRV_COMMON_H
10#define DRV_COMMON_H
11
12#include "crypto_type.h"
14#include "hal_common.h"
15
16#ifdef __cplusplus
17#if __cplusplus
18extern "C" {
19#endif /* __cplusplus */
20#endif /* __cplusplus */
21
22/************************************************** common check log start************************************/
23#ifndef drv_crypto_check_param
24#define drv_crypto_check_param(module, cond) do { \
25 crypto_check_param(ERROR_LAYER_DRV, module, cond, ERROR_INVALID_PARAM); \
26} while (0)
27#endif
28
29#ifndef drv_crypto_check_param_null
30#define drv_crypto_check_param_null(module, _val) do { \
31 crypto_check_param_null(ERROR_LAYER_DRV, module, _val); \
32} while (0)
33#endif
34
35#ifndef drv_crypto_pke_check_param
36#define drv_crypto_pke_check_param(cond) do { \
37 drv_crypto_check_param(ERROR_MODULE_PKE, cond); \
38} while (0)
39#endif
40
41#ifndef drv_crypto_pke_check_param_null
42#define drv_crypto_pke_check_param_null(_val) do { \
43 drv_crypto_check_param_null(ERROR_MODULE_PKE, _val); \
44} while (0)
45#endif
46/************************************************** common check log end************************************/
47
52
53typedef void *(*func_malloc)(unsigned int size, crypto_mem_type mem_type);
54typedef void (*func_free)(void *ptr);
55typedef td_phys_addr_t (*func_get_phys_addr)(void *ptr);
56typedef void *(*func_get_virt_addr)(void *ptr);
57typedef td_bool (*func_get_smmu_table_addr)(unsigned long *table, unsigned long *rdaddr, unsigned long *wraddr);
58typedef void *(*func_register_coherent_mem)(void *virt_addr, td_phys_addr_t phys_addr, unsigned int size);
59typedef void (*func_unregister_coherent_mem)(void *virt_addr);
62
74
76
77#ifdef __cplusplus
78#if __cplusplus
79}
80#endif /* __cplusplus */
81#endif /* __cplusplus */
82
83#endif
void(* func_unregister_coherent_mem)(void *virt_addr)
Definition drv_common.h:59
void(* func_free)(void *ptr)
Definition drv_common.h:54
td_bool(* func_get_smmu_table_addr)(unsigned long *table, unsigned long *rdaddr, unsigned long *wraddr)
Definition drv_common.h:57
crypto_mem_type
Definition drv_common.h:48
@ CRYPTO_MEM_TYPE_MMZ
Definition drv_common.h:49
@ CRYPTO_MEM_TYPE_SMMU
Definition drv_common.h:50
void *(* func_register_coherent_mem)(void *virt_addr, td_phys_addr_t phys_addr, unsigned int size)
Definition drv_common.h:58
crypto_cpu_type(* func_get_cpu_type)(void)
Definition drv_common.h:60
void *(* func_get_virt_addr)(void *ptr)
Definition drv_common.h:56
td_s32 drv_cipher_register_func(const crypto_drv_func *drv_func_list)
Definition crypto_drv_common.c:79
td_u32(* func_get_pke_rom_lib_start_addr)(td_void)
Definition drv_common.h:61
td_phys_addr_t(* func_get_phys_addr)(void *ptr)
Definition drv_common.h:55
void *(* func_malloc)(unsigned int size, crypto_mem_type mem_type)
Definition drv_common.h:53
crypto_cpu_type
Definition hal_common.h:41
Definition drv_common.h:63
func_get_pke_rom_lib_start_addr get_pke_rom_lib_start_addr
Definition drv_common.h:72
func_register_coherent_mem register_coherent_mem
Definition drv_common.h:69
func_malloc malloc_coherent
Definition drv_common.h:64
func_get_cpu_type get_cpu_type
Definition drv_common.h:71
func_get_smmu_table_addr get_smmu_table_addr
Definition drv_common.h:68
func_unregister_coherent_mem unregister_coherent_mem
Definition drv_common.h:70
func_get_virt_addr get_virt_addr
Definition drv_common.h:67
func_free free_coherent
Definition drv_common.h:65
func_get_phys_addr get_phys_addr
Definition drv_common.h:66
td_u8 td_bool
Definition td_type.h:50
void td_void
Definition td_type.h:49
unsigned int td_u32
Definition td_type.h:38
int td_s32
Definition td_type.h:44
unsigned int td_phys_addr_t
Definition td_type.h:74