/optee_os-3.20.0/core/mm/ |
A D | vm.c | 144 pgt_clear_range(uctx, r->va, r->va + r->size); in rem_um_region() 194 offset = va - r->va + r->offset; in set_reg_in_table() 379 if (va >= r->va && va < r->va + r->size) in find_vm_region() 481 r = TAILQ_NEXT(r, link); in split_vm_range() 488 if (end_va != r->va + r->size) { in split_vm_range() 514 if (r->va + r->size < va) in merge_vm_range() 554 r0->mobj == r->mobj && rn->offset == r->offset + r->size; in cmp_region_for_remap() 585 for (r = r0; r; r = r_next) { in vm_remap() 642 for (r = r_first; r != r_stop; r = r_next) { in vm_remap() 761 for (r = r0; r; r = TAILQ_NEXT(r, link)) { in vm_set_prot() [all …]
|
/optee_os-3.20.0/core/pta/tests/ |
A D | misc.c | 228 bool r; in self_test_division() local 242 if (!r) in self_test_division() 258 if (!r) in self_test_division() 280 if (!r) in self_test_division() 296 if (!r) in self_test_division() 314 bool r; in self_test_malloc() local 331 if (!r) in self_test_malloc() 348 if (!r) in self_test_malloc() 368 if (!r) in self_test_malloc() 389 if (!r) in self_test_malloc() [all …]
|
/optee_os-3.20.0/core/arch/arm/mm/ |
A D | mobj_dyn_shm.c | 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() 121 r->mm = NULL; in reg_shm_unmap_helper() 142 if (r->guarded && !r->releasing) { in mobj_reg_shm_free() 206 if (!r->mm) { in mobj_reg_shm_inc_map() 369 if (!r) in mobj_reg_shm_get_by_cookie() 388 if (!r || r->guarded || r->releasing) in mobj_reg_shm_release_by_cookie() 389 r = NULL; in mobj_reg_shm_release_by_cookie() 395 if (!r) in mobj_reg_shm_release_by_cookie() 417 r = NULL; in mobj_reg_shm_release_by_cookie() [all …]
|
/optee_os-3.20.0/core/kernel/ |
A D | user_mode_ctx.c | 12 struct vm_region *r = NULL; in user_mode_ctx_print_mappings() local 16 TAILQ_FOREACH(r, &uctx->vm_info.regions, link) { in user_mode_ctx_print_mappings() 19 if (r->mobj) in user_mode_ctx_print_mappings() 20 mobj_get_pa(r->mobj, r->offset, 0, &pa); in user_mode_ctx_print_mappings() 22 mattr_perm_to_str(flags, sizeof(flags), r->attr); in user_mode_ctx_print_mappings() 25 n, PRIxVA_WIDTH, r->va, PRIxPA_WIDTH, pa, r->size, in user_mode_ctx_print_mappings()
|
A D | refcount.c | 10 bool refcount_inc(struct refcount *r) in refcount_inc() argument 13 unsigned int oval = atomic_load_uint(&r->val); in refcount_inc() 22 if (atomic_cas_uint(&r->val, &oval, nval)) in refcount_inc() 31 bool refcount_dec(struct refcount *r) in refcount_dec() argument 34 unsigned int oval = atomic_load_uint(&r->val); in refcount_dec() 40 if (atomic_cas_uint(&r->val, &oval, nval)) { in refcount_dec()
|
/optee_os-3.20.0/core/include/kernel/ |
A D | refcount.h | 55 bool refcount_inc(struct refcount *r); 57 bool refcount_dec(struct refcount *r); 59 static inline void refcount_set(struct refcount *r, unsigned int val) in refcount_set() argument 61 atomic_store_uint(&r->val, val); in refcount_set() 64 static inline unsigned int refcount_val(struct refcount *r) in refcount_val() argument 66 return atomic_load_uint(&r->val); in refcount_val()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/ciphers/ |
A D | xtea.c | 71 int r; in xtea_ecb_encrypt() local 79 for (r = 0; r < 32; r += 4) { in xtea_ecb_encrypt() 80 y = (y + ((((z<<4)^(z>>5)) + z) ^ skey->xtea.A[r])) & 0xFFFFFFFFUL; in xtea_ecb_encrypt() 81 z = (z + ((((y<<4)^(y>>5)) + y) ^ skey->xtea.B[r])) & 0xFFFFFFFFUL; in xtea_ecb_encrypt() 83 y = (y + ((((z<<4)^(z>>5)) + z) ^ skey->xtea.A[r+1])) & 0xFFFFFFFFUL; in xtea_ecb_encrypt() 84 z = (z + ((((y<<4)^(y>>5)) + y) ^ skey->xtea.B[r+1])) & 0xFFFFFFFFUL; in xtea_ecb_encrypt() 86 y = (y + ((((z<<4)^(z>>5)) + z) ^ skey->xtea.A[r+2])) & 0xFFFFFFFFUL; in xtea_ecb_encrypt() 107 int r; in xtea_ecb_decrypt() local 115 for (r = 31; r >= 0; r -= 4) { in xtea_ecb_decrypt() 116 z = (z - ((((y<<4)^(y>>5)) + y) ^ skey->xtea.B[r])) & 0xFFFFFFFFUL; in xtea_ecb_decrypt() [all …]
|
A D | anubis.c | 884 int N, R, i, pos, r; in s_anubis_setup() local 927 for (r = 0; r <= R; r++) { in s_anubis_setup() 975 if (r == R) { in s_anubis_setup() 985 kappa[0] = inter[0] ^ rc[r]; in s_anubis_setup() 998 for (r = 1; r < R; r++) { in s_anubis_setup() 1025 int i, pos, r; in anubis_crypt() local 1045 for (r = 1; r < R; r++) { in anubis_crypt() 1051 roundKey[r][0]; in anubis_crypt() 1057 roundKey[r][1]; in anubis_crypt() 1063 roundKey[r][2]; in anubis_crypt() [all …]
|
A D | blowfish.c | 302 ulong32 l, r; in s_blowfish_encipher() local 313 r = *R; in s_blowfish_encipher() 318 r ^= skey->blowfish.K[rounds++]; l ^= F(r); in s_blowfish_encipher() 320 r ^= skey->blowfish.K[rounds++]; l ^= F(r); in s_blowfish_encipher() 325 r ^= skey->blowfish.K[17]; in s_blowfish_encipher() 327 *L = r; in s_blowfish_encipher() 522 int r; in s_blowfish_ecb_decrypt() local 547 for (r = 15; r > 0; ) { in s_blowfish_ecb_decrypt() 548 L ^= F(R); R ^= skey->blowfish.K[r--]; in s_blowfish_ecb_decrypt() 549 R ^= F(L); L ^= skey->blowfish.K[r--]; in s_blowfish_ecb_decrypt() [all …]
|
A D | rc5.c | 128 int r; in s_rc5_ecb_encrypt() local 144 for (r = 0; r < skey->rc5.rounds; r += 2) { in s_rc5_ecb_encrypt() 152 for (r = 0; r < skey->rc5.rounds; r++) { in s_rc5_ecb_encrypt() 188 int r; in s_rc5_ecb_decrypt() local 203 for (r = skey->rc5.rounds - 1; r >= 0; r -= 2) { in s_rc5_ecb_decrypt() 211 for (r = skey->rc5.rounds - 1; r >= 0; r--) { in s_rc5_ecb_decrypt()
|
/optee_os-3.20.0/lib/libutils/isoc/arch/arm/softfloat/source/ |
A D | s_approxRecipSqrt32_1.c | 58 uint_fast32_t r; in softfloat_approxRecipSqrt32_1() local 67 r = ((uint_fast32_t) r0<<16) + ((r0 * (uint_fast64_t) delta0)>>25); in softfloat_approxRecipSqrt32_1() 69 r += ((uint32_t) ((r>>1) + (r>>3) - ((uint_fast32_t) r0<<14)) in softfloat_approxRecipSqrt32_1() 72 if ( ! (r & 0x80000000) ) r = 0x80000000; in softfloat_approxRecipSqrt32_1() 73 return r; in softfloat_approxRecipSqrt32_1()
|
A D | s_approxRecip32_1.c | 57 uint_fast32_t r; in softfloat_approxRecip32_1() local 64 r = ((uint_fast32_t) r0<<16) + ((r0 * (uint_fast64_t) delta0)>>24); in softfloat_approxRecip32_1() 66 r += ((uint32_t) r * (uint_fast64_t) sqrDelta0)>>48; in softfloat_approxRecip32_1() 67 return r; in softfloat_approxRecip32_1()
|
/optee_os-3.20.0/core/drivers/clk/sam/ |
A D | sama5d2_clk.c | 76 struct clk_range r; member 80 .r = { .min = 0, .max = 83000000 }, 84 .r = { .min = 0, .max = 83000000 }, 94 .r = { .min = 0, .max = 83000000 }, 98 .r = { .min = 0, .max = 83000000 }, 102 .r = { .min = 0, .max = 83000000 }, 106 .r = { .min = 0, .max = 83000000 }, 110 .r = { .min = 0, .max = 83000000 }, 114 .r = { .min = 0, .max = 83000000 }, 238 struct clk_range r; member [all …]
|
/optee_os-3.20.0/lib/libutils/isoc/ |
A D | qsort.c | 79 int d, r, swaptype, swap_cnt; in qsort() local 108 if (r == 0) { in qsort() 116 if (r == 0) { in qsort() 138 r = min(pa - (char *)a, pb - pa); in qsort() 139 vecswap(a, pb - r, r); in qsort() 141 vecswap(pb, pn - r, r); in qsort() 142 if ((r = pb - pa) > (int)es) in qsort() 143 qsort(a, r / es, es, cmp); in qsort() 144 if ((r = pd - pc) > (int)es) { in qsort() 146 a = pn - r; in qsort() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/dsa/ |
A D | dsa_verify_hash.c | 23 int dsa_verify_hash_raw( void *r, void *s, in dsa_verify_hash_raw() argument 30 LTC_ARGCHK(r != NULL); in dsa_verify_hash_raw() 44 …if (mp_cmp_d(r, 0) != LTC_MP_GT || mp_cmp_d(s, 0) != LTC_MP_GT || mp_cmp(r, key->q) != LTC_MP_LT |… in dsa_verify_hash_raw() 60 …if ((err = mp_mulmod(r, w, key->q, u2)) != CRYPT_OK) { goto erro… in dsa_verify_hash_raw() 69 if (mp_cmp(r, v) == LTC_MP_EQ) { in dsa_verify_hash_raw() 94 void *r, *s; in dsa_verify_hash() local 101 if ((err = mp_init_multi(&r, &s, LTC_NULL)) != CRYPT_OK) { in dsa_verify_hash() 105 LTC_SET_ASN1(sig_seq, 0, LTC_ASN1_INTEGER, r, 1UL); in dsa_verify_hash() 119 err = dsa_verify_hash_raw(r, s, hash, hashlen, stat, key); in dsa_verify_hash() 122 mp_clear_multi(r, s, LTC_NULL); in dsa_verify_hash()
|
A D | dsa_sign_hash.c | 24 void *r, void *s, in dsa_sign_hash_raw() argument 32 LTC_ARGCHK(r != NULL); in dsa_sign_hash_raw() 74 …if ((err = mp_exptmod(key->g, k, key->p, r)) != CRYPT_OK) { goto error; } in dsa_sign_hash_raw() 75 …if ((err = mp_mod(r, key->q, r)) != CRYPT_OK) { goto error; } in dsa_sign_hash_raw() 77 …if (mp_iszero(r) == LTC_MP_YES) { goto retry; } in dsa_sign_hash_raw() 84 …if ((err = mp_mul(key->x, r, s)) != CRYPT_OK) { goto error; } in dsa_sign_hash_raw() 116 void *r, *s; in dsa_sign_hash() local 124 if (mp_init_multi(&r, &s, LTC_NULL) != CRYPT_OK) { in dsa_sign_hash() 128 if ((err = dsa_sign_hash_raw(in, inlen, r, s, prng, wprng, key)) != CRYPT_OK) { in dsa_sign_hash() 133 LTC_ASN1_INTEGER, 1UL, r, in dsa_sign_hash() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/mac/poly1305/ |
A D | poly1305.c | 24 r0 = st->r[0]; in s_poly1305_block() 25 r1 = st->r[1]; in s_poly1305_block() 26 r2 = st->r[2]; in s_poly1305_block() 27 r3 = st->r[3]; in s_poly1305_block() 28 r4 = st->r[4]; in s_poly1305_block() 90 LOAD32L(st->r[0], key + 0); st->r[0] = (st->r[0] ) & 0x3ffffff; in poly1305_init() 91 LOAD32L(st->r[1], key + 3); st->r[1] = (st->r[1] >> 2) & 0x3ffff03; in poly1305_init() 92 LOAD32L(st->r[2], key + 6); st->r[2] = (st->r[2] >> 4) & 0x3ffc0ff; in poly1305_init() 93 LOAD32L(st->r[3], key + 9); st->r[3] = (st->r[3] >> 6) & 0x3f03fff; in poly1305_init() 94 LOAD32L(st->r[4], key + 12); st->r[4] = (st->r[4] >> 8) & 0x00fffff; in poly1305_init() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ec25519/ |
A D | tweetnacl.c | 171 i64 x[80],r,i; in tweetnacl_crypto_scalarmult() local 375 sv reduce(u8 *r) in reduce() argument 380 modL(r,x); in reduce() 399 reduce(r); in tweetnacl_crypto_sign() 420 S(num,r[1]); in unpackneg() 435 M(r[0],t,den); in unpackneg() 437 S(chk,r[0]); in unpackneg() 439 if (neq25519(chk, num)) M(r[0],r[0],I); in unpackneg() 441 S(chk,r[0]); in unpackneg() 445 if (par25519(r[0]) == (p[31]>>7)) Z(r[0],gf0,r[0]); in unpackneg() [all …]
|
/optee_os-3.20.0/lib/libutils/isoc/arch/arm/ |
A D | arm32_aeabi_ldivmod.c | 9 unsigned long long r; /* computed remainder */ member 23 qr->r = 0xFFFFFFFFFFFFFFFFULL; /* division by 0 */ in division_lqr() 41 qr->r = n; in division_lqr() 55 qr->r = -qr->r; in ul_div_qr() 74 asm_ulqr->v1 = qr.r; in __ul_divmod() 103 asm_lqr->v1 = qr.r; in __l_divmod()
|
A D | arm32_aeabi_divmod.c | 23 unsigned r; /* computed remainder */ member 62 qr->r = 0xFFFFFFFF; /* division by 0 */ in division_qr() 81 qr->r = n; in division_qr() 94 qr->r = -qr->r; in uint_div_qr() 112 return ret_uidivmod_values(qr.q, qr.r); in __aeabi_uidivmod() 150 return ret_idivmod_values(qr.q, qr.r); in __aeabi_idivmod()
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/ |
A D | ecdsa.c | 118 mbedtls_mpi_init( &ctx->r ); in ecdsa_restart_sig_init() 131 mbedtls_mpi_free( &ctx->r ); in ecdsa_restart_sig_free() 264 mbedtls_mpi *pk = &k, *pr = r; in ecdsa_sign_restartable() 286 pr = &rs_ctx->sig->r; in ecdsa_sign_restartable() 635 if( mbedtls_mpi_cmp_int( r, 1 ) < 0 || mbedtls_mpi_cmp_mpi( r, &grp->N ) >= 0 || in ecdsa_verify_restartable() 758 mbedtls_mpi r, s; in mbedtls_ecdsa_write_signature_restartable() local 764 mbedtls_mpi_init( &r ); in mbedtls_ecdsa_write_signature_restartable() 790 mbedtls_mpi_free( &r ); in mbedtls_ecdsa_write_signature_restartable() 856 mbedtls_mpi r, s; in mbedtls_ecdsa_read_signature_restartable() local 861 mbedtls_mpi_init( &r ); in mbedtls_ecdsa_read_signature_restartable() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ecc/ |
A D | ecc_sign_hash.c | 32 void *r, *s, *e, *p, *b; in ecc_sign_hash_ex() local 49 if ((err = mp_init_multi(&r, &s, &e, &b, LTC_NULL)) != CRYPT_OK) { in ecc_sign_hash_ex() 79 if ((err = mp_mod(pubkey.pubkey.x, p, r)) != CRYPT_OK) { goto error; } in ecc_sign_hash_ex() 93 if (mp_iszero(r) == LTC_MP_YES) { in ecc_sign_hash_ex() 121 LTC_ASN1_INTEGER, 1UL, r, in ecc_sign_hash_ex() 129 i = mp_unsigned_bin_size(r); in ecc_sign_hash_ex() 130 if ((err = mp_to_unsigned_bin(r, out + (pbytes - i))) != CRYPT_OK) { goto errnokey; } in ecc_sign_hash_ex() 144 i = mp_unsigned_bin_size(r); in ecc_sign_hash_ex() 145 if ((err = mp_to_unsigned_bin(r, out + 32 - i)) != CRYPT_OK) { goto errnokey; } in ecc_sign_hash_ex() 162 LTC_SSHDATA_MPINT, r, in ecc_sign_hash_ex() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/ |
A D | dsa.c | 102 void *r, *s; in crypto_acipher_dsa_sign() local 137 ltc_res = mp_init_multi(&r, &s, NULL); in crypto_acipher_dsa_sign() 143 ltc_res = dsa_sign_hash_raw(msg, msg_len, r, s, NULL, in crypto_acipher_dsa_sign() 149 mp_to_unsigned_bin(r, (uint8_t *)sig + *sig_len/2 - in crypto_acipher_dsa_sign() 150 mp_unsigned_bin_size(r)); in crypto_acipher_dsa_sign() 158 mp_clear_multi(r, s, NULL); in crypto_acipher_dsa_sign() 170 void *r, *s; in crypto_acipher_dsa_verify() local 187 ltc_res = mp_init_multi(&r, &s, NULL); in crypto_acipher_dsa_verify() 192 mp_read_unsigned_bin(r, (uint8_t *)sig, sig_len/2); in crypto_acipher_dsa_verify() 194 ltc_res = dsa_verify_hash_raw(r, s, msg, msg_len, <c_stat, <c_key); in crypto_acipher_dsa_verify() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/sosemanuk/ |
A D | sosemanuk.c | 213 st->kc[i ++] = r ## d0; \ in sosemanuk_setup() 214 st->kc[i ++] = r ## d1; \ in sosemanuk_setup() 215 st->kc[i ++] = r ## d2; \ in sosemanuk_setup() 216 st->kc[i ++] = r ## d3; \ in sosemanuk_setup() 352 KA(zc, r ## i0, r ## i1, r ## i2, r ## i3); \ in sosemanuk_setiv() 353 S(r ## i0, r ## i1, r ## i2, r ## i3, r ## i4); \ in sosemanuk_setiv() 354 SERPENT_LT(r ## o0, r ## o1, r ## o2, r ## o3); \ in sosemanuk_setiv() 362 KA(zc, r ## i0, r ## i1, r ## i2, r ## i3); \ in sosemanuk_setiv() 363 S(r ## i0, r ## i1, r ## i2, r ## i3, r ## i4); \ in sosemanuk_setiv() 364 SERPENT_LT(r ## o0, r ## o1, r ## o2, r ## o3); \ in sosemanuk_setiv() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/asn1/der/set/ |
A D | der_encode_set.c | 22 int r; in s_qsort_helper() local 24 r = s_ltc_to_asn1(A->type) - s_ltc_to_asn1(B->type); in s_qsort_helper() 27 if (r == 0) { in s_qsort_helper() 31 return r; in s_qsort_helper()
|