/optee_os-3.20.0/core/mm/ |
A D | tee_mm.c | 253 tee_mm_entry_t *mm; in tee_mm_alloc2() local 265 if (!mm) in tee_mm_alloc2() 288 tee_mm_add(entry, mm); in tee_mm_alloc2() 290 mm->offset = offslo; in tee_mm_alloc2() 291 mm->size = offshi - offslo; in tee_mm_alloc2() 292 mm->pool = pool; in tee_mm_alloc2() 296 return mm; in tee_mm_alloc2() 299 pfree(pool, mm); in tee_mm_alloc2() 329 if (!mm || !mm->pool) in tee_mm_get_bytes() 332 return mm->size << mm->pool->shift; in tee_mm_get_bytes() [all …]
|
A D | fobj.c | 156 if (!mm) in rwp_paged_iv_alloc() 167 tee_mm_free(mm); in rwp_paged_iv_alloc() 222 assert(mm); in rwp_paged_iv_free() 225 tee_mm_free(mm); in rwp_paged_iv_free() 269 if (!mm) in rwp_unpaged_iv_alloc() 338 assert(mm); in rwp_unpaged_iv_free() 341 tee_mm_free(mm); in rwp_unpaged_iv_free() 744 tee_mm_entry_t *mm; member 763 if (!f->mm) in fobj_sec_mem_alloc() 777 tee_mm_free(f->mm); in fobj_sec_mem_alloc() [all …]
|
A D | core_mmu.c | 758 switch (mm->type) { in map_is_tee_ram() 1658 vaddr_t vaddr = mm->va; in core_mmu_map_region() 1659 paddr_t paddr = mm->pa; in core_mmu_map_region() 1660 ssize_t size_left = mm->size; in core_mmu_map_region() 1684 block_size, mm)) { in core_mmu_map_region() 1719 struct tee_mmap_region *mm; in core_mmu_map_pages() local 1737 if (!mm || !va_is_in_map(mm, vaddr + num_pages * SMALL_PAGE_SIZE - 1)) in core_mmu_map_pages() 1796 struct tee_mmap_region *mm = NULL; in core_mmu_map_contiguous_pages() local 1815 if (!mm || !va_is_in_map(mm, vaddr + num_pages * SMALL_PAGE_SIZE - 1)) in core_mmu_map_contiguous_pages() 1861 struct tee_mmap_region *mm; in core_mmu_unmap_pages() local [all …]
|
A D | mobj.c | 245 tee_mm_entry_t *mm; member 254 tee_mm_entry_t *mm = to_mobj_mm(mobj)->mm; in mobj_mm_offs() local 256 return (mm->offset << mm->pool->shift) + offs; in mobj_mm_offs() 293 tee_mm_free(m->mm); in mobj_mm_free() 324 m->mm = tee_mm_alloc(pool, size); in mobj_mm_alloc() 325 if (!m->mm) { in mobj_mm_alloc()
|
/optee_os-3.20.0/core/arch/arm/mm/ |
A D | mobj_dyn_shm.c | 38 tee_mm_entry_t *mm; member 117 assert(r->mm); in reg_shm_unmap_helper() 119 core_mmu_unmap_pages(tee_mm_get_smem(r->mm), r->mm->size); in reg_shm_unmap_helper() 120 tee_mm_free(r->mm); in reg_shm_unmap_helper() 121 r->mm = NULL; in reg_shm_unmap_helper() 128 if (mobj_reg_shm->mm) in reg_shm_free_helper() 206 if (!r->mm) { in mobj_reg_shm_inc_map() 208 r->mm = tee_mm_alloc(&tee_mm_shm, sz); in mobj_reg_shm_inc_map() 209 if (!r->mm) { in mobj_reg_shm_inc_map() 218 tee_mm_free(r->mm); in mobj_reg_shm_inc_map() [all …]
|
A D | core_mmu_v7.c | 714 if (!(mm->attr & TEE_MATTR_VALID_BLOCK)) in print_mmap_area() 716 str, mm->va, mm->va + mm->size); in print_mmap_area() 719 str, mm->va, mm->va + mm->size, in print_mmap_area() 721 mm->attr & TEE_MATTR_PW ? "RW" : "RO", in print_mmap_area() 722 mm->attr & TEE_MATTR_PX ? "X" : "XN", in print_mmap_area() 729 size_t idx = mm->va >> SECTION_SHIFT; in map_memarea_sections() 733 if (core_mmap_is_end_of_table(mm)) in map_memarea_sections() 736 print_mmap_area(mm, "section map"); in map_memarea_sections() 738 attr = mattr_to_desc(1, mm->attr); in map_memarea_sections() 740 pa = mm->pa; in map_memarea_sections() [all …]
|
A D | mobj_ffa.c | 20 tee_mm_entry_t *mm; member 186 assert(!mf->mm); in mobj_ffa_sel1_spmc_delete() 249 if (mf->mm) { in unmap_helper() 250 core_mmu_unmap_pages(tee_mm_get_smem(mf->mm), in unmap_helper() 252 tee_mm_free(mf->mm); in unmap_helper() 253 mf->mm = NULL; in unmap_helper() 550 if (!mf->mm) { in ffa_inc_map() 552 mf->mm = tee_mm_alloc(&tee_mm_shm, sz); in ffa_inc_map() 553 if (!mf->mm) { in ffa_inc_map() 562 tee_mm_free(mf->mm); in ffa_inc_map() [all …]
|
A D | core_mmu_lpae.c | 611 struct tee_mmap_region *mm) in core_init_mmu_prtn_tee() argument 615 assert(prtn && mm); in core_init_mmu_prtn_tee() 619 mm[n].va, mm[n].pa, mm[n].size, mm[n].attr); in core_init_mmu_prtn_tee() 621 if (!IS_PAGE_ALIGNED(mm[n].pa) || !IS_PAGE_ALIGNED(mm[n].size)) in core_init_mmu_prtn_tee() 628 for (n = 0; !core_mmap_is_end_of_table(mm + n); n++) in core_init_mmu_prtn_tee() 629 if (!core_mmu_is_dynamic_vaspace(mm + n)) in core_init_mmu_prtn_tee() 630 core_mmu_map_region(prtn, mm + n); in core_init_mmu_prtn_tee() 791 core_init_mmu_prtn_tee(prtn, mm); in core_init_mmu_prtn() 795 void core_init_mmu(struct tee_mmap_region *mm) in core_init_mmu() argument 809 core_init_mmu_prtn_tee(&default_partition, mm); in core_init_mmu() [all …]
|
A D | tee_pager.c | 379 void tee_pager_set_alias_area(tee_mm_entry_t *mm) in tee_pager_set_alias_area() argument 383 vaddr_t smem = tee_mm_get_smem(mm); in tee_pager_set_alias_area() 384 size_t nbytes = tee_mm_get_bytes(mm); in tee_pager_set_alias_area() 391 pager_alias_area = mm; in tee_pager_set_alias_area() 1999 tee_mm_entry_t *mm = NULL; in tee_pager_alloc() local 2008 if (!mm) in tee_pager_alloc() 2011 smem = (uint8_t *)tee_mm_get_smem(mm); in tee_pager_alloc() 2015 tee_mm_free(mm); in tee_pager_alloc() 2029 tee_mm_entry_t *mm = NULL; in tee_pager_init_iv_region() local 2035 if (!mm) in tee_pager_init_iv_region() [all …]
|
A D | pgt_cache.c | 46 tee_mm_entry_t *mm; member 86 tee_mm_free(parent->mm); in free_pgt() 109 parent->mm = tee_mm_alloc(&tee_mm_sec_ddr, PGT_PARENT_SIZE); in alloc_pgt_parent() 110 if (!parent->mm) { in alloc_pgt_parent() 114 tbl = phys_to_virt(tee_mm_get_smem(parent->mm), MEM_AREA_TA_RAM, in alloc_pgt_parent()
|
/optee_os-3.20.0/core/arch/arm/kernel/ |
A D | thread_spmc.c | 41 tee_mm_entry_t *mm; member 168 if (!mm) in map_buf() 174 tee_mm_free(mm); in map_buf() 186 assert(mm); in unmap_buf() 188 tee_mm_free(mm); in unmap_buf() 695 s->mm = mm; in add_mem_share() 749 if (!mm) in handle_mem_share_tmem() 767 tee_mm_free(mm); in handle_mem_share_tmem() 876 mm = s->mm; in handle_mem_frag_tx() 877 if (mm) { in handle_mem_frag_tx() [all …]
|
A D | secure_partition.c | 672 tee_mm_entry_t *mm = NULL; in handle_fdt_mem_regions() local 696 mm = NULL; in handle_fdt_mem_regions() 765 if (!mm) in handle_fdt_mem_regions() 812 tee_mm_free(mm); in handle_fdt_mem_regions() 1104 tee_mm_entry_t *mm = NULL; in process_sp_pkg() local 1116 if (!mm) in process_sp_pkg() 1156 tee_mm_free(mm); in process_sp_pkg() 1165 if (!mm) in process_sp_pkg() 1189 sp->mm = mm; in process_sp_pkg() 1200 tee_mm_free(mm); in process_sp_pkg() [all …]
|
A D | boot.c | 327 tee_mm_entry_t *mm; in carve_out_asan_mem() local 351 mm = tee_mm_alloc2(pool, apa, asz); in carve_out_asan_mem() 352 assert(mm); in carve_out_asan_mem() 451 tee_mm_entry_t *mm = NULL; in init_runtime() local 490 assert(mm); in init_runtime() 545 mm = tee_mm_alloc2(&tee_mm_vcore, in init_runtime() 549 assert(mm); in init_runtime() 550 tee_pager_set_alias_area(mm); in init_runtime() 558 assert(mm); in init_runtime() 566 assert(mm); in init_runtime() [all …]
|
/optee_os-3.20.0/core/include/mm/ |
A D | core_mmu.h | 475 static inline bool core_mmu_is_dynamic_vaspace(struct tee_mmap_region *mm) in core_mmu_is_dynamic_vaspace() argument 477 return mm->type == MEM_AREA_RES_VASPACE || in core_mmu_is_dynamic_vaspace() 478 mm->type == MEM_AREA_SHM_VASPACE; in core_mmu_is_dynamic_vaspace() 597 void core_init_mmu_prtn(struct mmu_partition *prtn, struct tee_mmap_region *mm); 621 void core_init_mmu(struct tee_mmap_region *mm); 628 struct tee_mmap_region *mm); 632 static inline bool core_mmap_is_end_of_table(const struct tee_mmap_region *mm) in core_mmap_is_end_of_table() argument 634 return mm->type == MEM_AREA_END; in core_mmap_is_end_of_table()
|
A D | tee_mm.h | 70 uintptr_t tee_mm_get_smem(const tee_mm_entry_t *mm); 108 size_t tee_mm_get_bytes(const tee_mm_entry_t *mm);
|
/optee_os-3.20.0/core/kernel/ |
A D | thread.c | 401 tee_mm_entry_t *mm = NULL; in init_thread_stacks() local 407 mm = tee_mm_alloc(&tee_mm_vcore, in init_thread_stacks() 409 assert(mm); in init_thread_stacks() 412 tee_pager_add_pages(tee_mm_get_smem(mm), tee_mm_get_size(mm), in init_thread_stacks() 415 num_pages = tee_mm_get_bytes(mm) / SMALL_PAGE_SIZE - 1; in init_thread_stacks() 419 tee_pager_add_core_region(tee_mm_get_smem(mm) + SMALL_PAGE_SIZE, in init_thread_stacks() 424 sp = tee_mm_get_smem(mm) + tee_mm_get_bytes(mm); in init_thread_stacks() 425 asan_tag_access((void *)tee_mm_get_smem(mm), (void *)sp); in init_thread_stacks()
|
A D | ree_fs_ta.c | 669 tee_mm_entry_t *mm; member 713 handle->mm = tee_mm_alloc(&tee_mm_sec_ddr, handle->ta_size); in buf_ta_open() 714 if (!handle->mm) { in buf_ta_open() 718 handle->buf = phys_to_virt(tee_mm_get_smem(handle->mm), in buf_ta_open() 740 tee_mm_free(handle->mm); in buf_ta_open() 793 tee_mm_free(handle->mm); in buf_ta_close()
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/ |
A D | bignum.c | 1933 *mm = ~x + 1; in mpi_montg_init() 1938 mpi_montg_init( mm, N ); in mbedtls_mpi_montg_init() 2013 mpi_montmul( A, B, N, mm, T); in mbedtls_mpi_montmul() 2030 mpi_montmul( A, &U, N, mm, T ); in mpi_montred() 2036 mpi_montred( A, N, mm, T ); in mbedtls_mpi_montred() 2079 mbedtls_mpi_uint ei, mm, state; in mbedtls_mpi_exp_mod() local 2103 mpi_montg_init( &mm, N ); in mbedtls_mpi_exp_mod() 2180 mpi_montmul( &W[1], &RR, N, mm, &T ); in mbedtls_mpi_exp_mod() 2186 mpi_montred( X, N, mm, &T ); in mbedtls_mpi_exp_mod() 2283 mpi_montmul( X, X, N, mm, &T ); in mbedtls_mpi_exp_mod() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/asn1/der/utctime/ |
A D | der_encode_utctime.c | 52 STORE_V(utctime->mm); in der_encode_utctime()
|
A D | der_decode_utctime.c | 84 DECODE_V(out->mm, 60); in der_decode_utctime()
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/include/mbedtls/ |
A D | bignum.h | 1058 void mbedtls_mpi_montg_init( mbedtls_mpi_uint *mm, const mbedtls_mpi *N ); 1069 const mbedtls_mpi *N, mbedtls_mpi_uint mm, 1080 mbedtls_mpi_uint mm, const mbedtls_mpi *T );
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/asn1/der/generalizedtime/ |
A D | der_encode_generalizedtime.c | 61 STORE_V(gtime->mm); in der_encode_generalizedtime()
|
A D | der_decode_generalizedtime.c | 100 DECODE_V(out->mm, 60); in der_decode_generalizedtime()
|
/optee_os-3.20.0/core/arch/arm/include/kernel/ |
A D | secure_partition.h | 101 tee_mm_entry_t *mm; member
|
/optee_os-3.20.0/core/arch/arm/include/mm/ |
A D | core_mmu_arch.h | 200 void map_memarea_sections(const struct tee_mmap_region *mm, uint32_t *ttb);
|