Home
last modified time | relevance | path

Searched refs:shm (Results 1 – 25 of 34) sorted by relevance

12

/drivers/tee/
A Dtee_shm.c38 unpin_user_pages(shm->pages, shm->num_pages); in release_registered_pages()
40 shm_put_kernel_pages(shm->pages, shm->num_pages); in release_registered_pages()
62 kfree(shm); in tee_shm_release()
84 shm = kzalloc(sizeof(*shm), GFP_KERNEL); in shm_alloc_helper()
227 shm->paddr = virt_to_phys(shm->kaddr); in tee_dyn_shm_alloc_helper()
251 free_pages_exact(shm->kaddr, shm->size); in tee_dyn_shm_alloc_helper()
262 shm_unregister(shm->ctx, shm); in tee_dyn_shm_free_helper()
263 free_pages_exact(shm->kaddr, shm->size); in tee_dyn_shm_free_helper()
293 shm = kzalloc(sizeof(*shm), GFP_KERNEL); in register_shm_helper()
345 unpin_user_pages(shm->pages, shm->num_pages); in register_shm_helper()
[all …]
A Dtee_shm_pool.c12 static int pool_op_gen_alloc(struct tee_shm_pool *pool, struct tee_shm *shm, in pool_op_gen_alloc() argument
26 shm->kaddr = (void *)va; in pool_op_gen_alloc()
27 shm->paddr = gen_pool_virt_to_phys(genpool, va); in pool_op_gen_alloc()
28 shm->size = s; in pool_op_gen_alloc()
33 shm->flags &= ~TEE_SHM_DYNAMIC; in pool_op_gen_alloc()
37 static void pool_op_gen_free(struct tee_shm_pool *pool, struct tee_shm *shm) in pool_op_gen_free() argument
39 gen_pool_free(pool->private_data, (unsigned long)shm->kaddr, in pool_op_gen_free()
40 shm->size); in pool_op_gen_free()
41 shm->kaddr = NULL; in pool_op_gen_free()
A Dtee_core.c292 struct tee_shm *shm; in tee_ioctl_shm_alloc() local
302 if (IS_ERR(shm)) in tee_ioctl_shm_alloc()
305 data.id = shm->id; in tee_ioctl_shm_alloc()
318 tee_shm_put(shm); in tee_ioctl_shm_alloc()
328 struct tee_shm *shm; in tee_ioctl_shm_register() local
338 if (IS_ERR(shm)) in tee_ioctl_shm_register()
341 data.id = shm->id; in tee_ioctl_shm_register()
353 tee_shm_put(shm); in tee_ioctl_shm_register()
404 if (IS_ERR(shm)) in params_from_user()
419 shm = NULL; in params_from_user()
[all …]
A Dtee_private.h15 int tee_shm_get_fd(struct tee_shm *shm);
/drivers/tee/amdtee/
A Dshm_pool.c11 static int pool_op_alloc(struct tee_shm_pool *pool, struct tee_shm *shm, in pool_op_alloc() argument
26 shm->kaddr = (void *)va; in pool_op_alloc()
27 shm->paddr = __psp_pa((void *)va); in pool_op_alloc()
28 shm->size = PAGE_SIZE << order; in pool_op_alloc()
31 rc = amdtee_map_shmem(shm); in pool_op_alloc()
34 shm->kaddr = NULL; in pool_op_alloc()
41 static void pool_op_free(struct tee_shm_pool *pool, struct tee_shm *shm) in pool_op_free() argument
44 amdtee_unmap_shmem(shm); in pool_op_free()
45 free_pages((unsigned long)shm->kaddr, get_order(shm->size)); in pool_op_free()
46 shm->kaddr = NULL; in pool_op_free()
A Dcore.c155 u32 get_buffer_id(struct tee_shm *shm) in get_buffer_id() argument
163 if (shmdata->kaddr == shm->kaddr) { in get_buffer_id()
343 int amdtee_map_shmem(struct tee_shm *shm) in amdtee_map_shmem() argument
351 if (!shm) in amdtee_map_shmem()
359 shmem.kaddr = shm->kaddr; in amdtee_map_shmem()
360 shmem.size = shm->size; in amdtee_map_shmem()
373 shmnode->kaddr = shm->kaddr; in amdtee_map_shmem()
375 ctxdata = shm->ctx->data; in amdtee_map_shmem()
391 if (!shm) in amdtee_unmap_shmem()
394 buf_id = get_buffer_id(shm); in amdtee_unmap_shmem()
[all …]
A Damdtee_private.h148 int amdtee_map_shmem(struct tee_shm *shm);
150 void amdtee_unmap_shmem(struct tee_shm *shm);
171 u32 get_buffer_id(struct tee_shm *shm);
/drivers/tee/optee/
A Dsmc_abi.c86 struct tee_shm *shm; in from_msg_param_tmp_mem() local
94 if (!shm) { in from_msg_param_tmp_mem()
105 p->u.memref.shm = shm; in from_msg_param_tmp_mem()
113 struct tee_shm *shm; in from_msg_param_reg_mem() local
120 if (shm) { in from_msg_param_reg_mem()
122 p->u.memref.shm = shm; in from_msg_param_reg_mem()
335 tee_shm_free(shm); in __optee_disable_shm_cache()
668 tee_shm_free(shm); in handle_rpc_func_cmd_shm_free()
715 if (IS_ERR(shm)) { in handle_rpc_func_cmd_shm_alloc()
767 tee_shm_free(shm); in handle_rpc_func_cmd_shm_alloc()
[all …]
A Dffa_abi.c42 struct tee_shm *shm; member
69 shm = r->shm; in optee_shm_from_ffa_handle()
72 return shm; in optee_shm_from_ffa_handle()
84 r->shm = shm; in optee_shm_add_ffa_handle()
137 p->u.memref.shm = shm; in from_msg_param_ffa_mem()
139 if (shm) { in from_msg_param_ffa_mem()
193 struct tee_shm *shm = p->u.memref.shm; in to_msg_param_ffa_mem() local
198 if (shm) { in to_msg_param_ffa_mem()
452 if (IS_ERR(shm)) { in handle_ffa_rpc_func_cmd_shm_alloc()
478 if (!shm) in handle_ffa_rpc_func_cmd_shm_free()
[all …]
A Dcall.c38 struct tee_shm *shm; member
238 tee_shm_free(entry->shm); in optee_shm_arg_cache_uninit()
311 entry->shm = res; in optee_get_msg_arg()
325 *shm_ret = entry->shm; in optee_get_msg_arg()
369 struct tee_shm *shm; in optee_open_session() local
378 &entry, &shm, &offs); in optee_open_session()
473 struct tee_shm *shm; in optee_close_session_helper() local
520 struct tee_shm *shm; in optee_invoke_func() local
535 &entry, &shm, &offs); in optee_invoke_func()
574 struct tee_shm *shm; in optee_cancel_req() local
[all …]
A Drpc.c89 msg.buf = params[2].u.memref.shm->kaddr; in handle_rpc_func_cmd_i2c_transfer()
222 struct tee_shm *shm; in optee_rpc_cmd_alloc_suppl() local
235 shm = tee_shm_get_from_id(optee->supp.ctx, param.u.value.c); in optee_rpc_cmd_alloc_suppl()
237 return shm; in optee_rpc_cmd_alloc_suppl()
240 void optee_rpc_cmd_free_suppl(struct tee_context *ctx, struct tee_shm *shm) in optee_rpc_cmd_free_suppl() argument
246 param.u.value.b = tee_shm_get_id(shm); in optee_rpc_cmd_free_suppl()
260 tee_shm_put(shm); in optee_rpc_cmd_free_suppl()
333 buf = tee_shm_get_va(params[1].u.memref.shm, in handle_rpc_func_rpmb_probe_next()
394 p0 = tee_shm_get_va(params[0].u.memref.shm, in handle_rpc_func_rpmb_frames()
396 p1 = tee_shm_get_va(params[1].u.memref.shm, in handle_rpc_func_rpmb_frames()
A Dsupp.c179 if (tee_param_is_memref(params + n) && params[n].u.memref.shm) in supp_check_recv_params()
180 tee_shm_put(params[n].u.memref.shm); in supp_check_recv_params()
/drivers/nvmem/
A Dstm32-bsec-optee-ta.c142 struct tee_shm *shm; in stm32_bsec_optee_ta_read() local
169 if (IS_ERR(shm)) { in stm32_bsec_optee_ta_read()
170 ret = PTR_ERR(shm); in stm32_bsec_optee_ta_read()
175 param[1].u.memref.shm = shm; in stm32_bsec_optee_ta_read()
196 tee_shm_free(shm); in stm32_bsec_optee_ta_read()
207 { struct tee_shm *shm; in stm32_bsec_optee_ta_write() local
234 if (IS_ERR(shm)) { in stm32_bsec_optee_ta_write()
235 ret = PTR_ERR(shm); in stm32_bsec_optee_ta_write()
240 param[1].u.memref.shm = shm; in stm32_bsec_optee_ta_write()
247 tee_shm_free(shm); in stm32_bsec_optee_ta_write()
[all …]
/drivers/media/platform/samsung/s5p-mfc/
A Ds5p_mfc_opr_v5.c224 ctx->shm.size = buf_size->shm; in s5p_mfc_alloc_instance_buffer_v5()
233 ctx->shm.ofs = ctx->shm.dma - dev->dma_base[BANK_L_CTX]; in s5p_mfc_alloc_instance_buffer_v5()
236 memset(ctx->shm.virt, 0, buf_size->shm); in s5p_mfc_alloc_instance_buffer_v5()
681 unsigned int shm; in s5p_mfc_set_enc_params() local
765 unsigned int shm; in s5p_mfc_set_enc_params_h264() local
867 shm &= ~(0xFFF); in s5p_mfc_set_enc_params_h264()
881 shm &= ~(0xFF); in s5p_mfc_set_enc_params_h264()
922 unsigned int shm; in s5p_mfc_set_enc_params_mpeg4() local
946 shm &= ~(0xFFF); in s5p_mfc_set_enc_params_mpeg4()
1001 unsigned int shm; in s5p_mfc_set_enc_params_h263() local
[all …]
/drivers/tee/tstee/
A Dcore.c167 struct tee_shm *shm = NULL; in tstee_invoke_func() local
195 if (IS_ERR(shm)) in tstee_invoke_func()
196 return PTR_ERR(shm); in tstee_invoke_func()
198 if (shm->size < req_len) { in tstee_invoke_func()
205 handle = shm->sec_world_id; in tstee_invoke_func()
232 if (shm && shm->size >= ffa_args[TS_RPC_SERVICE_RESP_LEN]) in tstee_invoke_func()
236 if (shm) in tstee_invoke_func()
237 tee_shm_put(shm); in tstee_invoke_func()
281 lower_32_bits(shm->sec_world_id); in tstee_shm_register()
283 upper_32_bits(shm->sec_world_id); in tstee_shm_register()
[all …]
/drivers/rtc/
A Drtc-optee.c51 struct tee_shm *shm; member
69 param[0].u.memref.shm = priv->shm; in optee_rtc_readtime()
76 optee_tm = tee_shm_get_va(priv->shm, 0); in optee_rtc_readtime()
117 param[0].u.memref.shm = priv->shm; in optee_rtc_settime()
204 param[0].u.memref.shm = priv->shm; in optee_rtc_read_info()
211 info = tee_shm_get_va(priv->shm, 0); in optee_rtc_read_info()
247 struct tee_shm *shm; in optee_rtc_probe() local
278 if (IS_ERR(shm)) { in optee_rtc_probe()
280 err = PTR_ERR(shm); in optee_rtc_probe()
284 priv->shm = shm; in optee_rtc_probe()
[all …]
/drivers/char/tpm/
A Dtpm_ftpm_tee.c55 struct tee_shm *shm = pvt_data->shm; in ftpm_tee_tpm_op_send() local
78 .shm = shm, in ftpm_tee_tpm_op_send()
84 temp_buf = tee_shm_get_va(shm, 0); in ftpm_tee_tpm_op_send()
96 .shm = shm, in ftpm_tee_tpm_op_send()
110 temp_buf = tee_shm_get_va(shm, command_params[1].u.memref.shm_offs); in ftpm_tee_tpm_op_send()
212 pvt_data->shm = tee_shm_alloc_kernel_buf(pvt_data->ctx, in ftpm_tee_probe()
215 if (IS_ERR(pvt_data->shm)) { in ftpm_tee_probe()
245 tee_shm_free(pvt_data->shm); in ftpm_tee_probe()
279 tee_shm_free(pvt_data->shm); in ftpm_tee_remove()
307 tee_shm_free(pvt_data->shm); in ftpm_plat_tee_shutdown()
A Dtpm_ftpm_tee.h32 struct tee_shm *shm; member
/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/
A Dgsp.c1142 gsp->shm.ptes.nr = (gsp->shm.cmdq.size + gsp->shm.msgq.size) >> GSP_PAGE_SHIFT; in r535_gsp_shared_init()
1143 gsp->shm.ptes.nr += DIV_ROUND_UP(gsp->shm.ptes.nr * sizeof(u64), GSP_PAGE_SIZE); in r535_gsp_shared_init()
1144 gsp->shm.ptes.size = ALIGN(gsp->shm.ptes.nr * sizeof(u64), GSP_PAGE_SIZE); in r535_gsp_shared_init()
1149 &gsp->shm.mem); in r535_gsp_shared_init()
1153 gsp->shm.ptes.ptr = gsp->shm.mem.data; in r535_gsp_shared_init()
1154 gsp->shm.cmdq.ptr = (u8 *)gsp->shm.ptes.ptr + gsp->shm.ptes.size; in r535_gsp_shared_init()
1155 gsp->shm.msgq.ptr = (u8 *)gsp->shm.cmdq.ptr + gsp->shm.cmdq.size; in r535_gsp_shared_init()
1158 gsp->shm.ptes.ptr[i] = gsp->shm.mem.addr + (i << GSP_PAGE_SHIFT); in r535_gsp_shared_init()
1160 cmdq = gsp->shm.cmdq.ptr; in r535_gsp_shared_init()
1189 (u8 *)gsp->shm.cmdq.ptr - (u8 *)gsp->shm.mem.data; in r535_gsp_set_rmargs()
[all …]
A Drpc.c176 return (void *)((u8 *)gsp->shm.msgq.ptr + GSP_PAGE_SIZE + in r535_gsp_msgq_get_entry()
275 mqe = (void *)((u8 *)gsp->shm.msgq.ptr + 0x1000 + 0 * 0x1000); in r535_gsp_msgq_recv_one_elem()
394 cqe = (void *)((u8 *)gsp->shm.cmdq.ptr + 0x1000 + wptr * 0x1000); in r535_gsp_cmdq_push()
/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/
A Dgsp.c188 args->messageQueueInitArguments.sharedMemPhysAddr = gsp->shm.mem.addr; in r570_gsp_set_rmargs()
189 args->messageQueueInitArguments.pageTableEntryCount = gsp->shm.ptes.nr; in r570_gsp_set_rmargs()
191 (u8 *)gsp->shm.cmdq.ptr - (u8 *)gsp->shm.mem.data; in r570_gsp_set_rmargs()
193 (u8 *)gsp->shm.msgq.ptr - (u8 *)gsp->shm.mem.data; in r570_gsp_set_rmargs()
/drivers/firmware/efi/stmm/
A Dtee_stmm_efi.c58 struct tee_shm *shm = NULL; in tee_mm_communicate() local
70 shm = tee_shm_register_kernel_buf(pvt_data.ctx, comm_buf, buf_size); in tee_mm_communicate()
71 if (IS_ERR(shm)) { in tee_mm_communicate()
84 param[0].u.memref.shm = shm; in tee_mm_communicate()
90 tee_shm_free(shm); in tee_mm_communicate()
/drivers/net/wireless/broadcom/b43legacy/
A Ddebugfs.c325 B43legacy_DEBUGFS_FOPS(shm, shm_read_file, NULL, 1);
393 ADD_FILE(shm, 0400); in b43legacy_debugfs_add_device()
/drivers/net/wwan/iosm/
A Diosm_ipc_protocol_ops.h306 } __packed shm; member
/drivers/firmware/arm_scmi/transports/
A Doptee.c295 param[1].u.memref.shm = channel->tee_shm; in invoke_process_msg_channel()
299 param[2].u.memref.shm = channel->tee_shm; in invoke_process_msg_channel()

Completed in 74 milliseconds

12