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, in qcom_km_ION_memalloc() argument
208 if(handle == NULL){ in qcom_km_ION_memalloc()
217 handle->ion_sbuffer = NULL; in qcom_km_ION_memalloc()
218 handle->ifd_data_fd = 0; in qcom_km_ION_memalloc()
239 if (ion_alloc_data.handle != NULL) { in qcom_km_ION_memalloc()
240 ifd_data.handle = ion_alloc_data.handle; in qcom_km_ION_memalloc()
261 handle->ion_fd = ion_fd; in qcom_km_ION_memalloc()
262 handle->ifd_data_fd = ifd_data.fd; in qcom_km_ION_memalloc()
263 handle->ion_sbuffer = v_addr; in qcom_km_ION_memalloc()
264 handle->ion_alloc_handle.handle = ion_alloc_data.handle; in qcom_km_ION_memalloc()
265 handle->sbuf_len = size; in qcom_km_ION_memalloc()
269 if (handle->ion_sbuffer != NULL) { in qcom_km_ION_memalloc()
270 iret = munmap(handle->ion_sbuffer, ion_alloc_data.len); in qcom_km_ION_memalloc()
276 handle_data.handle = ion_alloc_data.handle; in qcom_km_ION_memalloc()
277 if (handle->ifd_data_fd) in qcom_km_ION_memalloc()
278 close(handle->ifd_data_fd); in qcom_km_ION_memalloc()
294 static int32_t qcom_km_ion_dealloc(struct qcom_km_ion_info_t *handle) in qcom_km_ion_dealloc() argument
300 ret = munmap(handle->ion_sbuffer, (handle->sbuf_len + 4095) & (~4095)); in qcom_km_ion_dealloc()
305 handle_data.handle = handle->ion_alloc_handle.handle; in qcom_km_ion_dealloc()
306 close(handle->ifd_data_fd); in qcom_km_ion_dealloc()
307 ret = ioctl(handle->ion_fd, ION_IOC_FREE, &handle_data); in qcom_km_ion_dealloc()
311 close(handle->ion_fd); in qcom_km_ion_dealloc()
339 struct QSEECom_handle *handle = NULL; in qcom_km_generate_keypair() local
343 handle = (struct QSEECom_handle *)(km_handle->qseecom); in qcom_km_generate_keypair()
344 send_cmd = (keymaster_gen_keypair_cmd_t *)handle->ion_sbuffer; in qcom_km_generate_keypair()
345 resp = (keymaster_gen_keypair_resp_t *)(handle->ion_sbuffer + in qcom_km_generate_keypair()
354 ret = (*km_handle->QSEECom_set_bandwidth)(handle, true); in qcom_km_generate_keypair()
360 ret = (*km_handle->QSEECom_send_cmd)(handle, send_cmd, in qcom_km_generate_keypair()
364 if((*km_handle->QSEECom_set_bandwidth)(handle, false)) in qcom_km_generate_keypair()
406 ihandle.ion_alloc_handle.handle = NULL; in qcom_km_import_keypair()
418 struct QSEECom_handle *handle = NULL; in qcom_km_import_keypair() local
423 handle = (struct QSEECom_handle *)(km_handle->qseecom); in qcom_km_import_keypair()
424 send_cmd = (keymaster_import_keypair_cmd_t *)handle->ion_sbuffer; in qcom_km_import_keypair()
425 resp = (keymaster_import_keypair_resp_t *)(handle->ion_sbuffer + in qcom_km_import_keypair()
436 ret = (*km_handle->QSEECom_set_bandwidth)(handle, true); in qcom_km_import_keypair()
442 ret = (*km_handle->QSEECom_send_modified_cmd)(handle, send_cmd, in qcom_km_import_keypair()
446 if((*km_handle->QSEECom_set_bandwidth)(handle, false)) in qcom_km_import_keypair()
499 struct QSEECom_handle *handle = NULL; in qcom_km_sign_data() local
507 handle = (struct QSEECom_handle *)(km_handle->qseecom); in qcom_km_sign_data()
509 ihandle.ion_alloc_handle.handle = NULL; in qcom_km_sign_data()
521 send_cmd = (keymaster_sign_data_cmd_t *)handle->ion_sbuffer; in qcom_km_sign_data()
522 resp = (keymaster_sign_data_resp_t *)(handle->ion_sbuffer + in qcom_km_sign_data()
535 ret = (*km_handle->QSEECom_set_bandwidth)(handle, true); in qcom_km_sign_data()
542 ret = (*km_handle->QSEECom_send_modified_cmd)(handle, send_cmd, in qcom_km_sign_data()
546 if((*km_handle->QSEECom_set_bandwidth)(handle, false)) in qcom_km_sign_data()
598 struct QSEECom_handle *handle = NULL; in qcom_km_verify_data() local
607 handle = (struct QSEECom_handle *)(km_handle->qseecom); in qcom_km_verify_data()
609 ihandle.ion_alloc_handle.handle = NULL; in qcom_km_verify_data()
621 send_cmd = (keymaster_verify_data_cmd_t *)handle->ion_sbuffer; in qcom_km_verify_data()
622 resp = (keymaster_verify_data_resp_t *)((char *)handle->ion_sbuffer + in qcom_km_verify_data()
639 ret = (*km_handle->QSEECom_set_bandwidth)(handle, true); in qcom_km_verify_data()
646 ret = (*km_handle->QSEECom_send_modified_cmd)(handle, send_cmd, in qcom_km_verify_data()
650 if((*km_handle->QSEECom_set_bandwidth)(handle, false)) in qcom_km_verify_data()