/optee_os/core/pta/bcm/ |
A D | elog.c | 65 size_t sz = 0; in pta_elog_load_nitro_fw() local 85 sz = params[0].memref.size; in pta_elog_load_nitro_fw() 98 MEM_AREA_RAM_SEC, sz); in pta_elog_load_nitro_fw() 114 uint32_t sz = 0; in get_dump_data() local 117 sz = params[0].memref.size; in get_dump_data() 128 memcpy(buf, (char *)src, sz); in get_dump_data() 130 params[0].memref.size = sz; in get_dump_data() 132 return sz; in get_dump_data() 147 uint32_t sz = 0; in pta_elog_nitro_crash_dump() local 167 MEM_AREA_RAM_SEC, sz); in pta_elog_nitro_crash_dump() [all …]
|
/optee_os/core/pta/tests/ |
A D | invoke.c | 266 p[1].memref.size = sz; in test_inject_sdp() 276 if (!sz) in test_inject_sdp() 280 if (test_v2p2v(src, sz) || test_v2p2v(dst, sz)) in test_inject_sdp() 286 memcpy(dst, src, sz); in test_inject_sdp() 313 if (!sz) in test_transform_sdp() 317 if (test_v2p2v(buf, sz)) in test_transform_sdp() 323 for (; sz; sz--, buf++) in test_transform_sdp() 348 p[1].memref.size = sz; in test_dump_sdp() 358 if (!sz) in test_dump_sdp() 362 if (test_v2p2v(src, sz) || test_v2p2v(dst, sz)) in test_dump_sdp() [all …]
|
A D | fs_htree.c | 99 size_t sz = 0; in test_read_init() local 101 res = test_get_offs_size(type, idx, vers, &offs, &sz); in test_read_init() 106 op->params[0].u.value.c = sz; in test_read_init() 123 size_t sz = op->params[0].u.value.c; in test_read_final() local 125 if (offs + sz <= a->data_len) in test_read_final() 126 *bytes = sz; in test_read_final() 147 size_t sz = op->params[0].u.value.c; in test_write_final() local 148 size_t end = offs + sz; in test_write_final() 155 memcpy(a->data + offs, a->block, sz); in test_write_final() 408 size_t sz = 0; in aux_alloc() local [all …]
|
A D | aes_perf.c | 132 const uint8_t *in, size_t sz, uint8_t *out) in do_update() argument 147 for (m = 0; m < sz / unit_size; m++) { in do_update() 153 if (sz % unit_size) in do_update() 155 sz % unit_size, out + m * unit_size); in do_update()
|
/optee_os/core/kernel/ |
A D | dt.c | 94 size_t sz; in dt_map_dev() local 106 sz = _fdt_reg_size(fdt, offs); in dt_map_dev() 107 if (sz == DT_INFO_INVALID_REG_SIZE) in dt_map_dev() 116 vbase = (vaddr_t)core_mmu_add_mapping(mtype, pbase, sz); in dt_map_dev() 119 (size_t)sz, pbase); in dt_map_dev() 124 *size = sz; in dt_map_dev() 184 uint32_t sz; in _fdt_reg_size() local 207 sz = fdt32_to_cpu(*reg); in _fdt_reg_size() 209 if (sz) in _fdt_reg_size() 212 sz = fdt32_to_cpu(*reg); in _fdt_reg_size() [all …]
|
A D | ree_fs_ta.c | 192 size_t sz = shdr_sz; in ree_fs_ta_open() local 194 if (ADD_OVERFLOW(sz, sizeof(*bs_hdr), &sz) || ta_size < sz) { in ree_fs_ta_open() 229 size_t sz = shdr_sz; in ree_fs_ta_open() local 232 if (ADD_OVERFLOW(sz, sizeof(struct shdr_bootstrap_ta), &sz) || in ree_fs_ta_open() 233 ADD_OVERFLOW(sz, sizeof(img_ehdr), &sz) || in ree_fs_ta_open() 234 ta_size < sz) { in ree_fs_ta_open() 241 sz -= sizeof(img_ehdr); in ree_fs_ta_open() 242 if (!ehdr_sz || ADD_OVERFLOW(sz, ehdr_sz, &sz) || in ree_fs_ta_open() 243 ta_size < sz) { in ree_fs_ta_open()
|
A D | ldelf_syscalls.c | 65 size_t sz = ROUNDUP(num_bytes, SMALL_PAGE_SIZE); in ldelf_syscall_unmap() local 75 if (ADD_OVERFLOW(va, sz, &end_va)) in ldelf_syscall_unmap() 78 res = vm_get_flags(uctx, va, sz, &vm_flags); in ldelf_syscall_unmap() 84 return vm_unmap(uctx, va, sz); in ldelf_syscall_unmap() 454 size_t sz = ROUNDUP(num_bytes, SMALL_PAGE_SIZE); in ldelf_syscall_set_prot() local 477 if (ADD_OVERFLOW(va, sz, &end_va)) in ldelf_syscall_set_prot() 480 res = vm_get_flags(uctx, va, sz, &vm_flags); in ldelf_syscall_set_prot() 495 return vm_set_prot(uctx, va, sz, prot); in ldelf_syscall_set_prot()
|
/optee_os/core/drivers/ |
A D | stm32_rng.c | 109 size_t sz = MIN(len, sizeof(uint32_t)); in stm32_rng_read_raw() local 111 memcpy(buf, &data32, sz); in stm32_rng_read_raw() 112 buf += sz; in stm32_rng_read_raw() 113 len -= sz; in stm32_rng_read_raw() 167 size_t sz = size - out_size; in stm32_rng_read() local 171 rc = stm32_rng_read_raw(rng_base, out_ptr, &sz); in stm32_rng_read() 178 out_size += sz; in stm32_rng_read() 179 out_ptr += sz; in stm32_rng_read()
|
/optee_os/core/tee/ |
A D | tee_cryp_concat_kdf.c | 20 size_t hash_len, i, n, sz; in tee_cryp_concat_kdf() local 36 sz = hash_len; in tee_cryp_concat_kdf() 61 sz = derived_key_len % hash_len; in tee_cryp_concat_kdf() 62 memcpy(out, tmp, sz); in tee_cryp_concat_kdf() 63 out += sz; in tee_cryp_concat_kdf()
|
A D | entry_std.c | 47 const size_t sz) in param_mem_from_mobj() argument 59 mem->size = sz; in param_mem_from_mobj() 69 size_t sz = READ_ONCE(fmem->size); in set_fmem_param() local 71 if (global_id == OPTEE_MSG_FMEM_INVALID_GLOBAL_ID && !sz) { in set_fmem_param() 84 mem->size = sz; in set_fmem_param() 103 size_t sz = READ_ONCE(tmem->size); in set_tmem_param() local 124 mem->size = sz; in set_tmem_param() 130 if (param_mem_from_mobj(mem, shm_mobj, pa, sz)) in set_tmem_param() 137 if (param_mem_from_mobj(mem, *mobj, pa, sz)) in set_tmem_param() 150 size_t sz = READ_ONCE(rmem->size); in set_rmem_param() local [all …]
|
A D | tadb.c | 305 size_t sz = len; in tadb_update_payload() local 308 len, dst, &sz); in tadb_update_payload() 309 assert(res || sz == len); in tadb_update_payload() 547 size_t sz = sizeof(ta->entry.tag); in tee_tadb_ta_close_and_commit() local 553 ta->entry.tag, &sz); in tee_tadb_ta_close_and_commit() 699 const size_t sz = ta->entry.prop.custom_size + ta->entry.prop.bin_size; in ta_load() local 704 ta->ta_mobj = thread_rpc_alloc_payload(sz); in ta_load() 708 ta->ta_buf = mobj_get_va(ta->ta_mobj, 0, sz); in ta_load() 712 params[1] = THREAD_PARAM_MEMREF(OUT, ta->ta_mobj, 0, sz); in ta_load() 726 size_t l = MIN(*len, sz - ta->pos); in tee_tadb_ta_read() [all …]
|
/optee_os/lib/libutils/ext/ |
A D | mempool.c | 74 size_t sz = pool->size - raw_malloc_get_ctx_size(); in init_mpool() local 75 vaddr_t v = ROUNDDOWN(pool->data + sz, sizeof(long) * 2); in init_mpool() 168 size_t sz; in mempool_calloc() local 171 if (MUL_OVERFLOW(nmemb, size, &sz)) in mempool_calloc() 174 p = mempool_alloc(pool, sz); in mempool_calloc() 176 memset(p, 0, sz); in mempool_calloc()
|
/optee_os/ta/pkcs11/src/ |
A D | processing_asymm.c | 426 size_t sz = 0; in step_asymm_operation() local 592 sz = ecdsa_get_input_max_byte_size(proc->tee_op_handle); in step_asymm_operation() 593 if (!in_size || !sz) { in step_asymm_operation() 602 if (in_size > sz) in step_asymm_operation() 603 in_size = sz; in step_asymm_operation() 616 sz = ecdsa_get_input_max_byte_size(proc->tee_op_handle); in step_asymm_operation() 617 if (!sz) { in step_asymm_operation() 623 in2_size != 2 * sz) { in step_asymm_operation() 642 sz = rsa_get_input_max_byte_size(proc->tee_op_handle); in step_asymm_operation() 643 if (!sz) { in step_asymm_operation() [all …]
|
A D | serializer.c | 46 size_t sz = 0; in alloc_and_get() local 48 if (ADD_OVERFLOW(buf0_sz, size, &sz)) in alloc_and_get() 51 if (!sz) { in alloc_and_get() 60 ptr = TEE_Malloc(sz, TEE_MALLOC_FILL_ZERO); in alloc_and_get()
|
/optee_os/core/arch/arm/kernel/ |
A D | thread_optee_smc.c | 295 if (core_pbuf_is(CORE_MEM_NSEC_SHM, pa, sz)) in rpc_shm_mobj_alloc() 296 return mobj_shm_alloc(pa, sz, cookie); in rpc_shm_mobj_alloc() 299 !(pa & SMALL_PAGE_MASK) && sz <= SMALL_PAGE_SIZE) in rpc_shm_mobj_alloc() 390 size_t sz = OPTEE_MSG_GET_ARG_SIZE(THREAD_RPC_MAX_NUM_PARAMS); in get_rpc_arg() local 396 struct mobj *mobj = thread_rpc_alloc_arg(sz); in get_rpc_arg() 401 arg = mobj_get_va(mobj, 0, sz); in get_rpc_arg() 538 size_t sz = 0; in get_rpc_alloc_res() local 550 sz = READ_ONCE(arg->params[0].u.tmem.size); in get_rpc_alloc_res() 552 if (sz < size) in get_rpc_alloc_res() 556 mobj = rpc_shm_mobj_alloc(p, sz, cookie); in get_rpc_alloc_res() [all …]
|
A D | thread_spmc.c | 168 mm = tee_mm_alloc(&tee_mm_shm, sz); in map_buf() 173 sz / SMALL_PAGE_SIZE, in map_buf() 196 unsigned int sz = 0; in spmc_handle_rxtx_map() local 209 sz = args->a3 * SMALL_PAGE_SIZE; in spmc_handle_rxtx_map() 210 if (!sz) { in spmc_handle_rxtx_map() 228 rc = map_buf(tx_pa, sz, &tx); in spmc_handle_rxtx_map() 231 rc = map_buf(rx_pa, sz, &rx); in spmc_handle_rxtx_map() 233 unmap_buf(tx, sz); in spmc_handle_rxtx_map() 254 rxtx->size = sz; in spmc_handle_rxtx_map() 1021 size_t sz = 0; in yielding_call_with_arg() local [all …]
|
/optee_os/scripts/ |
A D | gen_ldelf_hex.py | 85 sz = segment['p_filesz'] + pad_size[n] 87 data_size += sz 89 code_size += sz 90 load_size += sz
|
/optee_os/ldelf/ |
A D | ta_elf.c | 226 size_t sz) in check_range() argument 252 size_t sz = 0; in check_hashtab() local 435 size_t sz = 0; in init_elf() local 467 ADD_OVERFLOW(sz, elf->e_phoff, &sz)) in init_elf() 470 if (sz > SMALL_PAGE_SIZE) in init_elf() 1050 size_t sz = 0; in copy_section_headers() local 1056 elf->shdr = malloc(sz); in copy_section_headers() 1072 if (offs < sz) { in copy_section_headers() 1414 size_t sz = 0; in ta_elf_print_mappings() local 1451 assert(maps[map_idx].sz == sz); in ta_elf_print_mappings() [all …]
|
/optee_os/lib/libmbedtls/core/ |
A D | mbed_helpers.c | 18 size_t sz = mbedtls_mpi_size(max); in mbed_gen_random_upto() local 23 mres = mbedtls_mpi_fill_random(n, sz, mbd_rand, NULL); in mbed_gen_random_upto()
|
/optee_os/core/arch/arm/plat-rockchip/ |
A D | platform.c | 20 size_t sz __maybe_unused) in platform_secure_ddr_region() 22 MSG("Not protecting region %d: 0x%lx-0x%lx\n", rgn, st, st + sz); in platform_secure_ddr_region()
|
A D | platform_px30.c | 23 int platform_secure_ddr_region(int rgn, paddr_t st, size_t sz) in platform_secure_ddr_region() argument 27 paddr_t ed = st + sz; in platform_secure_ddr_region()
|
A D | platform_rk3399.c | 18 int platform_secure_ddr_region(int rgn, paddr_t st, size_t sz) in platform_secure_ddr_region() argument 21 paddr_t ed = st + sz; in platform_secure_ddr_region()
|
/optee_os/core/arch/arm/include/kernel/ |
A D | thread.h | 544 vaddr_t *va, size_t *sz); 547 vaddr_t *va, size_t *sz) in thread_get_user_kcode() argument 552 *sz = 0; in thread_get_user_kcode() 563 vaddr_t *va, size_t *sz); 566 vaddr_t *va, size_t *sz) in thread_get_user_kdata() argument 571 *sz = 0; in thread_get_user_kdata()
|
/optee_os/core/arch/arm/mm/ |
A D | tee_mm.c | 93 uint32_t sz = 0; in tee_mm_stats_allocated() local 100 sz += entry->size; in tee_mm_stats_allocated() 104 return sz << pool->shift; in tee_mm_stats_allocated() 130 size_t sz = tee_mm_stats_allocated(pool); in update_max_allocated() local 132 if (sz > pool->max_allocated) in update_max_allocated() 133 pool->max_allocated = sz; in update_max_allocated()
|
/optee_os/core/pta/ |
A D | system.c | 175 size_t sz = 0; in system_unmap() local 184 sz = ROUNDUP(params[0].value.a, SMALL_PAGE_SIZE); in system_unmap() 192 if (ADD_OVERFLOW(va, sz, &end_va)) in system_unmap() 195 res = vm_get_flags(uctx, va, sz, &vm_flags); in system_unmap() 201 return vm_unmap(uctx, va, sz); in system_unmap()
|