Lines Matching defs:cid

386 static unsigned int get_ecc_op_nbword(enum stm32_pka_ecdsa_curve_id cid)
388 if (cid >= ARRAY_SIZE(curve_def)) {
389 ERROR("CID %u is out of boundaries\n", cid);
393 return OP_NBW_FROM_LEN(curve_def[cid].n_len);
396 static int stm32_pka_ecdsa_verif_configure_curve(uintptr_t base, enum stm32_pka_ecdsa_curve_id cid)
399 unsigned int eo_nbw = get_ecc_op_nbword(cid);
401 mmio_write_64(base + _PKA_RAM_N_LEN, curve_def[cid].n_len);
402 mmio_write_64(base + _PKA_RAM_P_LEN, curve_def[cid].p_len);
403 mmio_write_64(base + _PKA_RAM_A_SIGN, curve_def[cid].a_sign);
405 ret = write_eo_data(base + _PKA_RAM_A, curve_def[cid].a, curve_def[cid].a_size, eo_nbw);
411 curve_def[cid].n, div_round_up(curve_def[cid].n_len, UINT8_LEN),
417 ret = write_eo_data(base + _PKA_RAM_P, curve_def[cid].p,
418 div_round_up(curve_def[cid].p_len, UINT8_LEN), eo_nbw);
423 ret = write_eo_data(base + _PKA_RAM_XG, curve_def[cid].xg, curve_def[cid].xg_size, eo_nbw);
428 ret = write_eo_data(base + _PKA_RAM_YG, curve_def[cid].yg, curve_def[cid].yg_size, eo_nbw);
532 enum stm32_pka_ecdsa_curve_id cid)
537 curve_def[cid].p, div_round_up(curve_def[cid].p_len, UINT8_LEN))) {
544 curve_def[cid].p, div_round_up(curve_def[cid].p_len, UINT8_LEN))) {
552 curve_def[cid].n, div_round_up(curve_def[cid].n_len, UINT8_LEN)) &&
560 curve_def[cid].n, div_round_up(curve_def[cid].n_len, UINT8_LEN)) &&
614 enum stm32_pka_ecdsa_curve_id cid)
618 unsigned int eo_nbw = get_ecc_op_nbword(cid);
630 cid);
644 ret = stm32_pka_ecdsa_verif_configure_curve(base, cid);