Home
last modified time | relevance | path

Searched refs:alloc_size (Results 1 – 7 of 7) sorted by relevance

/optee_os/core/drivers/crypto/caam/utils/
H A Dutils_mem.c43 size_t alloc_size = size; in mem_alloc() local
50 if (ROUNDUP_OVERFLOW(alloc_size, CFG_CAAM_SIZE_ALIGN, in mem_alloc()
51 &alloc_size)) in mem_alloc()
54 if (ROUNDUP2_OVERFLOW(alloc_size, cacheline_size, &alloc_size)) in mem_alloc()
57 ptr = memalign(cacheline_size, alloc_size); in mem_alloc()
59 ptr = malloc(alloc_size); in mem_alloc()
68 memset(ptr, 0, alloc_size); in mem_alloc()
H A Dutils_dmaobj.c1114 size_t alloc_size = 0; in get_dma_max_alloc_size() local
1123 alloc_size = MIN(priv->dmabuf.require, MAX_BUFFER_ALLOC_SIZE); in get_dma_max_alloc_size()
1124 if (alloc_size > 1024) in get_dma_max_alloc_size()
1125 alloc_size = ROUNDDOWN(alloc_size, 1024); in get_dma_max_alloc_size()
1127 return alloc_size; in get_dma_max_alloc_size()
1146 size_t alloc_size = 0; in try_allocate_dmabuf_max_size() local
1151 alloc_size = get_dma_max_alloc_size(obj); in try_allocate_dmabuf_max_size()
1152 if (alloc_size) { in try_allocate_dmabuf_max_size()
1164 ret = try_allocate_dmabuf(priv, alloc_size); in try_allocate_dmabuf_max_size()
1168 if (alloc_size > min_size) in try_allocate_dmabuf_max_size()
[all …]
/optee_os/core/kernel/
H A Dtee_misc.c125 size_t alloc_size = 0; in alloc_cache_aligned() local
129 if (ROUNDUP2_OVERFLOW(size, cacheline_size, &alloc_size)) in alloc_cache_aligned()
132 ptr = memalign(cacheline_size, alloc_size); in alloc_cache_aligned()
/optee_os/core/drivers/crypto/caam/
H A Dcaam_key.c242 size_t alloc_size = 0; in caam_key_alloc() local
252 alloc_size = caam_key_get_alloc_size(key); in caam_key_alloc()
253 if (!alloc_size) in caam_key_alloc()
256 return caam_calloc_align_buf(&key->buf, alloc_size); in caam_key_alloc()
733 size_t alloc_size = 0; in caam_key_init() local
744 if (caam_key_serialized_size(&key, &alloc_size)) in caam_key_init()
747 assert(alloc_size <= CFG_CORE_BIGNUM_MAX_BITS); in caam_key_init()
755 KEY_TRACE("Max serialized key size %zu", alloc_size); in caam_key_init()
/optee_os/core/tee/
H A Dtee_svc_cryp.c61 uint32_t alloc_size; member
503 uint16_t alloc_size; /* this many bytes are allocated to hold data */ member
510 #define PROP(obj_type, quanta, min_size, max_size, alloc_size, type_attrs) \ argument
511 { (obj_type), (min_size), (max_size), (alloc_size), (quanta), \
727 if (size > key->alloc_size) in op_attr_secret_value_from_user()
794 if (s > key->alloc_size) in op_attr_secret_value_from_binary()
808 if (src_key->key_size > key->alloc_size) in op_attr_secret_value_from_obj()
820 memzero_explicit(key + 1, key->alloc_size); in op_attr_secret_value_clear()
1578 o->attr = calloc(1, type_props->alloc_size); in tee_obj_set_type()
1638 key->alloc_size = type_props->alloc_size - in tee_obj_set_type()
[all …]
/optee_os/core/drivers/clk/sam/
H A Dat91_pmc.c101 unsigned int alloc_size = sizeof(struct pmc_data) + in pmc_data_allocate() local
105 pmc_data = calloc(1, alloc_size); in pmc_data_allocate()
/optee_os/lib/libutee/
H A Dtee_api_arith_mpi.c54 uint16_t alloc_size; member
69 if (hdr->alloc_size < n) in copy_mpi_to_bigint()
131 hdr->alloc_size = len - BIGINT_HDR_SIZE_IN_U32; in TEE_BigIntInit()
378 if (dst_hdr->alloc_size < src_hdr->nblimbs) in TEE_BigIntAssign()