Lines Matching refs:handle

66     int (*QSEECom_start_app)(struct QSEECom_handle ** handle, char* path,
68 int (*QSEECom_shutdown_app)(struct QSEECom_handle **handle);
69 int (*QSEECom_send_cmd)(struct QSEECom_handle* handle, void *cbuf,
71 int (*QSEECom_send_modified_cmd)(struct QSEECom_handle* handle, void *cbuf,
74 int (*QSEECom_set_bandwidth)(struct QSEECom_handle* handle, bool high);
192 static int32_t qcom_km_ION_memalloc(struct qcom_km_ion_info_t *handle,
208 if(handle == NULL){
209 ALOGE("Error:: null handle received");
217 handle->ion_sbuffer = NULL;
218 handle->ifd_data_fd = 0;
239 if (ion_alloc_data.handle != NULL) {
240 ifd_data.handle = ion_alloc_data.handle;
261 handle->ion_fd = ion_fd;
262 handle->ifd_data_fd = ifd_data.fd;
263 handle->ion_sbuffer = v_addr;
264 handle->ion_alloc_handle.handle = ion_alloc_data.handle;
265 handle->sbuf_len = size;
269 if (handle->ion_sbuffer != NULL) {
270 iret = munmap(handle->ion_sbuffer, ion_alloc_data.len);
276 handle_data.handle = ion_alloc_data.handle;
277 if (handle->ifd_data_fd)
278 close(handle->ifd_data_fd);
294 static int32_t qcom_km_ion_dealloc(struct qcom_km_ion_info_t *handle)
300 ret = munmap(handle->ion_sbuffer, (handle->sbuf_len + 4095) & (~4095));
305 handle_data.handle = handle->ion_alloc_handle.handle;
306 close(handle->ifd_data_fd);
307 ret = ioctl(handle->ion_fd, ION_IOC_FREE, &handle_data);
311 close(handle->ion_fd);
339 struct QSEECom_handle *handle = NULL;
343 handle = (struct QSEECom_handle *)(km_handle->qseecom);
344 send_cmd = (keymaster_gen_keypair_cmd_t *)handle->ion_sbuffer;
345 resp = (keymaster_gen_keypair_resp_t *)(handle->ion_sbuffer +
354 ret = (*km_handle->QSEECom_set_bandwidth)(handle, true);
360 ret = (*km_handle->QSEECom_send_cmd)(handle, send_cmd,
364 if((*km_handle->QSEECom_set_bandwidth)(handle, false))
406 ihandle.ion_alloc_handle.handle = NULL;
418 struct QSEECom_handle *handle = NULL;
423 handle = (struct QSEECom_handle *)(km_handle->qseecom);
424 send_cmd = (keymaster_import_keypair_cmd_t *)handle->ion_sbuffer;
425 resp = (keymaster_import_keypair_resp_t *)(handle->ion_sbuffer +
436 ret = (*km_handle->QSEECom_set_bandwidth)(handle, true);
442 ret = (*km_handle->QSEECom_send_modified_cmd)(handle, send_cmd,
446 if((*km_handle->QSEECom_set_bandwidth)(handle, false))
492 ALOGE("Cannot handle digest type %d", sign_params->digest_type);
495 ALOGE("Cannot handle padding type %d", sign_params->padding_type);
499 struct QSEECom_handle *handle = NULL;
507 handle = (struct QSEECom_handle *)(km_handle->qseecom);
509 ihandle.ion_alloc_handle.handle = NULL;
521 send_cmd = (keymaster_sign_data_cmd_t *)handle->ion_sbuffer;
522 resp = (keymaster_sign_data_resp_t *)(handle->ion_sbuffer +
535 ret = (*km_handle->QSEECom_set_bandwidth)(handle, true);
542 ret = (*km_handle->QSEECom_send_modified_cmd)(handle, send_cmd,
546 if((*km_handle->QSEECom_set_bandwidth)(handle, false))
588 ALOGE("Cannot handle digest type %d", sign_params->digest_type);
591 ALOGE("Cannot handle padding type %d", sign_params->padding_type);
598 struct QSEECom_handle *handle = NULL;
607 handle = (struct QSEECom_handle *)(km_handle->qseecom);
609 ihandle.ion_alloc_handle.handle = NULL;
621 send_cmd = (keymaster_verify_data_cmd_t *)handle->ion_sbuffer;
622 resp = (keymaster_verify_data_resp_t *)((char *)handle->ion_sbuffer +
639 ret = (*km_handle->QSEECom_set_bandwidth)(handle, true);
646 ret = (*km_handle->QSEECom_send_modified_cmd)(handle, send_cmd,
650 if((*km_handle->QSEECom_set_bandwidth)(handle, false))
743 ALOGE("Memalloc for keymaster handle failed");