| /optee_os/lib/libutils/isoc/arch/arm/softfloat/source/ |
| H A D | ui64_to_f128M.c | 58 uint32_t *ptr; in ui64_to_f128M() local 68 ptr = zWPtr + indexMultiwordHi( 4, 3 ); in ui64_to_f128M() 69 ptr[indexWord( 3, 2 )] = 0; in ui64_to_f128M() 70 ptr[indexWord( 3, 1 )] = a>>32; in ui64_to_f128M() 71 ptr[indexWord( 3, 0 )] = a; in ui64_to_f128M() 72 softfloat_shortShiftLeft96M( ptr, shiftCount, ptr ); in ui64_to_f128M() 73 ptr[indexWordHi( 3 )] = in ui64_to_f128M() 75 0, 0x404E - shiftCount, ptr[indexWordHi( 3 )] ); in ui64_to_f128M()
|
| H A D | i64_to_f128M.c | 61 uint32_t *ptr; in i64_to_f128M() local 73 ptr = zWPtr + indexMultiwordHi( 4, 3 ); in i64_to_f128M() 74 ptr[indexWord( 3, 2 )] = 0; in i64_to_f128M() 75 ptr[indexWord( 3, 1 )] = absA>>32; in i64_to_f128M() 76 ptr[indexWord( 3, 0 )] = absA; in i64_to_f128M() 77 softfloat_shortShiftLeft96M( ptr, shiftCount, ptr ); in i64_to_f128M() 78 ptr[indexWordHi( 3 )] = in i64_to_f128M() 80 sign, 0x404E - shiftCount, ptr[indexWordHi( 3 )] ); in i64_to_f128M()
|
| H A D | s_shiftRightJamM.c | 54 uint32_t wordJam, wordCount, *ptr; in softfloat_shiftRightJamM() local 61 ptr = (uint32_t *) (aPtr + indexMultiwordLo( size_words, wordCount )); in softfloat_shiftRightJamM() 64 wordJam = *ptr++; in softfloat_shiftRightJamM() 68 ptr = zPtr; in softfloat_shiftRightJamM() 83 ptr = zPtr + indexWordLo( size_words ); in softfloat_shiftRightJamM() 85 *ptr = *aPtr; in softfloat_shiftRightJamM() 87 ptr += wordIncr; in softfloat_shiftRightJamM() 90 ptr = zPtr + indexMultiwordHi( size_words, wordCount ); in softfloat_shiftRightJamM() 93 *ptr++ = 0; in softfloat_shiftRightJamM()
|
| H A D | s_shiftRightJam256M.c | 79 uint64_t *ptr; in softfloat_shiftRightJam256M() local 86 ptr = (uint64_t *) (aPtr + indexMultiwordLo( 4, wordCount )); in softfloat_shiftRightJam256M() 89 wordJam = *ptr++; in softfloat_shiftRightJam256M() 93 ptr = zPtr; in softfloat_shiftRightJam256M() 108 ptr = zPtr + indexWordLo( 4 ); in softfloat_shiftRightJam256M() 110 *ptr = *aPtr; in softfloat_shiftRightJam256M() 112 ptr += wordIncr; in softfloat_shiftRightJam256M() 115 ptr = zPtr + indexMultiwordHi( 4, wordCount ); in softfloat_shiftRightJam256M() 118 *ptr++ = 0; in softfloat_shiftRightJam256M()
|
| H A D | s_mulAddF128M.c | 62 uint32_t *ptr, uiZ96, sigA[4]; in softfloat_mulAddF128M() local 102 ptr = (uint32_t *) aWPtr; in softfloat_mulAddF128M() 105 ptr = (uint32_t *) bWPtr; in softfloat_mulAddF128M() 108 ! (ptr[indexWord( 4, 2 )] | ptr[indexWord( 4, 1 )] in softfloat_mulAddF128M() 109 | ptr[indexWord( 4, 0 )]) in softfloat_mulAddF128M() 242 ptr = &sigProd[indexWord( 8, 4 )]; in softfloat_mulAddF128M() 284 ptr = extSigPtr + indexWordLo( 5 ); in softfloat_mulAddF128M() 286 ptr -= wordIncr; in softfloat_mulAddF128M() 287 if ( *ptr ) { in softfloat_mulAddF128M() 291 } while ( ptr != &sigProd[indexWordLo( 8 )] ); in softfloat_mulAddF128M() [all …]
|
| H A D | s_normSubnormalF128SigM.c | 44 const uint32_t *ptr; in softfloat_normSubnormalF128SigM() local 48 ptr = sigPtr + indexWordHi( 4 ); in softfloat_normSubnormalF128SigM() 51 wordSig = *ptr; in softfloat_normSubnormalF128SigM() 55 ptr -= wordIncr; in softfloat_normSubnormalF128SigM()
|
| H A D | s_normRoundPackMToF128M.c | 47 const uint32_t *ptr; in softfloat_normRoundPackMToF128M() local 51 ptr = extSigPtr + indexWordHi( 5 ); in softfloat_normRoundPackMToF128M() 54 wordSig = *ptr; in softfloat_normRoundPackMToF128M() 64 ptr -= wordIncr; in softfloat_normRoundPackMToF128M()
|
| H A D | f128M_mul.c | 67 const uint32_t *ptr; in f128M_mul() local 90 ptr = aWPtr; in f128M_mul() 93 ptr = bWPtr; in f128M_mul() 96 ! fracF128UI96( ptr[indexWordHi( 4 )] ) in f128M_mul() 97 && ! (ptr[indexWord( 4, 2 )] | ptr[indexWord( 4, 1 )] in f128M_mul() 98 | ptr[indexWord( 4, 0 )]) in f128M_mul()
|
| /optee_os/lib/libutils/isoc/include/ |
| H A D | malloc.h | 23 void *malloc_flags(uint32_t flags, void *ptr, size_t alignment, size_t size); 25 void *realloc(void *ptr, size_t size); 27 void free(void *ptr); 28 void free_flags(uint32_t flags, void *ptr); 35 void *__mdbg_alloc(uint32_t flags, void *ptr, size_t alignment, size_t nmemb, 42 #define malloc_flags(flags, ptr, align, size) \ argument 43 __mdbg_alloc((flags), (ptr), (align), 1, (size), __FILE__, __LINE__) 46 #define realloc(ptr, size) __mdbg_alloc(MAF_NULL, (ptr), 1, 1, \ argument 99 #define nex_realloc(ptr, size) __mdbg_alloc(MAF_NEX, (ptr), 1, 1, \ argument 109 void *nex_realloc(void *ptr, size_t size); [all …]
|
| /optee_os/core/lib/qcbor/src/ |
| H A D | UsefulBuf.c | 86 memcpy((uint8_t *)Dest.ptr + uOffset, Src.ptr, Src.len); in UsefulBuf_CopyOffset() 88 return (UsefulBufC){Dest.ptr, Src.len + uOffset}; in UsefulBuf_CopyOffset() 106 return memcmp(UB1.ptr, UB2.ptr, UB1.len); in UsefulBuf_Compare() 120 const uint8_t * const pEnd = (const uint8_t *)UB.ptr + UB.len; in UsefulBuf_IsValue() 121 for(const uint8_t *p = UB.ptr; p < pEnd; p++) { in UsefulBuf_IsValue() 125 return (size_t)(p - (const uint8_t *)UB.ptr); in UsefulBuf_IsValue() 146 SearchNext.ptr = ((const uint8_t *)BytesToSearch.ptr) + uPos; in UsefulBuf_FindBytes() 180 if(Storage.ptr && (uintptr_t)Storage.ptr > ptrM) /* Check #0 */ in UsefulOutBuf_Init() 277 uint8_t *pSourceOfMove = ((uint8_t *)pMe->UB.ptr) + uInsertionPos; /* PtrMath #1 */ in UsefulOutBuf_InsertUsefulBuf() 289 if(NewData.ptr != NULL) { in UsefulOutBuf_InsertUsefulBuf() [all …]
|
| /optee_os/lib/libutils/isoc/arch/arm/softfloat/source/8086-SSE/ |
| H A D | s_propagateNaNF128M.c | 58 const uint32_t *ptr; in softfloat_propagateNaNF128M() local 60 ptr = aWPtr; in softfloat_propagateNaNF128M() 69 if ( ! softfloat_isNaNF128M( aWPtr ) ) ptr = bWPtr; in softfloat_propagateNaNF128M() 71 zWPtr[indexWordHi( 4 )] = ptr[indexWordHi( 4 )] | 0x00008000; in softfloat_propagateNaNF128M() 72 zWPtr[indexWord( 4, 2 )] = ptr[indexWord( 4, 2 )]; in softfloat_propagateNaNF128M() 73 zWPtr[indexWord( 4, 1 )] = ptr[indexWord( 4, 1 )]; in softfloat_propagateNaNF128M() 74 zWPtr[indexWord( 4, 0 )] = ptr[indexWord( 4, 0 )]; in softfloat_propagateNaNF128M()
|
| /optee_os/ta/pkcs11/src/ |
| H A D | handle.c | 36 uint32_t handle_get(struct handle_db *db, void *ptr) in handle_get() argument 42 if (!db || !ptr || ptr == INVALID_HANDLE_PTR) in handle_get() 48 db->ptrs[n] = ptr; in handle_get() 68 db->ptrs[n] = ptr; in handle_get() 108 uint32_t handle_lookup_handle(struct handle_db *db, void *ptr) in handle_lookup_handle() argument 112 if (ptr && ptr != INVALID_HANDLE_PTR) { in handle_lookup_handle() 114 if (db->ptrs[n] == ptr) in handle_lookup_handle()
|
| H A D | serializer.c | 44 uint8_t *ptr = NULL; in alloc_and_get() local 60 ptr = TEE_Malloc(sz, TEE_MALLOC_FILL_ZERO); in alloc_and_get() 61 if (!ptr) { in alloc_and_get() 66 TEE_MemMove(ptr, buf0, buf0_sz); in alloc_and_get() 67 TEE_MemMove(ptr + buf0_sz, src, size); in alloc_and_get() 69 *out = ptr; in alloc_and_get() 83 void *ptr = args->next; in serialargs_get_ptr() local 101 *out = ptr; in serialargs_get_ptr()
|
| H A D | persistent_token.c | 357 struct token_persistent_objs *ptr = NULL; in unregister_persistent_object() local 371 ptr = TEE_Malloc(sizeof(struct token_persistent_objs) + in unregister_persistent_object() 374 if (!ptr) in unregister_persistent_object() 388 TEE_MemMove(ptr, token->db_objs, in unregister_persistent_object() 392 ptr->count--; in unregister_persistent_object() 393 count = ptr->count - idx; in unregister_persistent_object() 395 TEE_MemMove(&ptr->uuids[idx], in unregister_persistent_object() 399 res = TEE_WriteObjectData(db_hdl, ptr, in unregister_persistent_object() 401 ptr->count * sizeof(TEE_UUID)); in unregister_persistent_object() 405 token->db_objs = ptr; in unregister_persistent_object() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/asn1/der/set/ |
| H A D | der_encode_setof.c | 60 unsigned char *ptr, *buf; in der_encode_setof() local 89 ptr = buf + 1; in der_encode_setof() 92 x = *ptr++; in der_encode_setof() 94 ptr += (x & 0x7F); in der_encode_setof() 98 hdrlen = ptr - buf; in der_encode_setof() 103 while (ptr < (buf + *outlen)) { in der_encode_setof() 105 edges[x].start = ptr; in der_encode_setof() 111 y = ptr[z++]; in der_encode_setof() 118 edges[x].size = (edges[x].size << 8) | ((unsigned long)ptr[z++]); in der_encode_setof() 124 ptr += edges[x].size; in der_encode_setof()
|
| /optee_os/lib/libutils/isoc/arch/arm/softfloat/source/8086/ |
| H A D | s_propagateNaNF128M.c | 58 const uint32_t *ptr; in softfloat_propagateNaNF128M() local 63 ptr = aWPtr; in softfloat_propagateNaNF128M() 101 ptr = bWPtr; in softfloat_propagateNaNF128M() 103 zWPtr[indexWordHi( 4 )] = ptr[indexWordHi( 4 )] | 0x00008000; in softfloat_propagateNaNF128M() 104 zWPtr[indexWord( 4, 2 )] = ptr[indexWord( 4, 2 )]; in softfloat_propagateNaNF128M() 105 zWPtr[indexWord( 4, 1 )] = ptr[indexWord( 4, 1 )]; in softfloat_propagateNaNF128M() 106 zWPtr[indexWord( 4, 0 )] = ptr[indexWord( 4, 0 )]; in softfloat_propagateNaNF128M()
|
| /optee_os/lib/libutils/isoc/ |
| H A D | bget_malloc.c | 429 void *raw_malloc_flags(uint32_t flags, void *ptr, size_t hdr_size, in raw_malloc_flags() argument 451 if ((flags & MAF_ZERO_INIT) && !ptr) in raw_malloc_flags() 456 if (p && ptr) { in raw_malloc_flags() 457 void *old_ptr = maybe_untag_buf(ptr); in raw_malloc_flags() 490 void raw_free(void *ptr, struct malloc_ctx *ctx, bool wipe) in raw_free() argument 494 if (ptr) in raw_free() 495 brel(maybe_untag_buf(ptr), &ctx->poolset, wipe); in raw_free() 505 void *raw_realloc(void *ptr, size_t hdr_size, size_t ftr_size, in raw_realloc() argument 508 return raw_malloc_flags(MAF_NULL, ptr, hdr_size, ftr_size, 1, 1, in raw_realloc() 562 static void *mem_alloc_unlocked(uint32_t flags, void *ptr, size_t alignment, in mem_alloc_unlocked() argument [all …]
|
| /optee_os/core/drivers/crypto/caam/utils/ |
| H A D | utils_mem.c | 42 void *ptr = NULL; in mem_alloc() local 57 ptr = memalign(cacheline_size, alloc_size); in mem_alloc() 59 ptr = malloc(alloc_size); in mem_alloc() 62 if (!ptr) { in mem_alloc() 68 memset(ptr, 0, alloc_size); in mem_alloc() 70 MEM_TRACE("alloc returned %p", ptr); in mem_alloc() 71 return ptr; in mem_alloc() 79 static void mem_free(void *ptr) in mem_free() argument 81 if (ptr) { in mem_free() 82 MEM_TRACE("free %p", ptr); in mem_free() [all …]
|
| /optee_os/core/lib/qcbor/inc/qcbor/ |
| H A D | UsefulBuf.h | 271 const void *ptr; member 282 void *ptr; member 565 const void *ptr, 692 UB.ptr = (void *)(uintptr_t)UBC.ptr; in UsefulBufC_Unconst() 1735 return !UB.ptr; in UsefulBuf_IsNULL() 1741 return !UB.ptr; in UsefulBuf_IsNULLC() 1772 UBC.ptr = UB.ptr; in UsefulBuf_Const() 1785 UB.ptr = (void *)(uintptr_t)UBC.ptr; in UsefulBuf_Unconst() 1796 UBC.ptr = szString; in UsefulBuf_FromSZ() 1810 memset(Dest.ptr, value, Dest.len); in UsefulBuf_Set() [all …]
|
| /optee_os/core/lib/zlib/ |
| H A D | zutil.c | 244 void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) in zcfree() argument 250 if (*(ush*)&ptr != 0) { /* object < 64K */ in zcfree() 251 farfree(ptr); in zcfree() 256 if (ptr != table[n].new_ptr) continue; in zcfree() 287 void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) in zcfree() argument 290 _hfree(ptr); in zcfree() 303 extern void free OF((voidpf ptr)); 316 void ZLIB_INTERNAL zcfree (opaque, ptr) in zcfree() argument 318 voidpf ptr; 321 free(ptr);
|
| /optee_os/core/kernel/ |
| H A D | handle.c | 18 void handle_db_destroy(struct handle_db *db, void (*ptr_destructor)(void *ptr)) in handle_db_destroy() argument 47 int handle_get(struct handle_db *db, void *ptr) in handle_get() argument 53 if (!db || !ptr) in handle_get() 59 db->ptrs[n] = ptr; in handle_get() 78 db->ptrs[n] = ptr; in handle_get()
|
| H A D | tee_misc.c | 124 void *ptr = NULL; in alloc_cache_aligned() local 132 ptr = memalign(cacheline_size, alloc_size); in alloc_cache_aligned() 133 if (!ptr) in alloc_cache_aligned() 136 memset(ptr, 0, size); in alloc_cache_aligned() 138 return ptr; in alloc_cache_aligned()
|
| /optee_os/lib/libutils/ext/ |
| H A D | trace.c | 229 char *ptr; member 238 if (sbuf->ptr == NULL) in append() 239 sbuf->ptr = sbuf->buf; in append() 240 left = sizeof(sbuf->buf) - (sbuf->ptr - sbuf->buf); in append() 242 len = vsnprintk(sbuf->ptr, left, fmt, ap); in append() 252 sbuf->ptr += MIN(left, len); in append() 265 sbuf.ptr = NULL; in dhex_dump() 283 sbuf.ptr = NULL; in dhex_dump() 286 if (sbuf.ptr) { in dhex_dump()
|
| /optee_os/core/drivers/ |
| H A D | smccc_trng.c | 115 uint8_t *ptr = buf; in read_samples() local 124 read_bytes(args->a3, byte_count, &ptr, &rem); in read_samples() 125 read_bytes(args->a2, byte_count, &ptr, &rem); in read_samples() 126 read_bytes(args->a1, byte_count, &ptr, &rem); in read_samples() 132 uint8_t *ptr = buf; in smccc_trng_read() local 154 read_samples(&args, ptr, burst); in smccc_trng_read() 156 ptr += burst; in smccc_trng_read()
|
| H A D | cbmem_console.c | 104 void *ptr = NULL; in get_cbmem_console_from_coreboot_table() local 121 ptr = (uint8_t *)base + header->header_bytes; in get_cbmem_console_from_coreboot_table() 123 entry = (struct cb_entry *)ptr; in get_cbmem_console_from_coreboot_table() 124 if ((uint8_t *)ptr >= (uint8_t *)base + table_size - in get_cbmem_console_from_coreboot_table() 138 ptr = (uint8_t *)ptr + get_le32(&entry->size); in get_cbmem_console_from_coreboot_table()
|