Home
last modified time | relevance | path

Searched refs:idx (Results 1 – 25 of 129) sorted by relevance

123456

/optee_os/core/arch/arm/plat-imx/registers/
H A Dimx7-crm.h14 #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
24 #define CCM_PLL_CTRLx(idx) (((idx) * CCM_PLL_CTRLx_OFFSET) + CCM_PLL_CTRL0) 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
34 #define CCM_CCGRx(idx) (((idx) * CCM_CCGRx_OFFSET) + CCM_CCGR0) argument
35 #define CCM_CCGRx_SET(idx) (CCM_CCGRx(idx) + 0x4) argument
[all …]
H A Dimx8m-crm.h12 #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
19 SHIFT_U32(0x3, BS_CCM_CCGRx_SETTING(idx))
20 #define CCM_CCGRx_DISABLE(idx) \ argument
21 SHIFT_U32(0, BS_CCM_CCGRx_SETTING(idx))
22 #define CCM_CCGRx_RUN(idx) \ argument
[all …]
/optee_os/core/drivers/crypto/caam/utils/
H A Dutils_sgt.c33 unsigned int idx = 0; in caam_sgt_cache_op() local
40 for (idx = 0; idx < insgt->number && rem_length; idx++) { in caam_sgt_cache_op()
41 op_size = MIN(rem_length, insgt->buf[idx].length); in caam_sgt_cache_op()
42 if (!insgt->buf[idx].nocache) in caam_sgt_cache_op()
43 cache_operation(op, (void *)insgt->buf[idx].data, in caam_sgt_cache_op()
51 unsigned int idx = 0; in caam_sgt_fill_table() local
55 for (idx = 0; idx < sgt->number - 1; idx++) { in caam_sgt_fill_table()
56 CAAM_SGT_ENTRY(&sgt->sgt[idx], sgt->buf[idx].paddr, in caam_sgt_fill_table()
57 sgt->buf[idx].length); in caam_sgt_fill_table()
58 sgt_entry_trace(idx, sgt); in caam_sgt_fill_table()
[all …]
H A Dutils_sgt_v1.c15 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()
H A Dutils_sgt_v2.c12 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/arch/arm/plat-sam/
H A Dmatrix.c111 unsigned int idx = peri_id / 32; in matrix_set_periph_world() local
115 if (idx > 3) in matrix_set_periph_world()
118 spselr = matrix_read(base, MATRIX_SPSELR(idx)); in matrix_set_periph_world()
123 matrix_write(base, MATRIX_SPSELR(idx), spselr); in matrix_set_periph_world()
198 int idx = 0; in matrix_save_regs() local
200 for (idx = 0; idx < MATRIX_SPSELR_COUNT; idx++) in matrix_save_regs()
201 state->spselr[idx] = matrix_read(base, MATRIX_SPSELR(idx)); in matrix_save_regs()
203 for (idx = 0; idx < MATRIX_SLAVE_COUNT; idx++) { in matrix_save_regs()
204 state->ssr[idx] = matrix_read(base, MATRIX_SSR(idx)); in matrix_save_regs()
205 state->srtsr[idx] = matrix_read(base, MATRIX_SRTSR(idx)); in matrix_save_regs()
[all …]
/optee_os/core/drivers/crypto/caam/cipher/
H A Dcaam_cipher_xts.c22 size_t idx = 0; in do_galois_mult() local
26 for (idx = 0; idx < buf->length; idx++) { in do_galois_mult()
27 tmptmp = buf->data[idx] >> 7; in do_galois_mult()
28 buf->data[idx] = (buf->data[idx] << 1) | tmp; in do_galois_mult()
51 unsigned int idx = 0; in do_tweak_block() local
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
[all …]
/optee_os/lib/libmbedtls/mbedtls/library/
H A Ddebug.c121 size_t i, idx = 0; in mbedtls_debug_print_buf() local
130 mbedtls_snprintf(str + idx, sizeof(str) - idx, "dumping '%s' (%u bytes)\n", in mbedtls_debug_print_buf()
143 mbedtls_snprintf(str + idx, sizeof(str) - idx, " %s\n", txt); in mbedtls_debug_print_buf()
146 idx = 0; in mbedtls_debug_print_buf()
150 idx += mbedtls_snprintf(str + idx, sizeof(str) - idx, "%04x: ", in mbedtls_debug_print_buf()
155 idx += mbedtls_snprintf(str + idx, sizeof(str) - idx, " %02x", in mbedtls_debug_print_buf()
162 idx += mbedtls_snprintf(str + idx, sizeof(str) - idx, " "); in mbedtls_debug_print_buf()
165 mbedtls_snprintf(str + idx, sizeof(str) - idx, " %s\n", txt); in mbedtls_debug_print_buf()
198 size_t i, idx = 0; in mbedtls_debug_print_ec_coord() local
200 mbedtls_snprintf(str + idx, sizeof(str) - idx, "value of '%s' (%u bits) is:\n", in mbedtls_debug_print_ec_coord()
[all …]
/optee_os/core/drivers/crypto/crypto_api/math/
H A Dmodulus.c32 size_t min = 0, idx = 0; in drvcrypt_xor_mod_n() local
38 for (; idx < min; idx++) in drvcrypt_xor_mod_n()
39 data->result.data[idx] = in drvcrypt_xor_mod_n()
40 data->a.data[idx] ^ data->b.data[idx]; in drvcrypt_xor_mod_n()
45 memcpy(&data->result.data[idx], in drvcrypt_xor_mod_n()
46 &data->a.data[idx], in drvcrypt_xor_mod_n()
49 memcpy(&data->result.data[idx], in drvcrypt_xor_mod_n()
50 &data->b.data[idx], in drvcrypt_xor_mod_n()
53 memset(&data->result.data[idx], 0, in drvcrypt_xor_mod_n()
/optee_os/core/tee/
H A Dfs_dirfile.c54 static TEE_Result maybe_grow_files(struct tee_fs_dirfile_dirh *dirh, int idx) in maybe_grow_files() argument
58 if (idx < dirh->nbits) in maybe_grow_files()
61 p = realloc(dirh->files, bitstr_size(idx + 1)); in maybe_grow_files()
66 bit_nclear(dirh->files, dirh->nbits, idx); in maybe_grow_files()
67 dirh->nbits = idx + 1; in maybe_grow_files()
72 static TEE_Result set_file(struct tee_fs_dirfile_dirh *dirh, int idx) in set_file() argument
74 TEE_Result res = maybe_grow_files(dirh, idx); in set_file()
77 bit_set(dirh->files, idx); in set_file()
82 static void clear_file(struct tee_fs_dirfile_dirh *dirh, int idx) in clear_file() argument
84 if (idx < dirh->nbits) in clear_file()
[all …]
H A Dtadb.c143 static TEE_Result maybe_grow_files(struct tee_tadb_dir *db, int idx) in maybe_grow_files() argument
147 if (idx < db->nbits) in maybe_grow_files()
150 p = realloc(db->files, bitstr_size(idx + 1)); in maybe_grow_files()
155 bit_nclear(db->files, db->nbits, idx); in maybe_grow_files()
156 db->nbits = idx + 1; in maybe_grow_files()
161 static TEE_Result set_file(struct tee_tadb_dir *db, int idx) in set_file() argument
163 TEE_Result res = maybe_grow_files(db, idx); in set_file()
166 bit_set(db->files, idx); in set_file()
171 static void clear_file(struct tee_tadb_dir *db, int idx) in clear_file() argument
177 if (idx < db->nbits) in clear_file()
[all …]
/optee_os/core/lib/libtomcrypt/src/math/fp/
H A Dltc_ecc_fp_mulmod.c623 static int s_add_entry(int idx, ecc_point *g) in s_add_entry() argument
628 fp_cache[idx].g = ltc_ecc_new_point(); in s_add_entry()
629 if (fp_cache[idx].g == NULL) { in s_add_entry()
634 if ((mp_copy(g->x, fp_cache[idx].g->x) != CRYPT_OK) || in s_add_entry()
635 (mp_copy(g->y, fp_cache[idx].g->y) != CRYPT_OK) || in s_add_entry()
636 (mp_copy(g->z, fp_cache[idx].g->z) != CRYPT_OK)) { in s_add_entry()
637 ltc_ecc_del_point(fp_cache[idx].g); in s_add_entry()
638 fp_cache[idx].g = NULL; in s_add_entry()
643 fp_cache[idx].LUT[x] = ltc_ecc_new_point(); in s_add_entry()
644 if (fp_cache[idx].LUT[x] == NULL) { in s_add_entry()
[all …]
/optee_os/core/drivers/crypto/caam/hal/imx_8q/registers/
H A Dctrl_regs.h15 #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/
H A Dcaam_pwr.c27 uint32_t idx = 0; in caam_pwr_add_backup() local
35 for (idx = 0; idx < nbentries; idx++) in caam_pwr_add_backup()
36 nbregs += regs[idx].nbregs; in caam_pwr_add_backup()
63 uint32_t idx = 0; in do_save_regs() local
70 for (idx = 0; idx < elem->nbentries; idx++, reg++) { in do_save_regs()
93 uint32_t idx = 0; in do_restore_regs() local
100 for (idx = 0; idx < elem->nbentries; idx++, reg++) { in do_restore_regs()
/optee_os/core/drivers/crypto/caam/hal/imx_8ulp/registers/
H A Dctrl_regs.h20 #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/drivers/crypto/caam/hal/imx_8m/registers/
H A Dctrl_regs.h20 #define JRxDID_MS(idx) (JR0DID_MS + ((idx) * JRxDID_SIZE)) argument
21 #define JRxDID_LS(idx) (JR0DID_LS + ((idx) * JRxDID_SIZE)) argument
42 #define JRX_SMVBAR(idx) (0x0184 + (idx) * 8) argument
/optee_os/lib/libutils/ext/
H A Dbase64.c60 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/modes/f8/
H A Df8_test_mode.c35 int err, idx; in f8_test_mode()
37 idx = find_cipher("aes"); in f8_test_mode()
38 if (idx == -1) { in f8_test_mode()
39 idx = find_cipher("rijndael"); in f8_test_mode()
40 if (idx == -1) return CRYPT_NOP; in f8_test_mode()
44 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/
H A Dimx_mu.h12 #define IMX_MU_DATA_U32(mesg, idx) ((mesg)->data.u32[(idx)]) argument
13 #define IMX_MU_DATA_U16(mesg, idx) ((mesg)->data.u16[(idx)]) argument
14 #define IMX_MU_DATA_U8(mesg, idx) ((mesg)->data.u8[(idx)]) argument
H A Dtzc400.h80 #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/lib/libtomcrypt/src/encauth/gcm/
H A Dgcm_test.c319 int idx, err; in gcm_test()
325 idx = find_cipher("aes"); in gcm_test()
326 if (idx == -1) { in gcm_test()
327 idx = find_cipher("rijndael"); in gcm_test()
328 if (idx == -1) { in gcm_test()
335 if ((err = gcm_init(&gcm, idx, tests[0].K, tests[0].keylen)) != CRYPT_OK) return err; in gcm_test()
343 if ((err = gcm_memory(idx, tests[x].K, tests[x].keylen, in gcm_test()
361 if ((err = gcm_memory(idx, tests[x].K, tests[x].keylen, in gcm_test()
387 err = gcm_memory(idx, key, sizeof(key), iv, sizeof(iv), NULL, 0, in gcm_test()
395 err = gcm_memory(idx, key, sizeof(key), iv, sizeof(iv), NULL, 0, in gcm_test()
/optee_os/core/lib/libtomcrypt/src/encauth/ccm/
H A Dccm_test.c110 int err, idx; in ccm_test()
116 idx = find_cipher("aes"); in ccm_test()
117 if (idx == -1) { in ccm_test()
118 idx = find_cipher("rijndael"); in ccm_test()
119 if (idx == -1) { in ccm_test()
128 if ((err = cipher_descriptor[idx]->setup(tests[x].key, 16, 0, &skey)) != CRYPT_OK) { in ccm_test()
132 if ((err = ccm_memory(idx, in ccm_test()
143 if ((err = ccm_memory(idx, in ccm_test()
154 …if ((err = ccm_init(&ccm, idx, tests[x].key, 16, tests[x].ptlen, tests[x].taglen, tests[x].headerl… in ccm_test()
181 if ((err = ccm_memory(idx, in ccm_test()
[all …]
/optee_os/core/lib/libtomcrypt/src/misc/crypt/
H A Dcrypt_hash_is_valid.c15 int hash_is_valid(int idx) in hash_is_valid() argument
18 if (idx < 0 || idx >= TAB_SIZE || hash_descriptor[idx] == NULL) { in hash_is_valid()
H A Dcrypt_cipher_is_valid.c15 int cipher_is_valid(int idx) in cipher_is_valid() argument
18 if (idx < 0 || idx >= TAB_SIZE || cipher_descriptor[idx] == NULL) { in cipher_is_valid()
H A Dcrypt_prng_is_valid.c15 int prng_is_valid(int idx) in prng_is_valid() argument
18 if (idx < 0 || idx >= TAB_SIZE || prng_descriptor[idx] == NULL) { in prng_is_valid()

123456