• Home
  • Raw
  • Download

Lines Matching refs:shm

105 	msg.buf  = params[2].u.memref.shm->kaddr;  in handle_rpc_func_cmd_i2c_transfer()
269 struct tee_shm *shm; in cmd_alloc_suppl() local
282 shm = tee_shm_get_from_id(optee->supp.ctx, param.u.value.c); in cmd_alloc_suppl()
284 return shm; in cmd_alloc_suppl()
293 struct tee_shm *shm; in handle_rpc_func_cmd_shm_alloc() local
315 shm = cmd_alloc_suppl(ctx, sz); in handle_rpc_func_cmd_shm_alloc()
318 shm = tee_shm_alloc(optee->ctx, sz, in handle_rpc_func_cmd_shm_alloc()
326 if (IS_ERR(shm)) { in handle_rpc_func_cmd_shm_alloc()
331 if (tee_shm_get_pa(shm, 0, &pa)) { in handle_rpc_func_cmd_shm_alloc()
336 sz = tee_shm_get_size(shm); in handle_rpc_func_cmd_shm_alloc()
338 if (tee_shm_is_registered(shm)) { in handle_rpc_func_cmd_shm_alloc()
343 pages = tee_shm_get_pages(shm, &page_num); in handle_rpc_func_cmd_shm_alloc()
365 (tee_shm_get_page_offset(shm) & in handle_rpc_func_cmd_shm_alloc()
367 arg->params[0].u.tmem.size = tee_shm_get_size(shm); in handle_rpc_func_cmd_shm_alloc()
368 arg->params[0].u.tmem.shm_ref = (unsigned long)shm; in handle_rpc_func_cmd_shm_alloc()
371 tee_shm_get_page_offset(shm)); in handle_rpc_func_cmd_shm_alloc()
376 arg->params[0].u.tmem.shm_ref = (unsigned long)shm; in handle_rpc_func_cmd_shm_alloc()
382 tee_shm_free(shm); in handle_rpc_func_cmd_shm_alloc()
385 static void cmd_free_suppl(struct tee_context *ctx, struct tee_shm *shm) in cmd_free_suppl() argument
391 param.u.value.b = tee_shm_get_id(shm); in cmd_free_suppl()
405 tee_shm_put(shm); in cmd_free_suppl()
413 struct tee_shm *shm; in handle_rpc_func_cmd_shm_free() local
423 shm = (struct tee_shm *)(unsigned long)arg->params[0].u.value.b; in handle_rpc_func_cmd_shm_free()
426 cmd_free_suppl(ctx, shm); in handle_rpc_func_cmd_shm_free()
429 tee_shm_free(shm); in handle_rpc_func_cmd_shm_free()
453 struct tee_shm *shm, in handle_rpc_func_cmd() argument
458 arg = tee_shm_get_va(shm, 0); in handle_rpc_func_cmd()
460 pr_err("%s: tee_shm_get_va %p failed\n", __func__, shm); in handle_rpc_func_cmd()
502 struct tee_shm *shm; in optee_handle_rpc() local
507 shm = tee_shm_alloc(optee->ctx, param->a1, in optee_handle_rpc()
509 if (!IS_ERR(shm) && !tee_shm_get_pa(shm, 0, &pa)) { in optee_handle_rpc()
512 (unsigned long)shm); in optee_handle_rpc()
521 shm = reg_pair_to_ptr(param->a1, param->a2); in optee_handle_rpc()
522 tee_shm_free(shm); in optee_handle_rpc()
533 shm = reg_pair_to_ptr(param->a1, param->a2); in optee_handle_rpc()
534 handle_rpc_func_cmd(ctx, optee, shm, call_ctx); in optee_handle_rpc()