/optee_os/core/include/mm/ |
A D | mobj.h | 58 if (mobj && mobj->ops && mobj->ops->get_va) in mobj_get_va() 66 if (mobj && mobj->ops && mobj->ops->get_pa) in mobj_get_pa() 73 if (mobj && mobj->ops && mobj->ops->get_phys_offs) in mobj_get_phys_offs() 80 if (mobj && mobj->ops && mobj->ops->get_cattr) in mobj_get_cattr() 87 if (mobj && mobj->ops && mobj->ops->matches) in mobj_matches() 104 if (mobj && mobj->ops) { in mobj_inc_map() 124 if (mobj && mobj->ops) { in mobj_dec_map() 140 static inline struct mobj *mobj_get(struct mobj *mobj) in mobj_get() argument 158 mobj->ops->free(mobj); in mobj_put() 180 if (mobj && mobj->ops && mobj->ops->get_cookie) in mobj_get_cookie() [all …]
|
A D | vm.h | 30 uint32_t prot, uint32_t flags, struct mobj *mobj, 41 struct mobj *mobj, size_t offs) in vm_map() argument 43 return vm_map_pad(uctx, va, len, prot, flags, mobj, offs, 0, 0, 0); in vm_map() 65 TEE_Result vm_add_rwmem(struct user_mode_ctx *uctx, struct mobj *mobj, 67 void vm_rem_rwmem(struct user_mode_ctx *uctx, struct mobj *mobj, vaddr_t va); 84 struct mobj **mobj, size_t *offs); 102 struct mobj *vm_get_mobj(struct user_mode_ctx *uctx, vaddr_t va, size_t *len,
|
A D | sp_mem.h | 38 struct mobj *mobj; member 78 struct mobj *mobj); 81 struct mobj *sp_mem_new_mobj(uint64_t pages); 82 int sp_mem_add_pages(struct mobj *mobj, unsigned int *idx,
|
/optee_os/core/mm/ |
A D | mobj.c | 36 struct mobj mobj; member 43 static struct mobj_phys *to_mobj_phys(struct mobj *mobj); 112 static void mobj_phys_free(struct mobj *mobj) in mobj_phys_free() argument 135 return container_of(mobj, struct mobj_phys, mobj); in to_mobj_phys() 245 struct mobj mobj; member 287 static void mobj_mm_free(struct mobj *mobj) in mobj_mm_free() argument 346 struct mobj mobj; member 398 static void mobj_shm_free(struct mobj *mobj) in mobj_shm_free() argument 457 struct mobj mobj; member 566 struct mobj mobj; member [all …]
|
A D | vm.c | 288 reg->mobj = mobj_get(mobj); in vm_map_pad() 397 r2->mobj = mobj_get(r->mobj); in split_vm_region() 490 if (r->mobj != r_next->mobj || in merge_vm_range() 799 struct mobj *mobj = NULL; in map_kinit() local 876 if (mem->mobj != region->mobj) in param_mem_to_user_va() 900 if (!m0->mobj && !m1->mobj) in cmp_param_mem() 941 mem[n].mobj = param->u[n].mem.mobj; in vm_map_param() 966 if (mem[n].mobj == mem[m].mobj && in vm_map_param() 1031 reg->mobj = mobj; in vm_add_rwmem() 1060 if (r->mobj == mobj && r->va == va) { in vm_rem_rwmem() [all …]
|
/optee_os/core/arch/arm/mm/ |
A D | mobj_dyn_shm.c | 35 struct mobj mobj; member 64 static struct mobj_reg_shm *to_mobj_reg_shm(struct mobj *mobj); 97 static size_t mobj_reg_shm_get_phys_offs(struct mobj *mobj, in mobj_reg_shm_get_phys_offs() argument 137 static void mobj_reg_shm_free(struct mobj *mobj) in mobj_reg_shm_free() argument 180 static TEE_Result mobj_reg_shm_inc_map(struct mobj *mobj) in mobj_reg_shm_inc_map() argument 231 static TEE_Result mobj_reg_shm_dec_map(struct mobj *mobj) in mobj_reg_shm_dec_map() argument 251 static uint64_t mobj_reg_shm_get_cookie(struct mobj *mobj) in mobj_reg_shm_get_cookie() argument 293 return container_of(mobj, struct mobj_reg_shm, mobj); in to_mobj_reg_shm() 344 void mobj_reg_shm_unguard(struct mobj *mobj) in mobj_reg_shm_unguard() argument 439 if (!mobj) in mobj_mapped_shm_alloc() [all …]
|
A D | sp_mem.c | 24 struct mobj mobj; member 28 static struct mobj_sp *to_mobj_sp(struct mobj *mobj) in to_mobj_sp() argument 31 return container_of(mobj, struct mobj_sp, mobj); in to_mobj_sp() 63 return &m->mobj; in sp_mem_new_mobj() 72 int sp_mem_add_pages(struct mobj *mobj, unsigned int *idx, in sp_mem_add_pages() argument 99 static bool mobj_sp_matches(struct mobj *mobj __maybe_unused, in mobj_sp_matches() 107 static TEE_Result get_pa(struct mobj *mobj, size_t offset, in get_pa() argument 142 static void inactivate(struct mobj *mobj) in inactivate() argument 193 struct mobj *mobj) in sp_mem_get_va() argument 198 if (region->mobj == mobj && region->offset == offset) in sp_mem_get_va() [all …]
|
A D | mobj_ffa.c | 18 struct mobj mobj; member 46 static struct mobj_ffa *to_mobj_ffa(struct mobj *mobj) in to_mobj_ffa() argument 49 return container_of(mobj, struct mobj_ffa, mobj); in to_mobj_ffa() 431 return &mf->mobj; 434 static TEE_Result ffa_get_pa(struct mobj *mobj, size_t offset, argument 465 static size_t ffa_get_phys_offs(struct mobj *mobj, argument 473 static void *ffa_get_va(struct mobj *mobj, size_t offset, size_t len) argument 483 static void ffa_inactivate(struct mobj *mobj) argument 525 static uint64_t ffa_get_cookie(struct mobj *mobj) argument 530 static TEE_Result ffa_inc_map(struct mobj *mobj) argument [all …]
|
/optee_os/core/arch/arm/kernel/ |
A D | thread_optee_smc.c | 119 struct mobj *mobj; in map_cmd_buffer() local 126 if (!mobj) in map_cmd_buffer() 162 struct mobj *mobj = NULL; in std_smc_entry() local 319 struct mobj *mobj = NULL; in thread_rpc_alloc_arg() local 332 if (!mobj) in thread_rpc_alloc_arg() 365 struct mobj *mobj = tpm->u.memref.mobj; in set_tmem() local 396 struct mobj *mobj = thread_rpc_alloc_arg(sz); in get_rpc_arg() local 536 struct mobj *mobj = NULL; in get_rpc_alloc_res() local 620 void thread_rpc_free_payload(struct mobj *mobj) in thread_rpc_free_payload() argument 623 mobj); in thread_rpc_free_payload() [all …]
|
A D | thread_spmc.c | 1019 struct mobj *mobj = NULL; in yielding_call_with_arg() local 1024 if (!mobj) { in yielding_call_with_arg() 1056 mobj_put(mobj); in yielding_call_with_arg() 1242 struct mobj *mobj = NULL; in thread_rpc_alloc() local 1257 if (!mobj) { in thread_rpc_alloc() 1277 return mobj; in thread_rpc_alloc() 1290 void thread_rpc_free_kernel_payload(struct mobj *mobj) in thread_rpc_free_kernel_payload() argument 1295 void thread_rpc_free_payload(struct mobj *mobj) in thread_rpc_free_payload() argument 1298 mobj); in thread_rpc_free_payload() 1306 void thread_rpc_free_global_payload(struct mobj *mobj) in thread_rpc_free_global_payload() argument [all …]
|
A D | rpc_io_i2c.c | 23 struct mobj *mobj = NULL; in rpc_io_i2c_transfer() local 33 req->buffer_len, &mobj); in rpc_io_i2c_transfer() 42 p[2] = THREAD_PARAM_MEMREF(INOUT, mobj, 0, req->buffer_len); in rpc_io_i2c_transfer()
|
A D | thread.c | 1503 void thread_get_user_kcode(struct mobj **mobj, size_t *offset, in thread_get_user_kcode() argument 1507 *mobj = mobj_tee_ram_rx; in thread_get_user_kcode() 1515 void thread_get_user_kdata(struct mobj **mobj, size_t *offset, in thread_get_user_kdata() argument 1522 *mobj = mobj_tee_ram_rw; in thread_get_user_kdata() 1610 if (ce->mobj) { in clear_shm_cache_entry() 1626 ce->mobj = NULL; in clear_shm_cache_entry() 1651 size_t size, struct mobj **mobj) in thread_rpc_shm_cache_alloc() argument 1675 if (!ce->mobj) in thread_rpc_shm_cache_alloc() 1684 va = mobj_get_va(ce->mobj, 0, sz); in thread_rpc_shm_cache_alloc() 1691 va = mobj_get_va(ce->mobj, 0, sz); in thread_rpc_shm_cache_alloc() [all …]
|
/optee_os/core/kernel/ |
A D | msg_param.c | 66 struct mobj *mobj; in msg_param_extract_pages() local 78 mobj = mobj_mapped_shm_alloc(&buffer, 1, 0, 0); in msg_param_extract_pages() 79 if (!mobj) in msg_param_extract_pages() 82 va = mobj_get_va(mobj, 0, SMALL_PAGE_SIZE); in msg_param_extract_pages() 96 mobj_put(mobj); in msg_param_extract_pages() 97 mobj = mobj_mapped_shm_alloc(&page, 1, 0, 0); in msg_param_extract_pages() 98 if (!mobj) in msg_param_extract_pages() 101 va = mobj_get_va(mobj, 0, SMALL_PAGE_SIZE); in msg_param_extract_pages() 111 mobj_put(mobj); in msg_param_extract_pages() 118 struct mobj *mobj = NULL; in msg_param_mobj_from_noncontig() local [all …]
|
A D | user_ta.c | 266 struct mobj *mobj = NULL; in user_ta_dump_ftrace() local 281 mobj = thread_rpc_alloc_payload(pl_sz); in user_ta_dump_ftrace() 282 if (!mobj) { in user_ta_dump_ftrace() 287 buf = mobj_get_va(mobj, 0, pl_sz); in user_ta_dump_ftrace() 291 res = vm_map(&utc->uctx, &va, mobj->size, prot, VM_FLAG_EPHEMERAL, in user_ta_dump_ftrace() 292 mobj, 0); in user_ta_dump_ftrace() 296 ubuf = (uint8_t *)va + mobj_get_phys_offs(mobj, mobj->phys_granule); in user_ta_dump_ftrace() 312 params[1] = THREAD_PARAM_MEMREF(IN, mobj, 0, sizeof(TEE_UUID)); in user_ta_dump_ftrace() 313 params[2] = THREAD_PARAM_MEMREF(IN, mobj, sizeof(TEE_UUID), in user_ta_dump_ftrace() 321 res = vm_unmap(&utc->uctx, va, mobj->size); in user_ta_dump_ftrace() [all …]
|
A D | ree_fs_ta.c | 61 struct mobj *mobj; member 83 size_t *ta_size, struct mobj **mobj) in rpc_load() argument 88 if (!uuid || !ta || !mobj || !ta_size) in rpc_load() 101 if (!*mobj) in rpc_load() 117 params[1].u.memref.mobj = *mobj; in rpc_load() 122 thread_rpc_free_payload(*mobj); in rpc_load() 132 struct mobj *mobj = NULL; in ree_fs_ta_open() local 147 res = rpc_load(uuid, &ta, &ta_size, &mobj); in ree_fs_ta_open() 280 handle->mobj = mobj; in ree_fs_ta_open() 287 thread_rpc_free_payload(mobj); in ree_fs_ta_open() [all …]
|
A D | ldelf_syscalls.c | 36 struct mobj *mobj = NULL; in ldelf_syscall_map_zi() local 49 mobj = mobj_with_fobj_alloc(f, NULL); in ldelf_syscall_map_zi() 51 if (!mobj) in ldelf_syscall_map_zi() 54 mobj, 0, pad_begin, pad_end, 0); in ldelf_syscall_map_zi() 55 mobj_put(mobj); in ldelf_syscall_map_zi() 273 struct mobj *mobj = NULL; in ldelf_syscall_map_bin() local 344 if (!mobj) { in ldelf_syscall_map_bin() 350 mobj, 0, pad_begin, pad_end, 0); in ldelf_syscall_map_bin() 351 mobj_put(mobj); in ldelf_syscall_map_bin() 370 if (!mobj) { in ldelf_syscall_map_bin() [all …]
|
A D | pseudo_ta.c | 29 static bool validate_in_param(struct ts_session *s, struct mobj *mobj) in validate_in_param() argument 32 if (!mobj) in validate_in_param() 40 if (mobj_is_nonsec(mobj)) in validate_in_param() 47 struct mobj *mobj __unused) in validate_in_param() 76 if (!validate_in_param(s, mem->mobj)) in copy_in_param() 79 TEE_Result res = mobj_inc_map(mem->mobj); in copy_in_param() 84 va = mobj_get_va(mem->mobj, mem->offs, in copy_in_param() 135 res = mobj_dec_map(param->u[n].mem.mobj); in unmap_mapped_param()
|
/optee_os/core/tee/ |
A D | tee_fs_rpc.c | 57 struct mobj *mobj = NULL; in operation_open_dfh() local 63 TEE_FS_NAME_MAX, &mobj); in operation_open_dfh() 74 [1] = THREAD_PARAM_MEMREF(IN, mobj, 0, TEE_FS_NAME_MAX), in operation_open_dfh() 115 struct mobj *mobj; in tee_fs_rpc_read_init() local 123 data_len, &mobj); in tee_fs_rpc_read_init() 131 [1] = THREAD_PARAM_MEMREF(OUT, mobj, 0, data_len), in tee_fs_rpc_read_init() 154 struct mobj *mobj; in tee_fs_rpc_write_init() local 162 data_len, &mobj); in tee_fs_rpc_write_init() 170 [1] = THREAD_PARAM_MEMREF(IN, mobj, 0, data_len), in tee_fs_rpc_write_init() 201 struct mobj *mobj = NULL; in tee_fs_rpc_remove_dfh() local [all …]
|
A D | entry_std.c | 45 struct mobj *mobj, in param_mem_from_mobj() argument 57 mem->mobj = mobj_get(mobj); in param_mem_from_mobj() 72 mem->mobj = NULL; in set_fmem_param() 79 if (!mem->mobj) in set_fmem_param() 101 struct mobj __maybe_unused **mobj; in set_tmem_param() local 109 mem->mobj = NULL; in set_tmem_param() 121 if (!mem->mobj) in set_tmem_param() 136 for (mobj = sdp_mem_mobjs; *mobj; mobj++) in set_tmem_param() 153 if (!mem->mobj) in set_rmem_param() 486 struct mobj *mobj = NULL; in register_shm() local [all …]
|
A D | tee_supp_plugin_rpc.c | 26 struct mobj *mobj = NULL; in tee_invoke_supp_plugin_rpc() local 42 mobj = thread_rpc_alloc_payload(len); in tee_invoke_supp_plugin_rpc() 43 if (!mobj) { in tee_invoke_supp_plugin_rpc() 48 va = mobj_get_va(mobj, 0, len); in tee_invoke_supp_plugin_rpc() 63 params[3] = THREAD_PARAM_MEMREF(INOUT, mobj, 0, len); in tee_invoke_supp_plugin_rpc() 75 thread_rpc_free_payload(mobj); in tee_invoke_supp_plugin_rpc()
|
A D | socket.c | 23 struct mobj *mobj = NULL; in socket_open() local 39 params[1].memref.size, &mobj); in socket_open() 50 tpm[2] = THREAD_PARAM_MEMREF(IN, mobj, 0, params[1].memref.size); in socket_open() 85 struct mobj *mobj = NULL; in socket_send() local 101 params[1].memref.size, &mobj); in socket_send() 109 tpm[1] = THREAD_PARAM_MEMREF(IN, mobj, 0, params[1].memref.size); in socket_send() 123 struct mobj *mobj = NULL; in socket_recv() local 140 params[1].memref.size, &mobj); in socket_recv() 147 tpm[1] = THREAD_PARAM_MEMREF(OUT, mobj, 0, params[1].memref.size); in socket_recv() 164 struct mobj *mobj = NULL; in socket_ioctl() local [all …]
|
/optee_os/core/arch/arm/include/kernel/ |
A D | thread.h | 543 void thread_get_user_kcode(struct mobj **mobj, size_t *offset, 546 static inline void thread_get_user_kcode(struct mobj **mobj, size_t *offset, in thread_get_user_kcode() argument 549 *mobj = NULL; in thread_get_user_kcode() 562 void thread_get_user_kdata(struct mobj **mobj, size_t *offset, 565 static inline void thread_get_user_kdata(struct mobj **mobj, size_t *offset, in thread_get_user_kdata() argument 568 *mobj = NULL; in thread_get_user_kdata() 647 void thread_rpc_free_payload(struct mobj *mobj); 664 void thread_rpc_free_kernel_payload(struct mobj *mobj); 669 struct mobj *mobj; member 742 void thread_rpc_free_global_payload(struct mobj *mobj); [all …]
|
/optee_os/core/pta/ |
A D | gprof.c | 21 struct mobj *mobj; in gprof_send_rpc() local 25 mobj = thread_rpc_alloc_payload(sizeof(*uuid) + len); in gprof_send_rpc() 26 if (!mobj) in gprof_send_rpc() 29 va = mobj_get_va(mobj, 0, sizeof(*uuid) + len); in gprof_send_rpc() 37 params[1] = THREAD_PARAM_MEMREF(IN, mobj, 0, sizeof(*uuid)); in gprof_send_rpc() 38 params[2] = THREAD_PARAM_MEMREF(IN, mobj, sizeof(*uuid), len); in gprof_send_rpc() 46 thread_rpc_free_payload(mobj); in gprof_send_rpc()
|
/optee_os/out/arm/core/mm/ |
A D | .mobj.o.cmd | 1 …mobj.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch64/bin/aar…
|
/optee_os/core/include/kernel/ |
A D | msg_param.h | 52 struct mobj *msg_param_mobj_from_noncontig(paddr_t buf_ptr, size_t size, 55 static inline struct mobj *
|