Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
mv_cesa.h File Reference

Go to the source code of this file.

Data Structures

struct  sec_accel_config
 

Macros

#define DIGEST_INITIAL_VAL_A   0xdd00
 
#define DIGEST_INITIAL_VAL_B   0xdd04
 
#define DIGEST_INITIAL_VAL_C   0xdd08
 
#define DIGEST_INITIAL_VAL_D   0xdd0c
 
#define DIGEST_INITIAL_VAL_E   0xdd10
 
#define DES_CMD_REG   0xdd58
 
#define SEC_ACCEL_CMD   0xde00
 
#define SEC_CMD_EN_SEC_ACCL0   (1 << 0)
 
#define SEC_CMD_EN_SEC_ACCL1   (1 << 1)
 
#define SEC_CMD_DISABLE_SEC   (1 << 2)
 
#define SEC_ACCEL_DESC_P0   0xde04
 
#define SEC_DESC_P0_PTR(x)   (x)
 
#define SEC_ACCEL_DESC_P1   0xde14
 
#define SEC_DESC_P1_PTR(x)   (x)
 
#define SEC_ACCEL_CFG   0xde08
 
#define SEC_CFG_STOP_DIG_ERR   (1 << 0)
 
#define SEC_CFG_CH0_W_IDMA   (1 << 7)
 
#define SEC_CFG_CH1_W_IDMA   (1 << 8)
 
#define SEC_CFG_ACT_CH0_IDMA   (1 << 9)
 
#define SEC_CFG_ACT_CH1_IDMA   (1 << 10)
 
#define SEC_ACCEL_STATUS   0xde0c
 
#define SEC_ST_ACT_0   (1 << 0)
 
#define SEC_ST_ACT_1   (1 << 1)
 
#define FPGA_INT_STATUS   0xdd68
 
#define SEC_ACCEL_INT_STATUS   0xde20
 
#define SEC_INT_AUTH_DONE   (1 << 0)
 
#define SEC_INT_DES_E_DONE   (1 << 1)
 
#define SEC_INT_AES_E_DONE   (1 << 2)
 
#define SEC_INT_AES_D_DONE   (1 << 3)
 
#define SEC_INT_ENC_DONE   (1 << 4)
 
#define SEC_INT_ACCEL0_DONE   (1 << 5)
 
#define SEC_INT_ACCEL1_DONE   (1 << 6)
 
#define SEC_INT_ACC0_IDMA_DONE   (1 << 7)
 
#define SEC_INT_ACC1_IDMA_DONE   (1 << 8)
 
#define SEC_ACCEL_INT_MASK   0xde24
 
#define AES_KEY_LEN   (8 * 4)
 
#define CFG_OP_MAC_ONLY   0
 
#define CFG_OP_CRYPT_ONLY   1
 
#define CFG_OP_MAC_CRYPT   2
 
#define CFG_OP_CRYPT_MAC   3
 
#define CFG_MACM_MD5   (4 << 4)
 
#define CFG_MACM_SHA1   (5 << 4)
 
#define CFG_MACM_HMAC_MD5   (6 << 4)
 
#define CFG_MACM_HMAC_SHA1   (7 << 4)
 
#define CFG_ENCM_DES   (1 << 8)
 
#define CFG_ENCM_3DES   (2 << 8)
 
#define CFG_ENCM_AES   (3 << 8)
 
#define CFG_DIR_ENC   (0 << 12)
 
#define CFG_DIR_DEC   (1 << 12)
 
#define CFG_ENC_MODE_ECB   (0 << 16)
 
#define CFG_ENC_MODE_CBC   (1 << 16)
 
#define CFG_3DES_EEE   (0 << 20)
 
#define CFG_3DES_EDE   (1 << 20)
 
#define CFG_AES_LEN_128   (0 << 24)
 
#define CFG_AES_LEN_192   (1 << 24)
 
#define CFG_AES_LEN_256   (2 << 24)
 
#define CFG_NOT_FRAG   (0 << 30)
 
#define CFG_FIRST_FRAG   (1 << 30)
 
#define CFG_LAST_FRAG   (2 << 30)
 
#define CFG_MID_FRAG   (3 << 30)
 
#define ENC_P_SRC(x)   (x)
 
#define ENC_P_DST(x)   ((x) << 16)
 
#define ENC_LEN(x)   (x)
 
#define ENC_KEY_P(x)   (x)
 
#define ENC_IV_POINT(x)   ((x) << 0)
 
#define ENC_IV_BUF_POINT(x)   ((x) << 16)
 
#define MAC_SRC_DATA_P(x)   (x)
 
#define MAC_SRC_TOTAL_LEN(x)   ((x) << 16)
 
#define MAC_DIGEST_P(x)   (x)
 
#define MAC_FRAG_LEN(x)   ((x) << 16)
 
#define MAC_INNER_IV_P(x)   (x)
 
#define MAC_OUTER_IV_P(x)   ((x) << 16)
 
#define SRAM_CONFIG   0x00
 
#define SRAM_DATA_KEY_P   0x20
 
#define SRAM_DATA_IV   0x40
 
#define SRAM_DATA_IV_BUF   0x40
 
#define SRAM_DATA_IN_START   0x80
 
#define SRAM_DATA_OUT_START   0x80
 
#define SRAM_HMAC_IV_IN   0x20
 
#define SRAM_HMAC_IV_OUT   0x34
 
#define SRAM_DIGEST_BUF   0x48
 
#define SRAM_CFG_SPACE   0x80
 

Functions

struct sec_accel_config __attribute__ ((packed))
 

Variables

u32 config
 
u32 enc_p
 
u32 enc_len
 
u32 enc_key_p
 
u32 enc_iv
 
u32 mac_src_p
 
u32 mac_digest
 
u32 mac_iv
 

Macro Definition Documentation

#define AES_KEY_LEN   (8 * 4)

Definition at line 52 of file mv_cesa.h.

#define CFG_3DES_EDE   (1 << 20)

Definition at line 125 of file mv_cesa.h.

#define CFG_3DES_EEE   (0 << 20)

Definition at line 124 of file mv_cesa.h.

#define CFG_AES_LEN_128   (0 << 24)

Definition at line 126 of file mv_cesa.h.

#define CFG_AES_LEN_192   (1 << 24)

Definition at line 127 of file mv_cesa.h.

#define CFG_AES_LEN_256   (2 << 24)

Definition at line 128 of file mv_cesa.h.

#define CFG_DIR_DEC   (1 << 12)

Definition at line 121 of file mv_cesa.h.

#define CFG_DIR_ENC   (0 << 12)

Definition at line 120 of file mv_cesa.h.

#define CFG_ENC_MODE_CBC   (1 << 16)

Definition at line 123 of file mv_cesa.h.

#define CFG_ENC_MODE_ECB   (0 << 16)

Definition at line 122 of file mv_cesa.h.

#define CFG_ENCM_3DES   (2 << 8)

Definition at line 118 of file mv_cesa.h.

#define CFG_ENCM_AES   (3 << 8)

Definition at line 119 of file mv_cesa.h.

#define CFG_ENCM_DES   (1 << 8)

Definition at line 117 of file mv_cesa.h.

#define CFG_FIRST_FRAG   (1 << 30)

Definition at line 130 of file mv_cesa.h.

#define CFG_LAST_FRAG   (2 << 30)

Definition at line 131 of file mv_cesa.h.

#define CFG_MACM_HMAC_MD5   (6 << 4)

Definition at line 115 of file mv_cesa.h.

#define CFG_MACM_HMAC_SHA1   (7 << 4)

Definition at line 116 of file mv_cesa.h.

#define CFG_MACM_MD5   (4 << 4)

Definition at line 113 of file mv_cesa.h.

#define CFG_MACM_SHA1   (5 << 4)

Definition at line 114 of file mv_cesa.h.

#define CFG_MID_FRAG   (3 << 30)

Definition at line 132 of file mv_cesa.h.

#define CFG_NOT_FRAG   (0 << 30)

Definition at line 129 of file mv_cesa.h.

#define CFG_OP_CRYPT_MAC   3

Definition at line 112 of file mv_cesa.h.

#define CFG_OP_CRYPT_ONLY   1

Definition at line 110 of file mv_cesa.h.

#define CFG_OP_MAC_CRYPT   2

Definition at line 111 of file mv_cesa.h.

#define CFG_OP_MAC_ONLY   0

Definition at line 109 of file mv_cesa.h.

#define DES_CMD_REG   0xdd58

Definition at line 8 of file mv_cesa.h.

#define DIGEST_INITIAL_VAL_A   0xdd00

Definition at line 3 of file mv_cesa.h.

#define DIGEST_INITIAL_VAL_B   0xdd04

Definition at line 4 of file mv_cesa.h.

#define DIGEST_INITIAL_VAL_C   0xdd08

Definition at line 5 of file mv_cesa.h.

#define DIGEST_INITIAL_VAL_D   0xdd0c

Definition at line 6 of file mv_cesa.h.

#define DIGEST_INITIAL_VAL_E   0xdd10

Definition at line 7 of file mv_cesa.h.

#define ENC_IV_BUF_POINT (   x)    ((x) << 16)

Definition at line 146 of file mv_cesa.h.

#define ENC_IV_POINT (   x)    ((x) << 0)

Definition at line 145 of file mv_cesa.h.

#define ENC_KEY_P (   x)    (x)

Definition at line 142 of file mv_cesa.h.

#define ENC_LEN (   x)    (x)

Definition at line 139 of file mv_cesa.h.

#define ENC_P_DST (   x)    ((x) << 16)

Definition at line 136 of file mv_cesa.h.

#define ENC_P_SRC (   x)    (x)

Definition at line 135 of file mv_cesa.h.

#define FPGA_INT_STATUS   0xdd68

Definition at line 38 of file mv_cesa.h.

#define MAC_DIGEST_P (   x)    (x)

Definition at line 153 of file mv_cesa.h.

#define MAC_FRAG_LEN (   x)    ((x) << 16)

Definition at line 154 of file mv_cesa.h.

#define MAC_INNER_IV_P (   x)    (x)

Definition at line 156 of file mv_cesa.h.

#define MAC_OUTER_IV_P (   x)    ((x) << 16)

Definition at line 157 of file mv_cesa.h.

#define MAC_SRC_DATA_P (   x)    (x)

Definition at line 149 of file mv_cesa.h.

#define MAC_SRC_TOTAL_LEN (   x)    ((x) << 16)

Definition at line 150 of file mv_cesa.h.

#define SEC_ACCEL_CFG   0xde08

Definition at line 21 of file mv_cesa.h.

#define SEC_ACCEL_CMD   0xde00

Definition at line 10 of file mv_cesa.h.

#define SEC_ACCEL_DESC_P0   0xde04

Definition at line 15 of file mv_cesa.h.

#define SEC_ACCEL_DESC_P1   0xde14

Definition at line 18 of file mv_cesa.h.

#define SEC_ACCEL_INT_MASK   0xde24

Definition at line 50 of file mv_cesa.h.

#define SEC_ACCEL_INT_STATUS   0xde20

Definition at line 39 of file mv_cesa.h.

#define SEC_ACCEL_STATUS   0xde0c

Definition at line 28 of file mv_cesa.h.

#define SEC_CFG_ACT_CH0_IDMA   (1 << 9)

Definition at line 25 of file mv_cesa.h.

#define SEC_CFG_ACT_CH1_IDMA   (1 << 10)

Definition at line 26 of file mv_cesa.h.

#define SEC_CFG_CH0_W_IDMA   (1 << 7)

Definition at line 23 of file mv_cesa.h.

#define SEC_CFG_CH1_W_IDMA   (1 << 8)

Definition at line 24 of file mv_cesa.h.

#define SEC_CFG_STOP_DIG_ERR   (1 << 0)

Definition at line 22 of file mv_cesa.h.

#define SEC_CMD_DISABLE_SEC   (1 << 2)

Definition at line 13 of file mv_cesa.h.

#define SEC_CMD_EN_SEC_ACCL0   (1 << 0)

Definition at line 11 of file mv_cesa.h.

#define SEC_CMD_EN_SEC_ACCL1   (1 << 1)

Definition at line 12 of file mv_cesa.h.

#define SEC_DESC_P0_PTR (   x)    (x)

Definition at line 16 of file mv_cesa.h.

#define SEC_DESC_P1_PTR (   x)    (x)

Definition at line 19 of file mv_cesa.h.

#define SEC_INT_ACC0_IDMA_DONE   (1 << 7)

Definition at line 47 of file mv_cesa.h.

#define SEC_INT_ACC1_IDMA_DONE   (1 << 8)

Definition at line 48 of file mv_cesa.h.

#define SEC_INT_ACCEL0_DONE   (1 << 5)

Definition at line 45 of file mv_cesa.h.

#define SEC_INT_ACCEL1_DONE   (1 << 6)

Definition at line 46 of file mv_cesa.h.

#define SEC_INT_AES_D_DONE   (1 << 3)

Definition at line 43 of file mv_cesa.h.

#define SEC_INT_AES_E_DONE   (1 << 2)

Definition at line 42 of file mv_cesa.h.

#define SEC_INT_AUTH_DONE   (1 << 0)

Definition at line 40 of file mv_cesa.h.

#define SEC_INT_DES_E_DONE   (1 << 1)

Definition at line 41 of file mv_cesa.h.

#define SEC_INT_ENC_DONE   (1 << 4)

Definition at line 44 of file mv_cesa.h.

#define SEC_ST_ACT_0   (1 << 0)

Definition at line 29 of file mv_cesa.h.

#define SEC_ST_ACT_1   (1 << 1)

Definition at line 30 of file mv_cesa.h.

#define SRAM_CFG_SPACE   0x80

Definition at line 147 of file mv_cesa.h.

#define SRAM_CONFIG   0x00

Definition at line 136 of file mv_cesa.h.

#define SRAM_DATA_IN_START   0x80

Definition at line 140 of file mv_cesa.h.

#define SRAM_DATA_IV   0x40

Definition at line 138 of file mv_cesa.h.

#define SRAM_DATA_IV_BUF   0x40

Definition at line 139 of file mv_cesa.h.

#define SRAM_DATA_KEY_P   0x20

Definition at line 137 of file mv_cesa.h.

#define SRAM_DATA_OUT_START   0x80

Definition at line 141 of file mv_cesa.h.

#define SRAM_DIGEST_BUF   0x48

Definition at line 145 of file mv_cesa.h.

#define SRAM_HMAC_IV_IN   0x20

Definition at line 143 of file mv_cesa.h.

#define SRAM_HMAC_IV_OUT   0x34

Definition at line 144 of file mv_cesa.h.

Function Documentation

struct sec_accel_config __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

Variable Documentation

Definition at line 108 of file mv_cesa.h.

u32 enc_iv

Definition at line 144 of file mv_cesa.h.

u32 enc_key_p

Definition at line 141 of file mv_cesa.h.

u32 enc_len

Definition at line 138 of file mv_cesa.h.

u32 enc_p

Definition at line 134 of file mv_cesa.h.

u32 mac_digest

Definition at line 152 of file mv_cesa.h.

u32 mac_iv

Definition at line 155 of file mv_cesa.h.

u32 mac_src_p

Definition at line 148 of file mv_cesa.h.