FreeRTOS port on GAP8/RISC-V
|
Functions | |
static void | __pi_aes_null_handler (void *arg) |
static void | __pi_aes_event_handler (void *arg) |
static int32_t | __pi_aes_conf_apply (struct aes_itf_data_s *itf_data) |
static void | __pi_aes_crypt_start (struct aes_itf_data_s *itf_data) |
static void | __pi_aes_event_handler_internal (struct aes_itf_data_s *itf_data) |
void | __pi_aes_stop_fifo_mode (struct aes_config_data_s *conf_data) |
stop the fifo mode and resume normal mode More... | |
void | __pi_aes_conf_init (struct pi_aes_conf *conf) |
Init aes configuration structure. More... | |
int32_t | __pi_aes_open (struct pi_aes_conf *conf, struct aes_config_data_s **device_data) |
Open aes device. More... | |
void | __pi_aes_close (struct aes_config_data_s *conf_data) |
Close aes device. More... | |
int32_t | __pi_aes_crypt_async (struct aes_config_data_s *conf_data, uint8_t is_encrypt, void *src, void *dst, uint16_t len, pi_task_t *task) |
launch an encrypt/decrypt operation More... | |
Variables | |
static struct aes_itf_data_s * | g_aes_itf_data [UDMA_NB_AES] |
void __pi_aes_close | ( | struct aes_config_data_s * | conf_data | ) |
conf_data | Device data |
References AES_TRACE, aes_itf_data_s::device_id, hal_soc_eu_clear_fc_mask(), hal_udma_core_lin_get(), hal_udma_core_lin_reset(), hal_udma_ctrl_cg_enable(), hal_udma_ctrl_reset_enable(), aes_config_data_s::itf_data, aes_itf_data_s::latest_conf, aes_itf_data_s::nb_open, pi_data_free, pi_fc_l1_free(), pi_udma_core_lin_free(), aes_itf_data_s::rx_chan_id, SOC_EVENT_UDMA_CHAN_LIN, aes_itf_data_s::tx_chan_id, and UDMA_AES_ID.
Referenced by pi_aes_close().
|
static |
References AES_TRACE, pi_task_t::data, aes_itf_data_s::device_id, aes_itf_data_s::end_task, aes_config_data_s::iv, aes_config_data_s::key, aes_config_data_s::key_len, aes_itf_data_s::latest_conf, aes_config_data_s::mode, aes_itf_data_s::rx_chan_id, aes_itf_data_s::tx_chan_id, udma_aes, UDMA_AES_DEST_RX_DEST, udma_aes_dest_set(), UDMA_AES_DEST_TX_DEST, udma_aes_iv0_0_set(), udma_aes_iv0_1_set(), udma_aes_iv0_2_set(), udma_aes_iv0_3_set(), udma_aes_key0_0_set(), udma_aes_key0_1_set(), udma_aes_key0_2_set(), udma_aes_key0_3_set(), udma_aes_key0_4_set(), udma_aes_key0_5_set(), udma_aes_key0_6_set(), udma_aes_key0_7_set(), UDMA_AES_SETUP_BLOCK_RST, UDMA_AES_SETUP_ECB_CBC, UDMA_AES_SETUP_ENC_DEC, UDMA_AES_SETUP_KEY_INIT, udma_aes_setup_key_init_get(), UDMA_AES_SETUP_KEY_TYPE, and udma_aes_setup_set().
Referenced by __pi_aes_crypt_start().
void __pi_aes_conf_init | ( | struct pi_aes_conf * | conf | ) |
conf | Pointer to aes conf. |
Referenced by pi_aes_conf_init().
int32_t __pi_aes_crypt_async | ( | struct aes_config_data_s * | conf_data, |
uint8_t | is_encrypt, | ||
void * | src, | ||
void * | dst, | ||
uint16_t | len, | ||
pi_task_t * | task | ||
) |
conf_data | Pointer to driver data. |
is_encrypt | if flag is set, then operation is an encryption else it is a decryption. |
src | Source data |
dst | Destination data |
len | Data length |
task | Pointer to struct pi_task. |
References __aes_drv_fifo_enqueue(), __pi_aes_crypt_start(), AES_TRACE, pi_task_t::data, disable_irq(), aes_itf_data_s::end_task, aes_config_data_s::itf_data, and restore_irq().
Referenced by pi_aes_decrypt_async(), and pi_aes_encrypt_async().
|
static |
References __pi_aes_conf_apply(), AES_TRACE, pi_task_t::data, aes_itf_data_s::device_id, aes_itf_data_s::end_task, hal_udma_core_lin_enqueue(), hal_udma_core_lin_get(), udma_aes, udma_aes_dest_rx_dest_get(), udma_aes_dest_rx_dest_set(), udma_aes_dest_tx_dest_get(), udma_aes_dest_tx_dest_set(), UDMA_CHAN_FIFO_ID, and UDMA_NB_CHAN_FIFO.
Referenced by __pi_aes_crypt_async(), and __pi_aes_event_handler_internal().
|
static |
References __pi_aes_event_handler_internal().
Referenced by __pi_aes_open().
|
inlinestatic |
References __aes_drv_fifo_pop(), __pi_aes_crypt_start(), AES_TRACE, aes_itf_data_s::end_task, pi_task_t::id, pi_task_release(), pmsis_event_get_default_scheduler(), and pmsis_event_push().
Referenced by __pi_aes_event_handler(), and __pi_aes_stop_fifo_mode().
|
static |
Referenced by __pi_aes_open().
int32_t __pi_aes_open | ( | struct pi_aes_conf * | conf, |
struct aes_config_data_s ** | device_data | ||
) |
conf | Pointer to aes conf. |
device_data | Pointer to device data. |
0 | Operation is successful. |
ERRNO | Error code. |
References __pi_aes_event_handler(), __pi_aes_null_handler(), AES_TRACE, AES_TRACE_ERR, aes_itf_data_s::device_id, aes_itf_data_s::end_task, aes_itf_data_s::fifo_head, aes_itf_data_s::fifo_tail, hal_soc_eu_set_fc_mask(), hal_udma_ctrl_cg_disable(), hal_udma_ctrl_reset_disable(), aes_itf_data_s::latest_conf, aes_itf_data_s::nb_open, pi_data_malloc, pi_fc_l1_malloc(), pi_udma_core_lin_alloc(), aes_itf_data_s::rx_chan_id, SOC_EVENT_UDMA_CHAN_LIN, aes_itf_data_s::tx_chan_id, and UDMA_AES_ID.
Referenced by pi_aes_open().
void __pi_aes_stop_fifo_mode | ( | struct aes_config_data_s * | conf_data | ) |
conf_data | Pointer to driver data. |
References __pi_aes_event_handler_internal(), and aes_config_data_s::itf_data.
Referenced by pi_aes_ioctl().
|
static |