/optee_os/core/arch/arm/plat-imx/registers/ |
A D | imx7-crm.h | 14 #define CCM_GPRx(idx) (((idx) * CCM_GRPx_OFFSET) + CCM_GPR0) argument 15 #define CCM_GPRx_SET(idx) (CCM_GPRx(idx) + 0x4) argument 16 #define CCM_GPRx_CLR(idx) (CCM_GPRx(idx) + 0x8) argument 17 #define CCM_GPRx_TOG(idx) (CCM_GPRx(idx) + 0xC) argument 25 #define CCM_PLL_CTRLx_SET(idx) (CCM_PLL_CTRLx(idx) + 0x4) argument 26 #define CCM_PLL_CTRLx_CLR(idx) (CCM_PLL_CTRLx(idx) + 0x8) argument 27 #define CCM_PLL_CTRLx_TOG(idx) (CCM_PLL_CTRLx(idx) + 0xC) argument 35 #define CCM_CCGRx_SET(idx) (CCM_CCGRx(idx) + 0x4) argument 36 #define CCM_CCGRx_CLR(idx) (CCM_CCGRx(idx) + 0x8) argument 37 #define CCM_CCGRx_TOG(idx) (CCM_CCGRx(idx) + 0xC) argument [all …]
|
A D | imx8m-crm.h | 12 #define CCM_CCGRx(idx) (((idx) * CCM_CCGRx_OFFSET) + CCM_CCGR0) argument 13 #define CCM_CCGRx_SET(idx) (CCM_CCGRx(idx) + 0x4) argument 14 #define CCM_CCGRx_CLR(idx) (CCM_CCGRx(idx) + 0x8) argument 15 #define CCM_CCGRx_TOG(idx) (CCM_CCGRx(idx) + 0xC) argument 17 #define BS_CCM_CCGRx_SETTING(idx) ((idx) * 4) argument 18 #define BM_CCM_CCGRx_SETTING(idx) \ argument 20 #define CCM_CCGRx_DISABLE(idx) \ argument 22 #define CCM_CCGRx_RUN(idx) \ argument 23 BIT32(BS_CCM_CCGRx_SETTING(idx)) 24 #define CCM_CCGRx_RUN_WAIT(idx) \ argument [all …]
|
/optee_os/core/drivers/crypto/caam/utils/ |
A D | utils_sgt.c | 21 unsigned int idx = 0; in caam_sgt_cache_op() local 30 for (idx = 0; idx < insgt->number && rem_length; idx++) { in caam_sgt_cache_op() 41 unsigned int idx = 0; in caam_sgt_fill_table() local 45 for (idx = 0; idx < sgt->number - 1; idx++) { in caam_sgt_fill_table() 46 CAAM_SGT_ENTRY(&sgt->sgt[idx], sgt->buf[idx].paddr, in caam_sgt_fill_table() 51 CAAM_SGT_ENTRY_FINAL(&sgt->sgt[idx], sgt->buf[idx].paddr, in caam_sgt_fill_table() 53 sgt_entry_trace(idx, sgt); in caam_sgt_fill_table() 61 unsigned int idx = 0; in caam_sgt_derive() local 74 for (; idx < from->number && off >= from->buf[idx].length; idx++) in caam_sgt_derive() 77 st_idx = idx; in caam_sgt_derive() [all …]
|
A D | utils_sgt_v1.c | 15 void sgt_entry_trace(unsigned int idx __maybe_unused, in sgt_entry_trace() 18 SGT_TRACE("SGT[%d] (%p)", idx, &sgt->sgt[idx]); in sgt_entry_trace() 19 SGT_TRACE("SGT[%d]->data = %p", idx, sgt->buf[idx].data); in sgt_entry_trace() 20 SGT_TRACE("SGT[%d]->length = %zu", idx, sgt->buf[idx].length); in sgt_entry_trace() 21 SGT_TRACE("SGT[%d]->paddr = 0x%" PRIxPA, idx, sgt->buf[idx].paddr); in sgt_entry_trace() 22 SGT_TRACE("SGT[%d]->ptr_ms = %" PRIx32, idx, sgt->sgt[idx].v1.ptr_ms); in sgt_entry_trace() 23 SGT_TRACE("SGT[%d]->ptr_ls = %" PRIx32, idx, sgt->sgt[idx].v1.ptr_ls); in sgt_entry_trace() 24 SGT_TRACE("SGT[%d]->len_f_e = %" PRIx32, idx, in sgt_entry_trace() 25 sgt->sgt[idx].v1.len_f_e); in sgt_entry_trace() 26 SGT_TRACE("SGT[%d]->offset = %" PRIx32, idx, sgt->sgt[idx].v1.offset); in sgt_entry_trace()
|
A D | utils_sgt_v2.c | 12 void sgt_entry_trace(unsigned int idx __maybe_unused, in sgt_entry_trace() 15 SGT_TRACE("SGT[%d] (%p)", idx, &sgt->sgt[idx]); in sgt_entry_trace() 16 SGT_TRACE("SGT[%d]->data = %p", idx, sgt->buf[idx].data); in sgt_entry_trace() 17 SGT_TRACE("SGT[%d]->length = %zu", idx, sgt->buf[idx].length); in sgt_entry_trace() 18 SGT_TRACE("SGT[%d]->paddr = 0x%" PRIxPA, idx, sgt->buf[idx].paddr); in sgt_entry_trace() 19 SGT_TRACE("SGT[%d]->w1 = %" PRIx64, idx, sgt->sgt[idx].v2.w1); in sgt_entry_trace() 20 SGT_TRACE("SGT[%d]->w2 = %" PRIx64, idx, sgt->sgt[idx].v2.w2); in sgt_entry_trace()
|
/optee_os/core/drivers/crypto/caam/cipher/ |
A D | caam_cipher_xts.c | 22 size_t idx = 0; in do_galois_mult() local 26 for (idx = 0; idx < buf->length; idx++) { in do_galois_mult() 28 buf->data[idx] = (buf->data[idx] << 1) | tmp; in do_galois_mult() 57 for (idx = 0; idx < ctx->alg->size_block; idx++) in do_tweak_block() 58 tmp->orig.data[idx] = srcbuf->data[idx] ^ enc_tweak->data[idx]; in do_tweak_block() 68 for (idx = 0; idx < ctx->alg->size_block; idx++) in do_tweak_block() 69 dstbuf->data[idx] = tmp->orig.data[idx] ^ enc_tweak->data[idx]; in do_tweak_block() 88 size_t idx = 0; in caam_cipher_update_xts() local 220 for (idx = 0; idx < lastblk; idx++) { in caam_cipher_update_xts() 227 for (; idx < ctx->alg->size_block; idx++) in caam_cipher_update_xts() [all …]
|
/optee_os/core/lib/libtomcrypt/src/math/fp/ |
A D | ltc_ecc_fp_mulmod.c | 645 fp_cache[idx].g = NULL; in _add_entry() 1231 int idx, err; in ltc_ecc_fp_mulmod() local 1238 idx = _find_base(G); in ltc_ecc_fp_mulmod() 1241 if (idx == -1) { in ltc_ecc_fp_mulmod() 1243 idx = _find_hole(); in ltc_ecc_fp_mulmod() 1245 if (idx >= 0) { in ltc_ecc_fp_mulmod() 1251 if (idx != -1) { in ltc_ecc_fp_mulmod() 1258 if (idx >= 0 && fp_cache[idx].lru_count == 2) { in ltc_ecc_fp_mulmod() 1276 if (idx >= 0 && fp_cache[idx].lru_count >= 2) { in ltc_ecc_fp_mulmod() 1335 int idx; in ltc_ecc_fp_add_point() local [all …]
|
/optee_os/lib/libmbedtls/mbedtls/library/ |
A D | debug.c | 141 size_t i, idx = 0; in mbedtls_debug_print_buf() local 156 idx = 0; in mbedtls_debug_print_buf() 174 idx += mbedtls_snprintf( str + idx, sizeof( str ) - idx, "%04x: ", in mbedtls_debug_print_buf() 179 idx += mbedtls_snprintf( str + idx, sizeof( str ) - idx, " %02x", in mbedtls_debug_print_buf() 187 idx += mbedtls_snprintf( str + idx, sizeof( str ) - idx, " " ); in mbedtls_debug_print_buf() 189 mbedtls_snprintf( str + idx, sizeof( str ) - idx, " %s\n", txt ); in mbedtls_debug_print_buf() 224 size_t idx = 0; in mbedtls_debug_print_mpi() local 244 idx = 3; in mbedtls_debug_print_mpi() 256 idx += 3; in mbedtls_debug_print_mpi() 267 if( idx != 0 ) in mbedtls_debug_print_mpi() [all …]
|
/optee_os/core/tee/ |
A D | fs_dirfile.c | 44 if (idx < dirh->nbits) in maybe_grow_files() 53 dirh->nbits = idx + 1; in maybe_grow_files() 63 bit_set(dirh->files, idx); in set_file() 70 if (idx < dirh->nbits) in clear_file() 71 bit_clear(dirh->files, idx); in clear_file() 76 if (idx < dirh->nbits) in test_file() 233 dfh->idx = n; in tee_fs_dirfile_find() 279 if (dfh->idx < 0) { in tee_fs_dirfile_rename() 290 dfh->idx = dfh2.idx; in tee_fs_dirfile_rename() 344 int i = *idx + 1; in tee_fs_dirfile_get_next() [all …]
|
A D | tadb.c | 147 if (idx < db->nbits) in maybe_grow_files() 156 db->nbits = idx + 1; in maybe_grow_files() 177 if (idx < db->nbits) in clear_file() 316 size_t idx; in populate_files() local 336 for (idx = 0;; idx++) { in populate_files() 499 size_t idx; in find_ent() local 508 for (idx = 0;; idx++) { in find_ent() 525 *idx_ret = idx; in find_ent() 548 size_t idx; in tee_tadb_ta_close_and_commit() local 602 size_t idx; in tee_tadb_ta_delete() local [all …]
|
/optee_os/core/drivers/crypto/crypto_api/math/ |
A D | modulus.c | 33 size_t min = 0, idx = 0; in drvcrypt_xor_mod_n() local 39 for (; idx < min; idx++) in drvcrypt_xor_mod_n() 40 data->result.data[idx] = in drvcrypt_xor_mod_n() 41 data->a.data[idx] ^ data->b.data[idx]; in drvcrypt_xor_mod_n() 46 memcpy(&data->result.data[idx], in drvcrypt_xor_mod_n() 47 &data->a.data[idx], in drvcrypt_xor_mod_n() 50 memcpy(&data->result.data[idx], in drvcrypt_xor_mod_n() 51 &data->b.data[idx], in drvcrypt_xor_mod_n() 54 memset(&data->result.data[idx], 0, in drvcrypt_xor_mod_n()
|
/optee_os/core/drivers/crypto/caam/ |
A D | caam_rng.c | 73 unsigned int idx = 0; in do_allocate() local 85 for (idx = 0; idx < RNG_DATABUF_NB; idx++) { in do_allocate() 104 unsigned int idx = 0; in do_free() local 107 for (idx = 0; idx < RNG_DATABUF_NB; idx++) { in do_free() 218 unsigned int idx = 0; in do_check_data() local 222 for (idx = 0; idx < RNG_DATABUF_NB; idx++) { in do_check_data() 226 idx); in do_check_data() 247 for (idx = 0; idx < RNG_DATABUF_NB; idx++) { in do_check_data() 254 idx); in do_check_data() 340 unsigned int idx = 0; in caam_rng_init_data() local [all …]
|
A D | caam_pwr.c | 24 uint32_t idx = 0; in caam_pwr_add_backup() local 32 for (idx = 0; idx < nbentries; idx++) in caam_pwr_add_backup() 33 nbregs += regs[idx].nbregs; in caam_pwr_add_backup() 60 uint32_t idx = 0; in do_save_regs() local 67 for (idx = 0; idx < elem->nbentries; idx++, reg++) { in do_save_regs() 90 uint32_t idx = 0; in do_restore_regs() local 97 for (idx = 0; idx < elem->nbentries; idx++, reg++) { in do_restore_regs()
|
/optee_os/lib/libutee/ |
A D | base64.c | 60 static bool get_idx(char ch, uint8_t *idx) in get_idx() argument 66 *idx = n; in get_idx() 77 uint8_t idx = 0; in _base64_dec() local 87 if (!get_idx(data[n], &idx)) in _base64_dec() 92 byte = idx << 2; in _base64_dec() 97 b[m] = byte | (idx >> 4); in _base64_dec() 99 byte = (idx & 0xf) << 4; in _base64_dec() 104 b[m] = byte | (idx >> 2); in _base64_dec() 106 byte = (idx & 0x3) << 6; in _base64_dec() 111 b[m] = byte | idx; in _base64_dec()
|
/optee_os/core/lib/libtomcrypt/src/encauth/ccm/ |
A D | ccm_test.c | 117 int err, idx; in ccm_test() 123 idx = find_cipher("aes"); in ccm_test() 124 if (idx == -1) { in ccm_test() 125 idx = find_cipher("rijndael"); in ccm_test() 126 if (idx == -1) { in ccm_test() 139 if ((err = ccm_memory(idx, in ccm_test() 150 if ((err = ccm_memory(idx, in ccm_test() 188 if ((err = ccm_memory(idx, in ccm_test() 225 if ((err = ccm_memory(idx, in ccm_test() 245 cipher_descriptor[idx]->done(&skey); in ccm_test() [all …]
|
/optee_os/core/drivers/crypto/caam/hal/imx_8q/registers/ |
A D | ctrl_regs.h | 15 #define JRxDID_MS(idx) (JR0DID_MS + (idx) * (JRxDID_SIZE)) argument 16 #define JRxDID_LS(idx) (JR0DID_LS + (idx) * (JRxDID_SIZE)) argument 33 #define JRX_SMVBAR(idx) (0x0184 + (idx) * (8)) argument
|
/optee_os/core/drivers/crypto/caam/hal/imx_8ulp/registers/ |
A D | ctrl_regs.h | 20 #define JRxDID_MS(idx) (JR0DID_MS + ((idx) * (JRxDID_SIZE))) argument 21 #define JRxDID_LS(idx) (JR0DID_LS + ((idx) * (JRxDID_SIZE))) argument 38 #define JRX_SMVBAR(idx) (0x0184 + (idx) * (8)) argument
|
/optee_os/core/lib/libtomcrypt/src/encauth/gcm/ |
A D | gcm_test.c | 326 int idx, err; in gcm_test() 332 idx = find_cipher("aes"); in gcm_test() 333 if (idx == -1) { in gcm_test() 334 idx = find_cipher("rijndael"); in gcm_test() 335 if (idx == -1) { in gcm_test() 342 if ((err = gcm_init(&gcm, idx, tests[0].K, tests[0].keylen)) != CRYPT_OK) return err; in gcm_test() 350 if ((err = gcm_memory(idx, tests[x].K, tests[x].keylen, in gcm_test() 368 if ((err = gcm_memory(idx, tests[x].K, tests[x].keylen, in gcm_test() 394 err = gcm_memory(idx, key, sizeof(key), iv, sizeof(iv), NULL, 0, in gcm_test() 402 err = gcm_memory(idx, key, sizeof(key), iv, sizeof(iv), NULL, 0, in gcm_test()
|
/optee_os/core/lib/libtomcrypt/src/modes/f8/ |
A D | f8_test_mode.c | 42 int err, idx; in f8_test_mode() 44 idx = find_cipher("aes"); in f8_test_mode() 45 if (idx == -1) { in f8_test_mode() 46 idx = find_cipher("rijndael"); in f8_test_mode() 47 if (idx == -1) return CRYPT_NOP; in f8_test_mode() 51 if ((err = f8_start(idx, IV, key, sizeof(key), salt, sizeof(salt), 0, &f8)) != CRYPT_OK) { in f8_test_mode()
|
/optee_os/core/include/drivers/ |
A D | tzc400.h | 80 #define FAIL_FILTER_OFF(idx) (U(0x10) * (idx)) argument 82 #define FAIL_ADDRESS_LOW(idx) (FAIL_ADDRESS_LOW_OFF + FAIL_FILTER_OFF(idx)) argument 83 #define FAIL_ADDRESS_HIGH(idx) (FAIL_ADDRESS_HIGH_OFF + FAIL_FILTER_OFF(idx)) argument 84 #define FAIL_CONTROL(idx) (FAIL_CONTROL_OFF + FAIL_FILTER_OFF(idx)) argument 85 #define FAIL_ID(idx) (FAIL_ID_OFF + FAIL_FILTER_OFF(idx)) argument
|
/optee_os/core/drivers/ |
A D | gic.c | 256 size_t idx = it / NUM_INTS_PER_REG; in gic_it_add() local 262 io_write32(gd->gicd_base + GICD_ICPENDR(idx), mask); in gic_it_add() 274 size_t idx __maybe_unused = it / NUM_INTS_PER_REG; in gic_it_set_cpu_mask() 295 size_t idx __maybe_unused = it / NUM_INTS_PER_REG; in gic_it_set_prio() 309 size_t idx = it / NUM_INTS_PER_REG; in gic_it_enable() local 317 io_write32(base + GICD_ISENABLER(idx), mask); in gic_it_enable() 322 size_t idx = it / NUM_INTS_PER_REG; in gic_it_disable() local 334 size_t idx = it / NUM_INTS_PER_REG; in gic_it_set_pending() local 341 io_write32(gd->gicd_base + GICD_ISPENDR(idx), mask); in gic_it_set_pending() 380 size_t idx = it / NUM_INTS_PER_REG; in gic_it_is_enabled() local [all …]
|
/optee_os/core/lib/libtomcrypt/src/modes/lrw/ |
A D | lrw_test.c | 71 int idx, err, x; in lrw_test() 75 idx = find_cipher("aes"); in lrw_test() 76 if (idx == -1) { in lrw_test() 77 idx = find_cipher("rijndael"); in lrw_test() 78 if (idx == -1) { in lrw_test() 85 … if ((err = lrw_start(idx, tests[x].IV, tests[x].key, 16, tests[x].tweak, 0, &lrw)) != CRYPT_OK) { in lrw_test()
|
/optee_os/ta/avb/ |
A D | entry.c | 80 uint64_t idx; in read_rb_idx() local 100 res = TEE_ReadObjectData(h, &idx, sizeof(idx), &count); in read_rb_idx() 103 if (count != sizeof(idx)) { in read_rb_idx() 104 idx = 0; /* Not yet written slots are reported as 0 */ in read_rb_idx() 115 res = TEE_WriteObjectData(h, &idx, sizeof(idx)); in read_rb_idx() 121 params[1].value.a = idx >> 32; in read_rb_idx() 122 params[1].value.b = idx; in read_rb_idx() 136 uint64_t idx; in write_rb_idx() local 157 res = TEE_ReadObjectData(h, &idx, sizeof(idx), &count); in write_rb_idx() 160 if (count != sizeof(idx)) in write_rb_idx() [all …]
|
/optee_os/core/lib/libtomcrypt/src/misc/crypt/ |
A D | crypt_cipher_is_valid.c | 22 int cipher_is_valid(int idx) in cipher_is_valid() argument 25 if (idx < 0 || idx >= TAB_SIZE || cipher_descriptor[idx] == NULL) { in cipher_is_valid()
|
A D | crypt_hash_is_valid.c | 22 int hash_is_valid(int idx) in hash_is_valid() argument 25 if (idx < 0 || idx >= TAB_SIZE || hash_descriptor[idx] == NULL) { in hash_is_valid()
|