Home
last modified time | relevance | path

Searched refs:handle (Results 1 – 25 of 108) sorted by relevance

12345

/trusted-firmware-m-3.5.0/secure_fw/spm/ffm/
Dpsa_mmiovec_api.c19 struct connection_t *handle; in tfm_spm_partition_psa_map_invec() local
24 handle = spm_msg_handle_to_connection(msg_handle); in tfm_spm_partition_psa_map_invec()
25 if (!handle) { in tfm_spm_partition_psa_map_invec()
29 partition = handle->service->partition; in tfm_spm_partition_psa_map_invec()
35 if (!SERVICE_ENABLED_MM_IOVEC(handle->service->p_ldinf->flags)) { in tfm_spm_partition_psa_map_invec()
43 if (handle->msg.type < PSA_IPC_CALL) { in tfm_spm_partition_psa_map_invec()
56 if (handle->msg.in_size[invec_idx] == 0) { in tfm_spm_partition_psa_map_invec()
64 if (IOVEC_IS_MAPPED(handle, (invec_idx + INVEC_IDX_BASE))) { in tfm_spm_partition_psa_map_invec()
72 if (IOVEC_IS_ACCESSED(handle, (invec_idx + INVEC_IDX_BASE))) { in tfm_spm_partition_psa_map_invec()
81 partition->boundary, (uintptr_t)handle->invec[invec_idx].base, in tfm_spm_partition_psa_map_invec()
[all …]
Dpsa_read_write_skip_api.c19 struct connection_t *handle = NULL; in tfm_spm_partition_psa_read() local
24 handle = spm_msg_handle_to_connection(msg_handle); in tfm_spm_partition_psa_read()
25 if (!handle) { in tfm_spm_partition_psa_read()
33 if (handle->msg.type < PSA_IPC_CALL) { in tfm_spm_partition_psa_read()
50 if (IOVEC_IS_MAPPED(handle, (invec_idx + INVEC_IDX_BASE))) { in tfm_spm_partition_psa_read()
54 SET_IOVEC_ACCESSED(handle, (invec_idx + INVEC_IDX_BASE)); in tfm_spm_partition_psa_read()
58 if (handle->msg.in_size[invec_idx] == 0) { in tfm_spm_partition_psa_read()
73 bytes = num_bytes > handle->msg.in_size[invec_idx] ? in tfm_spm_partition_psa_read()
74 handle->msg.in_size[invec_idx] : num_bytes; in tfm_spm_partition_psa_read()
76 spm_memcpy(buffer, handle->invec[invec_idx].base, bytes); in tfm_spm_partition_psa_read()
[all …]
Dpsa_api.c97 struct connection_t *handle = NULL; in tfm_spm_partition_psa_get() local
142 handle = spm_get_handle_by_signal(partition, signal); in tfm_spm_partition_psa_get()
143 if (!handle) { in tfm_spm_partition_psa_get()
147 spm_memcpy(msg, &handle->msg, sizeof(psa_msg_t)); in tfm_spm_partition_psa_get()
157 struct connection_t *handle; in tfm_spm_partition_psa_reply() local
162 handle = spm_msg_handle_to_connection(msg_handle); in tfm_spm_partition_psa_reply()
163 if (!handle) { in tfm_spm_partition_psa_reply()
172 service = handle->service; in tfm_spm_partition_psa_reply()
177 switch (handle->msg.type) { in tfm_spm_partition_psa_reply()
189 handle->status = TFM_HANDLE_STATUS_TO_FREE; in tfm_spm_partition_psa_reply()
[all …]
Dpsa_connection_api.c24 psa_handle_t handle; in tfm_spm_client_psa_connect() local
71 handle = connection_to_handle(p_connection); in tfm_spm_client_psa_connect()
72 spm_fill_message(p_connection, service, handle, PSA_IPC_CONNECT, client_id); in tfm_spm_client_psa_connect()
77 psa_status_t tfm_spm_client_psa_close(psa_handle_t handle) in tfm_spm_client_psa_close() argument
85 if (handle == PSA_NULL_HANDLE) { in tfm_spm_client_psa_close()
90 if (IS_STATIC_HANDLE(handle)) { in tfm_spm_client_psa_close()
100 p_connection = spm_get_client_connection(handle, client_id); in tfm_spm_client_psa_close()
119 spm_fill_message(p_connection, service, handle, PSA_IPC_DISCONNECT, client_id); in tfm_spm_client_psa_close()
126 struct connection_t *handle; in tfm_spm_partition_psa_set_rhandle() local
129 handle = spm_msg_handle_to_connection(msg_handle); in tfm_spm_partition_psa_set_rhandle()
[all …]
/trusted-firmware-m-3.5.0/platform/ext/target/nxp/common/Native_Driver/drivers/
Dfsl_usart.c77 size_t USART_TransferGetRxRingBufferLength(usart_handle_t *handle) in USART_TransferGetRxRingBufferLength() argument
82 assert(NULL != handle); in USART_TransferGetRxRingBufferLength()
83 uint16_t rxRingBufferHead = handle->rxRingBufferHead; in USART_TransferGetRxRingBufferLength()
84 uint16_t rxRingBufferTail = handle->rxRingBufferTail; in USART_TransferGetRxRingBufferLength()
88 size = (size_t)rxRingBufferHead + handle->rxRingBufferSize - (size_t)rxRingBufferTail; in USART_TransferGetRxRingBufferLength()
97 static bool USART_TransferIsRxRingBufferFull(usart_handle_t *handle) in USART_TransferIsRxRingBufferFull() argument
102 assert(NULL != handle); in USART_TransferIsRxRingBufferFull()
104 if (USART_TransferGetRxRingBufferLength(handle) == (handle->rxRingBufferSize - 1U)) in USART_TransferIsRxRingBufferFull()
132 void USART_TransferStartRingBuffer(USART_Type *base, usart_handle_t *handle, uint8_t *ringBuffer, s… in USART_TransferStartRingBuffer() argument
136 assert(NULL != handle); in USART_TransferStartRingBuffer()
[all …]
Dfsl_hashcrypt.c290 static status_t hashcrypt_check_need_key(HASHCRYPT_Type *base, hashcrypt_handle_t *handle) in hashcrypt_check_need_key() argument
292 if (handle->keyType == kHASHCRYPT_SecretKey) in hashcrypt_check_need_key()
367 static void hashcrypt_aes_load_userKey(HASHCRYPT_Type *base, hashcrypt_handle_t *handle) in hashcrypt_aes_load_userKey() argument
371 switch (handle->keySize) in hashcrypt_aes_load_userKey()
390 hashcrypt_load_data(base, &handle->keyWord[0], keySize); in hashcrypt_aes_load_userKey()
989 status_t HASHCRYPT_AES_SetKey(HASHCRYPT_Type *base, hashcrypt_handle_t *handle, const uint8_t *key,… in HASHCRYPT_AES_SetKey() argument
996 handle->keySize = kHASHCRYPT_Aes128; in HASHCRYPT_AES_SetKey()
999 handle->keySize = kHASHCRYPT_Aes192; in HASHCRYPT_AES_SetKey()
1002 handle->keySize = kHASHCRYPT_Aes256; in HASHCRYPT_AES_SetKey()
1005 handle->keySize = kHASHCRYPT_InvalidKey; in HASHCRYPT_AES_SetKey()
[all …]
/trusted-firmware-m-3.5.0/platform/ext/target/nxp/common/Native_Driver/components/serial_manager/
Dfsl_component_serial_manager.c242 static serial_manager_status_t SerialManager_StartWriting(serial_manager_handle_t *handle) in SerialManager_StartWriting() argument
246 (serial_manager_write_handle_t *)(void *)LIST_GetHead(&handle->runningWriteHandleHead); in SerialManager_StartWriting()
251 switch (handle->type) in SerialManager_StartWriting()
255 status = Serial_UartWrite(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), in SerialManager_StartWriting()
261 status = Serial_UsbCdcWrite(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), in SerialManager_StartWriting()
267 status = Serial_SwoWrite(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), in SerialManager_StartWriting()
273 … status = Serial_PortVirtualWrite(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), in SerialManager_StartWriting()
279 status = Serial_RpmsgWrite(((serial_handle_t)&handle->lowLevelhandleBuffer[0]), in SerialManager_StartWriting()
291 static serial_manager_status_t SerialManager_StartBlockWriting(serial_manager_handle_t *handle, in SerialManager_StartBlockWriting() argument
299 if (kSerialPort_Uart == handle->type) /* Serial port UART */ in SerialManager_StartBlockWriting()
[all …]
/trusted-firmware-m-3.5.0/platform/ext/target/arm/corstone1000/openamp/
Dtfm_spe_psa_client_lib_unordered_map.c77 static int32_t alloc_map_entry(unordered_map_handle_t *handle) in alloc_map_entry() argument
86 *handle = find_first_unset_bit(psa_client_lib_map_.busy_slots); in alloc_map_entry()
87 set_bit(&psa_client_lib_map_.busy_slots, *handle); in alloc_map_entry()
95 unordered_map_handle_t *handle) in unordered_map_insert() argument
99 ret = alloc_map_entry(handle); in unordered_map_insert()
104 memcpy(&psa_client_lib_map_.map[*handle].msg, ns_msg, in unordered_map_insert()
107 psa_client_lib_map_.map[*handle].input_buffer = in; in unordered_map_insert()
108 psa_client_lib_map_.map[*handle].output_buffer = NULL; in unordered_map_insert()
109 psa_client_lib_map_.map[*handle].output_buffer_len = 0; in unordered_map_insert()
110 psa_client_lib_map_.map[*handle].is_input_buffer_hold = false; in unordered_map_insert()
[all …]
Dtfm_spe_psa_client_lib_unordered_map.h27 unordered_map_handle_t handle; /* entry handle */ member
37 unordered_map_handle_t *handle);
40 void unordered_map_free(unordered_map_handle_t handle);
44 unordered_map_handle_t handle);
/trusted-firmware-m-3.5.0/platform/ext/target/nxp/common/Native_Driver/components/uart/
Dfsl_adapter_uart.h222 typedef void (*hal_uart_transfer_callback_t)(hal_uart_handle_t handle, hal_uart_status_t status, vo…
233 typedef void (*hal_uart_dma_transfer_callback_t)(hal_uart_dma_handle_t handle,
289 hal_uart_status_t HAL_UartInit(hal_uart_handle_t handle, const hal_uart_config_t *config);
299 hal_uart_status_t HAL_UartDeinit(hal_uart_handle_t handle);
325 hal_uart_status_t HAL_UartReceiveBlocking(hal_uart_handle_t handle, uint8_t *data, size_t length);
342 hal_uart_status_t HAL_UartSendBlocking(hal_uart_handle_t handle, const uint8_t *data, size_t length…
369 hal_uart_status_t HAL_UartTransferInstallCallback(hal_uart_handle_t handle,
392 hal_uart_status_t HAL_UartTransferReceiveNonBlocking(hal_uart_handle_t handle, hal_uart_transfer_t …
411 hal_uart_status_t HAL_UartTransferSendNonBlocking(hal_uart_handle_t handle, hal_uart_transfer_t *tr…
423 hal_uart_status_t HAL_UartTransferGetReceiveCount(hal_uart_handle_t handle, uint32_t *count);
[all …]
Dfsl_adapter_usart.c183 static void HAL_UartCallback(USART_Type *base, usart_handle_t *handle, status_t status, void *callb… in HAL_UartCallback() argument
206 static void HAL_UartInterruptHandle(USART_Type *base, void *handle) in HAL_UartInterruptHandle() argument
208 hal_uart_state_t *uartHandle = (hal_uart_state_t *)handle; in HAL_UartInterruptHandle()
264 static void HAL_UartInterruptHandle_Wapper(void *base, void *handle) in HAL_UartInterruptHandle_Wapper() argument
266 HAL_UartInterruptHandle((USART_Type *)base, handle); in HAL_UartInterruptHandle_Wapper()
272 static hal_uart_status_t HAL_UartInitCommon(hal_uart_handle_t handle, const hal_uart_config_t *conf… in HAL_UartInitCommon() argument
277 assert(handle); in HAL_UartInitCommon()
327 hal_uart_status_t HAL_UartInit(hal_uart_handle_t handle, const hal_uart_config_t *config) in HAL_UartInit() argument
333 status = HAL_UartInitCommon(handle, config); in HAL_UartInit()
339 uartHandle = (hal_uart_state_t *)handle; in HAL_UartInit()
[all …]
/trusted-firmware-m-3.5.0/platform/ext/target/arm/corstone1000/io/
Dio_storage.c56 static bool is_valid_entity(const uintptr_t handle) { in is_valid_entity() argument
57 const io_entity_t *entity = (io_entity_t *)handle; in is_valid_entity()
78 static void set_handle(uintptr_t *handle, io_entity_t *entity) { in set_handle() argument
79 assert(handle != NULL); in set_handle()
80 *handle = (uintptr_t)entity; in set_handle()
147 uintptr_t *handle) { in io_dev_open() argument
148 assert(handle != NULL); in io_dev_open()
149 return io_storage_dev_open(dev_con, dev_spec, (io_dev_info_t **)handle); in io_dev_open()
188 int io_open(uintptr_t dev_handle, const uintptr_t spec, uintptr_t *handle) { in io_open() argument
190 assert((spec != (uintptr_t)NULL) && (handle != NULL)); in io_open()
[all …]
Dio_storage.h68 const uintptr_t dev_spec, uintptr_t *handle);
78 int io_open(uintptr_t dev_handle, const uintptr_t spec, uintptr_t *handle);
80 int io_seek(uintptr_t handle, io_seek_mode_t mode, int32_t offset);
82 int io_size(uintptr_t handle, size_t *length);
84 int io_read(uintptr_t handle, uintptr_t buffer, size_t length,
87 int io_write(uintptr_t handle, const uintptr_t buffer, size_t length,
90 int io_close(uintptr_t handle);
/trusted-firmware-m-3.5.0/secure_fw/partitions/internal_trusted_storage/
Dtfm_its_req_mngr.c25 static psa_handle_t handle; variable
41 num = psa_read(msg->handle, 0, &uid, sizeof(uid)); in tfm_its_set_req()
46 num = psa_read(msg->handle, 2, &create_flags, sizeof(create_flags)); in tfm_its_set_req()
53 p_data = (uint8_t *)psa_map_invec(msg->handle, 1); in tfm_its_set_req()
58 handle = msg->handle; in tfm_its_set_req()
78 num = psa_read(msg->handle, 0, &uid, sizeof(uid)); in tfm_its_get_req()
83 num = psa_read(msg->handle, 1, &data_offset, sizeof(data_offset)); in tfm_its_get_req()
90 p_data = (uint8_t *)psa_map_outvec(msg->handle, 0); in tfm_its_get_req()
95 handle = msg->handle; in tfm_its_get_req()
100 psa_unmap_outvec(msg->handle, 0, data_length); in tfm_its_get_req()
[all …]
/trusted-firmware-m-3.5.0/secure_fw/spm/include/ffm/
Dpsa_api.h52 #define IOVEC_IS_MAPPED(handle, iovec_idx) \ argument
53 ((((handle)->iovec_status) >> ((iovec_idx) * IOVEC_STATUS_BITS)) & \
55 #define IOVEC_IS_UNMAPPED(handle, iovec_idx) \ argument
56 ((((handle)->iovec_status) >> ((iovec_idx) * IOVEC_STATUS_BITS)) & \
58 #define IOVEC_IS_ACCESSED(handle, iovec_idx) \ argument
59 ((((handle)->iovec_status) >> ((iovec_idx) * IOVEC_STATUS_BITS)) & \
61 #define SET_IOVEC_MAPPED(handle, iovec_idx) \ argument
62 (((handle)->iovec_status) |= (IOVEC_MAPPED_BIT << \
64 #define SET_IOVEC_UNMAPPED(handle, iovec_idx) \ argument
65 (((handle)->iovec_status) |= (IOVEC_UNMAPPED_BIT << \
[all …]
/trusted-firmware-m-3.5.0/secure_fw/partitions/crypto/
Dcrypto_alloc.c82 uint32_t *handle, in tfm_crypto_operation_alloc() argument
90 if (*handle != TFM_CRYPTO_INVALID_HANDLE) { in tfm_crypto_operation_alloc()
110 *handle = i + 1; in tfm_crypto_operation_alloc()
119 psa_status_t tfm_crypto_operation_release(uint32_t *handle) in tfm_crypto_operation_release() argument
121 uint32_t h_val = *handle; in tfm_crypto_operation_release()
126 *handle = TFM_CRYPTO_INVALID_HANDLE; in tfm_crypto_operation_release()
153 uint32_t handle, in tfm_crypto_operation_lookup() argument
159 if ((handle == TFM_CRYPTO_INVALID_HANDLE) || in tfm_crypto_operation_lookup()
160 (handle > CRYPTO_CONC_OPER_NUM)) { in tfm_crypto_operation_lookup()
173 if ((operations[handle - 1].in_use == TFM_CRYPTO_IN_USE) && in tfm_crypto_operation_lookup()
[all …]
/trusted-firmware-m-3.5.0/platform/ext/target/stm/common/hal/Native_Driver/
Dlow_level_rng.c24 static RNG_HandleTypeDef handle; variable
68 handle.Instance = RNG; in RNG_Init()
69 handle.State = HAL_RNG_STATE_RESET; in RNG_Init()
70 handle.Lock = HAL_UNLOCKED; in RNG_Init()
72 if (HAL_RNG_Init(&handle) != HAL_OK) in RNG_Init()
78 HAL_RNG_GenerateRandomNumber(&handle, &dummy); in RNG_Init()
92 if (HAL_RNG_GenerateRandomNumber(&handle, (uint32_t *)random) != HAL_OK) in RNG_GetBytes()
115 if ((__HAL_RNG_GET_FLAG(&handle, (RNG_FLAG_CECS | RNG_FLAG_SECS))) != 0) in RNG_GetBytes()
124 HAL_RNG_DeInit(&handle); in RNG_DeInit()
/trusted-firmware-m-3.5.0/secure_fw/spm/cmsis_psa/
Dspm_ipc.c97 psa_handle_t handle; in connection_to_handle() local
100 handle = (psa_handle_t)((((uintptr_t)p_connection - in connection_to_handle()
104 return handle; in connection_to_handle()
123 struct connection_t *handle_to_connection(psa_handle_t handle) in handle_to_connection() argument
127 if (handle == PSA_NULL_HANDLE) { in handle_to_connection()
131 p_connection = (struct connection_t *)((((uintptr_t)handle - in handle_to_connection()
156 psa_status_t spm_validate_connection(const struct connection_t *handle) in spm_validate_connection() argument
160 (uint8_t *)handle) != true) { in spm_validate_connection()
313 struct connection_t *spm_get_client_connection(psa_handle_t handle, in spm_get_client_connection() argument
316 struct connection_t *p_conn_handle = handle_to_connection(handle); in spm_get_client_connection()
[all …]
Dspm.h43 #define GET_INDEX_FROM_STATIC_HANDLE(handle) \ argument
44 (uint32_t)((handle) & STATIC_HANDLE_IDX_MASK)
50 #define GET_VERSION_FROM_STATIC_HANDLE(handle) \ argument
51 (uint32_t)(((handle) >> STATIC_HANDLE_VER_OFFSET) & STATIC_HANDLE_VER_MASK)
55 #define IS_STATIC_HANDLE(handle) \ argument
56 ((handle) & (1UL << STATIC_HANDLE_INDICATOR_OFFSET))
199 struct connection_t *spm_get_client_connection(psa_handle_t handle,
229 psa_handle_t handle,
312 struct connection_t *handle_to_connection(psa_handle_t handle);
319 void update_caller_outvec_len(struct connection_t *handle);
Dtfm_spe_mailbox.c43 spm_params.handle = params->psa_call_params.handle; in tfm_mailbox_dispatch()
59 spm_params.handle = params->psa_close_params.handle; in tfm_mailbox_dispatch()
113 mailbox_msg_handle_t *handle) in get_spe_mailbox_msg_handle() argument
115 if ((idx >= NUM_MAILBOX_QUEUE_SLOT) || !handle) { in get_spe_mailbox_msg_handle()
119 *handle = (mailbox_msg_handle_t)(idx + 1); in get_spe_mailbox_msg_handle()
124 __STATIC_INLINE int32_t get_spe_mailbox_msg_idx(mailbox_msg_handle_t handle, in get_spe_mailbox_msg_idx() argument
127 if ((handle == MAILBOX_MSG_NULL_HANDLE) || !idx) { in get_spe_mailbox_msg_idx()
131 *idx = (uint8_t)(handle - 1); in get_spe_mailbox_msg_idx()
298 int32_t tfm_mailbox_reply_msg(mailbox_msg_handle_t handle, int32_t reply) in tfm_mailbox_reply_msg() argument
312 if (handle == MAILBOX_MSG_NULL_HANDLE) { in tfm_mailbox_reply_msg()
[all …]
Dtfm_rpc.h38 psa_handle_t handle; member
173 __STATIC_INLINE bool is_tfm_rpc_msg(const struct connection_t *handle) in is_tfm_rpc_msg() argument
185 if (handle && (handle->msg.client_id <= 0)) { in is_tfm_rpc_msg()
199 void tfm_rpc_set_caller_data(struct connection_t *handle, int32_t client_id);
/trusted-firmware-m-3.5.0/secure_fw/partitions/ns_agent_tz/
Dpsa_api_veneers.c38 psa_status_t tfm_psa_call_veneer(psa_handle_t handle, in tfm_psa_call_veneer() argument
43 return tfm_psa_call_pack(handle, ctrl_param, in_vec, out_vec); in tfm_psa_call_veneer()
55 void tfm_psa_close_veneer(psa_handle_t handle) in tfm_psa_close_veneer() argument
57 psa_close(handle); in tfm_psa_close_veneer()
70 void tfm_psa_close_veneer(psa_handle_t handle) in tfm_psa_close_veneer() argument
72 (void)handle; in tfm_psa_close_veneer()
/trusted-firmware-m-3.5.0/interface/include/psa/
Dclient.h48 #define PSA_HANDLE_IS_VALID(handle) ((psa_handle_t)(handle) > 0) argument
54 #define PSA_HANDLE_TO_ERROR(handle) ((psa_status_t)(handle)) argument
162 psa_status_t psa_call(psa_handle_t handle, int32_t type,
182 void psa_close(psa_handle_t handle);
Dcrypto_compat.h43 static inline int psa_key_handle_is_null(psa_key_handle_t handle) in psa_key_handle_is_null() argument
45 return mbedtls_svc_key_id_is_null(handle); in psa_key_handle_is_null()
109 psa_key_handle_t *handle);
149 psa_status_t psa_close_key(psa_key_handle_t handle);
/trusted-firmware-m-3.5.0/secure_fw/partitions/protected_storage/
Dtfm_ps_req_mngr.c39 num = psa_read(msg->handle, 0, &uid, sizeof(uid)); in tfm_ps_set_req()
44 num = psa_read(msg->handle, 2, &create_flags, sizeof(create_flags)); in tfm_ps_set_req()
65 num = psa_read(msg->handle, 0, &uid, sizeof(uid)); in tfm_ps_get_req()
70 num = psa_read(msg->handle, 1, &data_offset, sizeof(data_offset)); in tfm_ps_get_req()
93 num = psa_read(msg->handle, 0, &uid, sizeof(uid)); in tfm_ps_get_info_req()
101 psa_write(msg->handle, 0, &info, sizeof(info)); in tfm_ps_get_info_req()
116 num = psa_read(msg->handle, 0, &uid, sizeof(uid)); in tfm_ps_remove_req()
136 psa_write(msg->handle, 0, &support_flags, out_size); in tfm_ps_get_support_req()
171 num = psa_read(p_msg->handle, 1, out_data, size); in ps_req_mngr_read_asset_data()
180 psa_write(p_msg->handle, 0, in_data, size); in ps_req_mngr_write_asset_data()

12345