WS63 SDK 文档
7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
crypto_osal_lib.h
浏览该文件的文档.
1
8
#ifndef CRYPTO_OSAL_LIB_H
9
#define CRYPTO_OSAL_LIB_H
10
11
#include "
securec.h
"
12
13
#include "
crypto_security.h
"
14
#include "
security_unified_porting.h
"
15
#include "
crypto_common_macro.h
"
16
#include "boot_delay.h"
17
#include "
tcxo.h
"
18
19
typedef
void
crypto_wait_t
;
20
21
void
crypto_boot_debug_message
(
const
char
*fmt, ...);
22
23
#if defined(ROMBOOT_DEBUG_ON)
24
#define crypto_print(fmt, ...) crypto_boot_debug_message(fmt, ##__VA_ARGS__)
25
#else
26
#define crypto_print(fmt, ...)
27
#endif
28
29
#define crypto_getpid() 0
30
31
#define CRYPTO_COPY_XXX_USER_DEF
32
33
#define crypto_ioremap_nocache(addr, size) (void *)(addr)
34
#define crypto_iounmap(virt_addr, size)
35
36
/* Register Read&Write. */
37
#define crypto_ex_reg_write(addr, val) do { \
38
(*(volatile td_u32 *)(uintptr_t)(addr) = (val)); \
39
__asm__ __volatile__("fence"); \
40
} while (0)
41
42
#define crypto_ex_reg_write_u16(addr, val) do { \
43
(*(volatile td_u16 *)(uintptr_t)(addr) = (val)); \
44
__asm__ __volatile__("fence"); \
45
} while (0)
46
47
#define spacc_reg_read(offset) crypto_reg_read(SPACC_REG_BASE_ADDR + (offset))
48
#define spacc_reg_write(offset, value) crypto_ex_reg_write(SPACC_REG_BASE_ADDR + (offset), value)
49
50
#define pke_reg_read(offset) crypto_reg_read(PKE_REG_BASE_ADDR + (offset))
51
#define pke_reg_write(offset, value) crypto_ex_reg_write(PKE_REG_BASE_ADDR + (offset), value)
52
53
#define km_reg_read(offset) crypto_reg_read(KM_REG_BASE_ADDR + (offset))
54
#define km_reg_write(offset, value) crypto_ex_reg_write(KM_REG_BASE_ADDR + (offset), value)
55
56
#define trng_reg_read(offset) crypto_reg_read(TRNG_REG_BASE_ADDR + (offset))
57
#define trng_reg_write(offset, value) crypto_ex_reg_write(TRNG_REG_BASE_ADDR + (offset), value)
58
59
#define fapc_reg_read(offset) crypto_reg_read(FAPC_REG_BASE_ADDR + (offset))
60
#define fapc_reg_write(offset, value) crypto_ex_reg_write(FAPC_REG_BASE_ADDR + (offset), value)
61
62
#endif
crypto_wait_t
void crypto_wait_t
Definition
crypto_osal_lib.h:19
crypto_boot_debug_message
void crypto_boot_debug_message(const char *fmt,...)
Definition
crypto_osal_lib.c:208
crypto_common_macro.h
crypto_security.h
securec.h
security_unified_porting.h
tcxo.h
src
drivers
drivers
hal
security_unified
crypto_osal
cfbb
boot
crypto_osal_lib.h
由
William Goodspeed
维护 | E-mail: gongzl@stu.hebust.edu.cn | Wechat: a23333344 | ALSO CHECKOUT
WS63FLASH
!
生成于 2025年 一月 4日 星期六 17:47:12 , 为 WS63 SDK 文档使用
1.9.8