WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
drv_fapc.h
浏览该文件的文档.
1
9#ifndef DRV_FAPC_H
10#define DRV_FAPC_H
11
12#include "hal_fapc.h"
13
14#ifdef __cplusplus
15#if __cplusplus
16extern "C" {
17#endif /* __cplusplus */
18#endif /* __cplusplus */
19
21
22/* FAPC: Flash access permission controller */
23typedef struct {
24 td_u32 start_addr; /* FAPC region_n start address, should align to 256bytes, means the lowest 8bit are 0 */
25 td_u32 end_addr; /* FAPC region_n end address, should align to 256bytes, means the lowest 8bit are 0 */
26 td_u32 mac_addr; /* Define the start address of MAC value if current region work in decrypt and verify mode */
27 td_u32 iv_start_addr; /* Define the start address of encrypt to calculate the iv,
28 should be align to 256bytes, means the lowest 8bit are 0 */
29 td_u32 read_mid; /* Define which module/master can read the region, each bit represents a module/master */
30 td_u32 write_mid; /* Define which module/master can write the region, each bit represents a module/master */
31 crypto_fapc_region_mode mode; /* SFC work mode, bypass/decrypt/decrypt and verify */
32 td_bool enable; /* RAPC region_n enable/disable, default is disable */
33 td_bool lock; /* The one way locker of FAPC region_n configuration,
34 if FAPC region_n configuration is locked, it cannot be unlock */
36
38
39td_s32 drv_fapc_set_bypass_config(td_u32 region, td_u32 start_addr, td_u32 end_addr, td_bool lock);
40
42
43#ifdef __cplusplus
44#if __cplusplus
45}
46#endif /* __cplusplus */
47#endif /* __cplusplus */
48
49#endif
td_s32 drv_fapc_get_config(td_u32 region, const crypto_fapc_config *config)
Definition drv_fapc.c:96
td_s32 drv_fapc_set_iv(crypto_fapc_iv_type type, const td_u8 *iv, td_u32 length)
Definition drv_fapc.c:13
td_s32 drv_fapc_set_bypass_config(td_u32 region, td_u32 start_addr, td_u32 end_addr, td_bool lock)
Definition drv_fapc.c:77
td_s32 drv_fapc_set_config(td_u32 region, const crypto_fapc_config *config)
Definition drv_fapc.c:32
crypto_fapc_region_mode
Definition hal_fapc.h:49
crypto_fapc_iv_type
Definition hal_fapc.h:70
osal_u8 type
Definition oal_net.h:0
Definition drv_fapc.h:23
td_u32 read_mid
Definition drv_fapc.h:29
td_u32 write_mid
Definition drv_fapc.h:30
td_u32 start_addr
Definition drv_fapc.h:24
td_u32 mac_addr
Definition drv_fapc.h:26
crypto_fapc_region_mode mode
Definition drv_fapc.h:31
td_u32 end_addr
Definition drv_fapc.h:25
td_bool lock
Definition drv_fapc.h:33
td_bool enable
Definition drv_fapc.h:32
td_u32 iv_start_addr
Definition drv_fapc.h:27
unsigned char td_u8
Definition td_type.h:36
td_u8 td_bool
Definition td_type.h:50
unsigned int td_u32
Definition td_type.h:38
int td_s32
Definition td_type.h:44