Lines Matching refs:desc
16 static inline void aead_append_src_dst(u32 *desc, u32 msg_type) in aead_append_src_dst() argument
18 append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA | KEY_VLF); in aead_append_src_dst()
19 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_BOTH | in aead_append_src_dst()
24 static inline void append_dec_op1(u32 *desc, u32 type) in append_dec_op1() argument
30 append_operation(desc, type | OP_ALG_AS_INITFINAL | in append_dec_op1()
35 jump_cmd = append_jump(desc, JUMP_TEST_ALL | JUMP_COND_SHRD); in append_dec_op1()
36 append_operation(desc, type | OP_ALG_AS_INIT | OP_ALG_DECRYPT); in append_dec_op1()
37 uncond_jump_cmd = append_jump(desc, JUMP_TEST_ALL); in append_dec_op1()
38 set_jump_tgt_here(desc, jump_cmd); in append_dec_op1()
39 append_operation(desc, type | OP_ALG_AS_INIT | OP_ALG_DECRYPT | in append_dec_op1()
41 set_jump_tgt_here(desc, uncond_jump_cmd); in append_dec_op1()
56 void cnstr_shdsc_aead_null_encap(u32 * const desc, struct alginfo *adata, in cnstr_shdsc_aead_null_encap() argument
61 init_sh_desc(desc, HDR_SHARE_SERIAL); in cnstr_shdsc_aead_null_encap()
64 key_jump_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_aead_null_encap()
68 append_key_as_imm(desc, adata->key_virt, in cnstr_shdsc_aead_null_encap()
73 append_key(desc, adata->key_dma, adata->keylen, in cnstr_shdsc_aead_null_encap()
76 append_proto_dkp(desc, adata); in cnstr_shdsc_aead_null_encap()
78 set_jump_tgt_here(desc, key_jump_cmd); in cnstr_shdsc_aead_null_encap()
81 append_math_sub(desc, REG3, SEQINLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_aead_null_encap()
84 append_math_add(desc, VARSEQINLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_aead_null_encap()
85 append_math_add(desc, VARSEQOUTLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_aead_null_encap()
92 read_move_cmd = append_move(desc, MOVE_SRC_DESCBUF | in cnstr_shdsc_aead_null_encap()
95 write_move_cmd = append_move(desc, MOVE_SRC_MATH3 | in cnstr_shdsc_aead_null_encap()
101 append_operation(desc, adata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_aead_null_encap()
105 aead_append_src_dst(desc, FIFOLD_TYPE_MSG | FIFOLD_TYPE_FLUSH1); in cnstr_shdsc_aead_null_encap()
107 set_move_tgt_here(desc, read_move_cmd); in cnstr_shdsc_aead_null_encap()
108 set_move_tgt_here(desc, write_move_cmd); in cnstr_shdsc_aead_null_encap()
109 append_cmd(desc, CMD_LOAD | DISABLE_AUTO_INFO_FIFO); in cnstr_shdsc_aead_null_encap()
110 append_move(desc, MOVE_SRC_INFIFO_CL | MOVE_DEST_OUTFIFO | in cnstr_shdsc_aead_null_encap()
114 append_seq_store(desc, icvsize, LDST_CLASS_2_CCB | in cnstr_shdsc_aead_null_encap()
118 DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), in cnstr_shdsc_aead_null_encap()
135 void cnstr_shdsc_aead_null_decap(u32 * const desc, struct alginfo *adata, in cnstr_shdsc_aead_null_decap() argument
140 init_sh_desc(desc, HDR_SHARE_SERIAL); in cnstr_shdsc_aead_null_decap()
143 key_jump_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_aead_null_decap()
147 append_key_as_imm(desc, adata->key_virt, in cnstr_shdsc_aead_null_decap()
152 append_key(desc, adata->key_dma, adata->keylen, in cnstr_shdsc_aead_null_decap()
155 append_proto_dkp(desc, adata); in cnstr_shdsc_aead_null_decap()
157 set_jump_tgt_here(desc, key_jump_cmd); in cnstr_shdsc_aead_null_decap()
160 append_operation(desc, adata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_aead_null_decap()
164 append_math_sub(desc, REG2, SEQOUTLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_aead_null_decap()
167 append_math_add(desc, VARSEQINLEN, ZERO, REG2, CAAM_CMD_SZ); in cnstr_shdsc_aead_null_decap()
168 append_math_add(desc, VARSEQOUTLEN, ZERO, REG2, CAAM_CMD_SZ); in cnstr_shdsc_aead_null_decap()
175 read_move_cmd = append_move(desc, MOVE_SRC_DESCBUF | in cnstr_shdsc_aead_null_decap()
178 write_move_cmd = append_move(desc, MOVE_SRC_MATH2 | in cnstr_shdsc_aead_null_decap()
184 aead_append_src_dst(desc, FIFOLD_TYPE_MSG | FIFOLD_TYPE_FLUSH1); in cnstr_shdsc_aead_null_decap()
190 jump_cmd = append_jump(desc, JUMP_TEST_ALL); in cnstr_shdsc_aead_null_decap()
191 set_jump_tgt_here(desc, jump_cmd); in cnstr_shdsc_aead_null_decap()
193 set_move_tgt_here(desc, read_move_cmd); in cnstr_shdsc_aead_null_decap()
194 set_move_tgt_here(desc, write_move_cmd); in cnstr_shdsc_aead_null_decap()
195 append_cmd(desc, CMD_LOAD | DISABLE_AUTO_INFO_FIFO); in cnstr_shdsc_aead_null_decap()
196 append_move(desc, MOVE_SRC_INFIFO_CL | MOVE_DEST_OUTFIFO | in cnstr_shdsc_aead_null_decap()
198 append_cmd(desc, CMD_LOAD | ENABLE_AUTO_INFO_FIFO); in cnstr_shdsc_aead_null_decap()
201 append_seq_fifo_load(desc, icvsize, FIFOLD_CLASS_CLASS2 | in cnstr_shdsc_aead_null_decap()
205 DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), in cnstr_shdsc_aead_null_decap()
210 static void init_sh_desc_key_aead(u32 * const desc, in init_sh_desc_key_aead() argument
219 init_sh_desc(desc, HDR_SHARE_SERIAL | HDR_SAVECTX); in init_sh_desc_key_aead()
222 key_jump_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in init_sh_desc_key_aead()
235 append_key_as_imm(desc, adata->key_virt, in init_sh_desc_key_aead()
240 append_key(desc, adata->key_dma, adata->keylen, in init_sh_desc_key_aead()
243 append_proto_dkp(desc, adata); in init_sh_desc_key_aead()
247 append_key_as_imm(desc, cdata->key_virt, enckeylen, in init_sh_desc_key_aead()
250 append_key(desc, cdata->key_dma, enckeylen, CLASS_1 | in init_sh_desc_key_aead()
255 append_load_as_imm(desc, nonce, CTR_RFC3686_NONCE_SIZE, in init_sh_desc_key_aead()
258 append_move(desc, in init_sh_desc_key_aead()
265 set_jump_tgt_here(desc, key_jump_cmd); in init_sh_desc_key_aead()
288 void cnstr_shdsc_aead_encap(u32 * const desc, struct alginfo *cdata, in cnstr_shdsc_aead_encap() argument
295 init_sh_desc_key_aead(desc, cdata, adata, is_rfc3686, nonce, era); in cnstr_shdsc_aead_encap()
298 append_operation(desc, adata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_aead_encap()
305 append_seq_load(desc, 4, LDST_CLASS_DECO | in cnstr_shdsc_aead_encap()
309 wait_load_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_aead_encap()
313 set_jump_tgt_here(desc, wait_load_cmd); in cnstr_shdsc_aead_encap()
315 append_seq_load(desc, ivsize, LDST_CLASS_1_CCB | in cnstr_shdsc_aead_encap()
322 append_math_add(desc, VARSEQINLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_aead_encap()
323 append_math_add(desc, VARSEQOUTLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_aead_encap()
325 append_math_add(desc, VARSEQINLEN, ZERO, DPOVRD, CAAM_CMD_SZ); in cnstr_shdsc_aead_encap()
326 append_math_add(desc, VARSEQOUTLEN, ZERO, DPOVRD, CAAM_CMD_SZ); in cnstr_shdsc_aead_encap()
330 append_seq_fifo_store(desc, 0, FIFOST_TYPE_SKIP | FIFOLDST_VLF); in cnstr_shdsc_aead_encap()
333 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS2 | FIFOLD_TYPE_MSG | in cnstr_shdsc_aead_encap()
338 append_load_imm_be32(desc, 1, LDST_IMM | LDST_CLASS_1_CCB | in cnstr_shdsc_aead_encap()
344 append_operation(desc, cdata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_aead_encap()
348 append_math_add(desc, VARSEQINLEN, SEQINLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_aead_encap()
349 append_math_add(desc, VARSEQOUTLEN, SEQINLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_aead_encap()
350 aead_append_src_dst(desc, FIFOLD_TYPE_MSG1OUT2); in cnstr_shdsc_aead_encap()
353 append_seq_store(desc, icvsize, LDST_CLASS_2_CCB | in cnstr_shdsc_aead_encap()
357 DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), in cnstr_shdsc_aead_encap()
383 void cnstr_shdsc_aead_decap(u32 * const desc, struct alginfo *cdata, in cnstr_shdsc_aead_decap() argument
390 init_sh_desc_key_aead(desc, cdata, adata, is_rfc3686, nonce, era); in cnstr_shdsc_aead_decap()
393 append_operation(desc, adata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_aead_decap()
400 append_seq_load(desc, 4, LDST_CLASS_DECO | in cnstr_shdsc_aead_decap()
404 wait_load_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_aead_decap()
408 set_jump_tgt_here(desc, wait_load_cmd); in cnstr_shdsc_aead_decap()
411 append_seq_load(desc, ivsize, LDST_CLASS_1_CCB | in cnstr_shdsc_aead_decap()
418 append_math_add(desc, VARSEQINLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_aead_decap()
420 append_math_add_imm_u32(desc, VARSEQOUTLEN, REG3, IMM, in cnstr_shdsc_aead_decap()
423 append_math_add(desc, VARSEQOUTLEN, ZERO, REG3, in cnstr_shdsc_aead_decap()
426 append_math_add(desc, VARSEQINLEN, ZERO, DPOVRD, CAAM_CMD_SZ); in cnstr_shdsc_aead_decap()
428 append_math_add_imm_u32(desc, VARSEQOUTLEN, DPOVRD, IMM, in cnstr_shdsc_aead_decap()
431 append_math_add(desc, VARSEQOUTLEN, ZERO, DPOVRD, in cnstr_shdsc_aead_decap()
436 append_seq_fifo_store(desc, 0, FIFOST_TYPE_SKIP | FIFOLDST_VLF); in cnstr_shdsc_aead_decap()
439 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS2 | FIFOLD_TYPE_MSG | in cnstr_shdsc_aead_decap()
443 append_seq_load(desc, ivsize, LDST_CLASS_1_CCB | in cnstr_shdsc_aead_decap()
446 append_move(desc, MOVE_SRC_CLASS1CTX | MOVE_DEST_CLASS2INFIFO | in cnstr_shdsc_aead_decap()
452 append_load_imm_be32(desc, 1, LDST_IMM | LDST_CLASS_1_CCB | in cnstr_shdsc_aead_decap()
459 append_operation(desc, cdata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_aead_decap()
462 append_dec_op1(desc, cdata->algtype); in cnstr_shdsc_aead_decap()
465 append_math_add(desc, VARSEQINLEN, SEQOUTLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_aead_decap()
466 append_math_add(desc, VARSEQOUTLEN, SEQOUTLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_aead_decap()
467 aead_append_src_dst(desc, FIFOLD_TYPE_MSG); in cnstr_shdsc_aead_decap()
470 append_seq_fifo_load(desc, icvsize, FIFOLD_CLASS_CLASS2 | in cnstr_shdsc_aead_decap()
474 DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), in cnstr_shdsc_aead_decap()
500 void cnstr_shdsc_aead_givencap(u32 * const desc, struct alginfo *cdata, in cnstr_shdsc_aead_givencap() argument
510 init_sh_desc_key_aead(desc, cdata, adata, is_rfc3686, nonce, era); in cnstr_shdsc_aead_givencap()
516 append_seq_load(desc, 4, LDST_CLASS_DECO | in cnstr_shdsc_aead_givencap()
520 wait_load_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_aead_givencap()
524 set_jump_tgt_here(desc, wait_load_cmd); in cnstr_shdsc_aead_givencap()
529 append_seq_load(desc, ivsize, LDST_CLASS_1_CCB | in cnstr_shdsc_aead_givencap()
540 append_load_imm_u32(desc, geniv, LDST_CLASS_IND_CCB | in cnstr_shdsc_aead_givencap()
542 append_cmd(desc, CMD_LOAD | DISABLE_AUTO_INFO_FIFO); in cnstr_shdsc_aead_givencap()
543 append_move(desc, MOVE_WAITCOMP | in cnstr_shdsc_aead_givencap()
547 append_cmd(desc, CMD_LOAD | ENABLE_AUTO_INFO_FIFO); in cnstr_shdsc_aead_givencap()
551 append_move(desc, MOVE_SRC_CLASS1CTX | MOVE_DEST_OUTFIFO | in cnstr_shdsc_aead_givencap()
556 append_operation(desc, adata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_aead_givencap()
561 append_math_add(desc, VARSEQINLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_aead_givencap()
562 append_math_add(desc, VARSEQOUTLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_aead_givencap()
564 append_math_add(desc, VARSEQINLEN, ZERO, DPOVRD, CAAM_CMD_SZ); in cnstr_shdsc_aead_givencap()
565 append_math_add(desc, VARSEQOUTLEN, ZERO, DPOVRD, CAAM_CMD_SZ); in cnstr_shdsc_aead_givencap()
569 append_seq_fifo_store(desc, 0, FIFOST_TYPE_SKIP | FIFOLDST_VLF); in cnstr_shdsc_aead_givencap()
572 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS2 | FIFOLD_TYPE_MSG | in cnstr_shdsc_aead_givencap()
578 append_load_imm_u32(desc, moveiv, LDST_CLASS_IND_CCB | in cnstr_shdsc_aead_givencap()
580 append_load_imm_u32(desc, ivsize, LDST_CLASS_2_CCB | in cnstr_shdsc_aead_givencap()
585 append_load_imm_be32(desc, 1, LDST_IMM | LDST_CLASS_1_CCB | in cnstr_shdsc_aead_givencap()
591 append_operation(desc, cdata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_aead_givencap()
595 append_math_add(desc, VARSEQOUTLEN, SEQINLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_aead_givencap()
598 append_seq_fifo_load(desc, ivsize, in cnstr_shdsc_aead_givencap()
602 append_math_add(desc, VARSEQINLEN, SEQINLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_aead_givencap()
608 wait_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | JUMP_COND_NIFP); in cnstr_shdsc_aead_givencap()
609 set_jump_tgt_here(desc, wait_cmd); in cnstr_shdsc_aead_givencap()
611 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_BOTH | KEY_VLF | in cnstr_shdsc_aead_givencap()
613 append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA | KEY_VLF); in cnstr_shdsc_aead_givencap()
616 append_seq_store(desc, icvsize, LDST_CLASS_2_CCB | in cnstr_shdsc_aead_givencap()
620 DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), in cnstr_shdsc_aead_givencap()
634 void cnstr_shdsc_gcm_encap(u32 * const desc, struct alginfo *cdata, in cnstr_shdsc_gcm_encap() argument
641 init_sh_desc(desc, HDR_SHARE_SERIAL); in cnstr_shdsc_gcm_encap()
644 key_jump_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_gcm_encap()
647 append_key_as_imm(desc, cdata->key_virt, cdata->keylen, in cnstr_shdsc_gcm_encap()
650 append_key(desc, cdata->key_dma, cdata->keylen, CLASS_1 | in cnstr_shdsc_gcm_encap()
652 set_jump_tgt_here(desc, key_jump_cmd); in cnstr_shdsc_gcm_encap()
655 append_operation(desc, cdata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_gcm_encap()
662 append_seq_load(desc, 4, LDST_CLASS_DECO | in cnstr_shdsc_gcm_encap()
666 wait_load_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_gcm_encap()
670 set_jump_tgt_here(desc, wait_load_cmd); in cnstr_shdsc_gcm_encap()
672 append_math_sub_imm_u32(desc, VARSEQOUTLEN, SEQINLEN, IMM, in cnstr_shdsc_gcm_encap()
675 append_math_sub(desc, VARSEQOUTLEN, SEQINLEN, REG0, in cnstr_shdsc_gcm_encap()
680 zero_assoc_jump_cmd2 = append_jump(desc, JUMP_TEST_ALL | in cnstr_shdsc_gcm_encap()
684 append_seq_fifo_load(desc, ivsize, FIFOLD_CLASS_CLASS1 | in cnstr_shdsc_gcm_encap()
688 append_math_add(desc, VARSEQINLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_gcm_encap()
689 zero_assoc_jump_cmd1 = append_jump(desc, JUMP_TEST_ALL | in cnstr_shdsc_gcm_encap()
692 append_math_add(desc, VARSEQOUTLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_gcm_encap()
695 append_seq_fifo_store(desc, 0, FIFOST_TYPE_SKIP | FIFOLDST_VLF); in cnstr_shdsc_gcm_encap()
698 append_math_sub(desc, VARSEQOUTLEN, SEQINLEN, REG3, CAAM_CMD_SZ); in cnstr_shdsc_gcm_encap()
701 zero_payload_jump_cmd = append_jump(desc, JUMP_TEST_ALL | in cnstr_shdsc_gcm_encap()
705 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS1 | FIFOLDST_VLF | in cnstr_shdsc_gcm_encap()
707 set_jump_tgt_here(desc, zero_assoc_jump_cmd1); in cnstr_shdsc_gcm_encap()
709 append_math_sub(desc, VARSEQINLEN, SEQINLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_gcm_encap()
712 append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA | FIFOLDST_VLF); in cnstr_shdsc_gcm_encap()
715 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS1 | FIFOLDST_VLF | in cnstr_shdsc_gcm_encap()
720 append_jump(desc, JUMP_TEST_ALL | 4); in cnstr_shdsc_gcm_encap()
722 append_jump(desc, JUMP_TEST_ALL | 2); in cnstr_shdsc_gcm_encap()
725 set_jump_tgt_here(desc, zero_payload_jump_cmd); in cnstr_shdsc_gcm_encap()
728 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS1 | FIFOLDST_VLF | in cnstr_shdsc_gcm_encap()
732 append_jump(desc, JUMP_TEST_ALL | 2); in cnstr_shdsc_gcm_encap()
735 set_jump_tgt_here(desc, zero_assoc_jump_cmd2); in cnstr_shdsc_gcm_encap()
738 append_seq_fifo_load(desc, ivsize, FIFOLD_CLASS_CLASS1 | in cnstr_shdsc_gcm_encap()
743 append_seq_store(desc, icvsize, LDST_CLASS_1_CCB | in cnstr_shdsc_gcm_encap()
747 DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), in cnstr_shdsc_gcm_encap()
761 void cnstr_shdsc_gcm_decap(u32 * const desc, struct alginfo *cdata, in cnstr_shdsc_gcm_decap() argument
767 init_sh_desc(desc, HDR_SHARE_SERIAL); in cnstr_shdsc_gcm_decap()
770 key_jump_cmd = append_jump(desc, JUMP_JSL | in cnstr_shdsc_gcm_decap()
773 append_key_as_imm(desc, cdata->key_virt, cdata->keylen, in cnstr_shdsc_gcm_decap()
776 append_key(desc, cdata->key_dma, cdata->keylen, CLASS_1 | in cnstr_shdsc_gcm_decap()
778 set_jump_tgt_here(desc, key_jump_cmd); in cnstr_shdsc_gcm_decap()
781 append_operation(desc, cdata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_gcm_decap()
788 append_seq_load(desc, 4, LDST_CLASS_DECO | in cnstr_shdsc_gcm_decap()
792 wait_load_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_gcm_decap()
796 set_jump_tgt_here(desc, wait_load_cmd); in cnstr_shdsc_gcm_decap()
798 append_seq_fifo_load(desc, ivsize, FIFOLD_CLASS_CLASS1 | in cnstr_shdsc_gcm_decap()
803 append_math_add(desc, VARSEQINLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_gcm_decap()
804 zero_assoc_jump_cmd1 = append_jump(desc, JUMP_TEST_ALL | in cnstr_shdsc_gcm_decap()
807 append_math_add(desc, VARSEQOUTLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_gcm_decap()
810 append_seq_fifo_store(desc, 0, FIFOST_TYPE_SKIP | FIFOLDST_VLF); in cnstr_shdsc_gcm_decap()
813 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS1 | FIFOLDST_VLF | in cnstr_shdsc_gcm_decap()
816 set_jump_tgt_here(desc, zero_assoc_jump_cmd1); in cnstr_shdsc_gcm_decap()
819 append_math_sub(desc, VARSEQINLEN, SEQOUTLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_gcm_decap()
822 zero_payload_jump_cmd = append_jump(desc, JUMP_TEST_ALL | in cnstr_shdsc_gcm_decap()
825 append_math_sub(desc, VARSEQOUTLEN, SEQOUTLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_gcm_decap()
828 append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA | FIFOLDST_VLF); in cnstr_shdsc_gcm_decap()
831 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS1 | FIFOLDST_VLF | in cnstr_shdsc_gcm_decap()
835 set_jump_tgt_here(desc, zero_payload_jump_cmd); in cnstr_shdsc_gcm_decap()
838 append_seq_fifo_load(desc, icvsize, FIFOLD_CLASS_CLASS1 | in cnstr_shdsc_gcm_decap()
842 DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), in cnstr_shdsc_gcm_decap()
861 void cnstr_shdsc_rfc4106_encap(u32 * const desc, struct alginfo *cdata, in cnstr_shdsc_rfc4106_encap() argument
866 init_sh_desc(desc, HDR_SHARE_SERIAL); in cnstr_shdsc_rfc4106_encap()
869 key_jump_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_rfc4106_encap()
872 append_key_as_imm(desc, cdata->key_virt, cdata->keylen, in cnstr_shdsc_rfc4106_encap()
875 append_key(desc, cdata->key_dma, cdata->keylen, CLASS_1 | in cnstr_shdsc_rfc4106_encap()
877 set_jump_tgt_here(desc, key_jump_cmd); in cnstr_shdsc_rfc4106_encap()
880 append_operation(desc, cdata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_rfc4106_encap()
887 append_seq_load(desc, 4, LDST_CLASS_DECO | in cnstr_shdsc_rfc4106_encap()
891 wait_load_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_rfc4106_encap()
895 set_jump_tgt_here(desc, wait_load_cmd); in cnstr_shdsc_rfc4106_encap()
898 append_fifo_load_as_imm(desc, (void *)(cdata->key_virt + in cnstr_shdsc_rfc4106_encap()
901 append_seq_fifo_load(desc, ivsize, FIFOLD_CLASS_CLASS1 | in cnstr_shdsc_rfc4106_encap()
905 append_math_sub_imm_u32(desc, VARSEQINLEN, REG3, IMM, ivsize); in cnstr_shdsc_rfc4106_encap()
906 append_math_add(desc, VARSEQOUTLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_rfc4106_encap()
909 append_seq_fifo_store(desc, 0, FIFOST_TYPE_SKIP | FIFOLDST_VLF); in cnstr_shdsc_rfc4106_encap()
912 append_math_sub(desc, VARSEQOUTLEN, SEQINLEN, REG3, CAAM_CMD_SZ); in cnstr_shdsc_rfc4106_encap()
915 zero_cryptlen_jump_cmd = append_jump(desc, JUMP_TEST_ALL | in cnstr_shdsc_rfc4106_encap()
919 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS1 | FIFOLDST_VLF | in cnstr_shdsc_rfc4106_encap()
923 append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA); in cnstr_shdsc_rfc4106_encap()
926 append_seq_fifo_load(desc, ivsize, FIFOLD_CLASS_SKIP); in cnstr_shdsc_rfc4106_encap()
927 append_math_add(desc, VARSEQINLEN, VARSEQOUTLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_rfc4106_encap()
930 append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA | FIFOLDST_VLF); in cnstr_shdsc_rfc4106_encap()
933 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS1 | FIFOLDST_VLF | in cnstr_shdsc_rfc4106_encap()
937 skip_instructions = append_jump(desc, JUMP_TEST_ALL); in cnstr_shdsc_rfc4106_encap()
940 set_jump_tgt_here(desc, zero_cryptlen_jump_cmd); in cnstr_shdsc_rfc4106_encap()
943 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS1 | FIFOLDST_VLF | in cnstr_shdsc_rfc4106_encap()
946 set_jump_tgt_here(desc, skip_instructions); in cnstr_shdsc_rfc4106_encap()
949 append_seq_store(desc, icvsize, LDST_CLASS_1_CCB | in cnstr_shdsc_rfc4106_encap()
953 DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), in cnstr_shdsc_rfc4106_encap()
968 void cnstr_shdsc_rfc4106_decap(u32 * const desc, struct alginfo *cdata, in cnstr_shdsc_rfc4106_decap() argument
974 init_sh_desc(desc, HDR_SHARE_SERIAL); in cnstr_shdsc_rfc4106_decap()
977 key_jump_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_rfc4106_decap()
980 append_key_as_imm(desc, cdata->key_virt, cdata->keylen, in cnstr_shdsc_rfc4106_decap()
984 append_key(desc, cdata->key_dma, cdata->keylen, CLASS_1 | in cnstr_shdsc_rfc4106_decap()
986 set_jump_tgt_here(desc, key_jump_cmd); in cnstr_shdsc_rfc4106_decap()
989 append_operation(desc, cdata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_rfc4106_decap()
996 append_seq_load(desc, 4, LDST_CLASS_DECO | in cnstr_shdsc_rfc4106_decap()
1000 wait_load_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_rfc4106_decap()
1004 set_jump_tgt_here(desc, wait_load_cmd); in cnstr_shdsc_rfc4106_decap()
1007 append_fifo_load_as_imm(desc, (void *)(cdata->key_virt + in cnstr_shdsc_rfc4106_decap()
1010 append_seq_fifo_load(desc, ivsize, FIFOLD_CLASS_CLASS1 | in cnstr_shdsc_rfc4106_decap()
1014 append_math_sub_imm_u32(desc, VARSEQINLEN, REG3, IMM, ivsize); in cnstr_shdsc_rfc4106_decap()
1015 append_math_add(desc, VARSEQOUTLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_rfc4106_decap()
1018 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS1 | FIFOLDST_VLF | in cnstr_shdsc_rfc4106_decap()
1022 append_seq_fifo_load(desc, ivsize, FIFOLD_CLASS_SKIP); in cnstr_shdsc_rfc4106_decap()
1025 append_math_sub(desc, VARSEQINLEN, SEQOUTLEN, REG3, CAAM_CMD_SZ); in cnstr_shdsc_rfc4106_decap()
1028 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS1 | FIFOLD_TYPE_MSG); in cnstr_shdsc_rfc4106_decap()
1031 append_seq_fifo_store(desc, 0, FIFOST_TYPE_SKIP | FIFOLDST_VLF); in cnstr_shdsc_rfc4106_decap()
1034 append_math_sub(desc, VARSEQOUTLEN, SEQOUTLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_rfc4106_decap()
1037 append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA | FIFOLDST_VLF); in cnstr_shdsc_rfc4106_decap()
1040 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS1 | FIFOLDST_VLF | in cnstr_shdsc_rfc4106_decap()
1044 append_seq_fifo_load(desc, icvsize, FIFOLD_CLASS_CLASS1 | in cnstr_shdsc_rfc4106_decap()
1048 DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), in cnstr_shdsc_rfc4106_decap()
1063 void cnstr_shdsc_rfc4543_encap(u32 * const desc, struct alginfo *cdata, in cnstr_shdsc_rfc4543_encap() argument
1069 init_sh_desc(desc, HDR_SHARE_SERIAL); in cnstr_shdsc_rfc4543_encap()
1072 key_jump_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_rfc4543_encap()
1075 append_key_as_imm(desc, cdata->key_virt, cdata->keylen, in cnstr_shdsc_rfc4543_encap()
1078 append_key(desc, cdata->key_dma, cdata->keylen, CLASS_1 | in cnstr_shdsc_rfc4543_encap()
1080 set_jump_tgt_here(desc, key_jump_cmd); in cnstr_shdsc_rfc4543_encap()
1083 append_operation(desc, cdata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_rfc4543_encap()
1088 append_seq_fifo_load(desc, 4, FIFOLD_CLASS_SKIP); in cnstr_shdsc_rfc4543_encap()
1091 append_fifo_load_as_imm(desc, (void *)(cdata->key_virt + in cnstr_shdsc_rfc4543_encap()
1094 append_seq_fifo_load(desc, ivsize, FIFOLD_CLASS_CLASS1 | in cnstr_shdsc_rfc4543_encap()
1099 append_math_sub(desc, REG3, SEQINLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_rfc4543_encap()
1106 read_move_cmd = append_move(desc, MOVE_SRC_DESCBUF | MOVE_DEST_MATH3 | in cnstr_shdsc_rfc4543_encap()
1108 write_move_cmd = append_move(desc, MOVE_SRC_MATH3 | MOVE_DEST_DESCBUF | in cnstr_shdsc_rfc4543_encap()
1112 append_math_sub(desc, VARSEQINLEN, SEQINLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_rfc4543_encap()
1115 append_math_sub(desc, VARSEQOUTLEN, SEQINLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_rfc4543_encap()
1118 aead_append_src_dst(desc, FIFOLD_TYPE_AAD); in cnstr_shdsc_rfc4543_encap()
1120 set_move_tgt_here(desc, read_move_cmd); in cnstr_shdsc_rfc4543_encap()
1121 set_move_tgt_here(desc, write_move_cmd); in cnstr_shdsc_rfc4543_encap()
1122 append_cmd(desc, CMD_LOAD | DISABLE_AUTO_INFO_FIFO); in cnstr_shdsc_rfc4543_encap()
1124 append_move(desc, MOVE_SRC_INFIFO_CL | MOVE_DEST_OUTFIFO); in cnstr_shdsc_rfc4543_encap()
1127 append_seq_store(desc, icvsize, LDST_CLASS_1_CCB | in cnstr_shdsc_rfc4543_encap()
1131 DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), in cnstr_shdsc_rfc4543_encap()
1146 void cnstr_shdsc_rfc4543_decap(u32 * const desc, struct alginfo *cdata, in cnstr_shdsc_rfc4543_decap() argument
1152 init_sh_desc(desc, HDR_SHARE_SERIAL); in cnstr_shdsc_rfc4543_decap()
1155 key_jump_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_rfc4543_decap()
1158 append_key_as_imm(desc, cdata->key_virt, cdata->keylen, in cnstr_shdsc_rfc4543_decap()
1161 append_key(desc, cdata->key_dma, cdata->keylen, CLASS_1 | in cnstr_shdsc_rfc4543_decap()
1163 set_jump_tgt_here(desc, key_jump_cmd); in cnstr_shdsc_rfc4543_decap()
1166 append_operation(desc, cdata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_rfc4543_decap()
1171 append_seq_fifo_load(desc, 4, FIFOLD_CLASS_SKIP); in cnstr_shdsc_rfc4543_decap()
1174 append_fifo_load_as_imm(desc, (void *)(cdata->key_virt + in cnstr_shdsc_rfc4543_decap()
1177 append_seq_fifo_load(desc, ivsize, FIFOLD_CLASS_CLASS1 | in cnstr_shdsc_rfc4543_decap()
1182 append_math_sub(desc, REG3, SEQOUTLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_rfc4543_decap()
1189 read_move_cmd = append_move(desc, MOVE_SRC_DESCBUF | MOVE_DEST_MATH3 | in cnstr_shdsc_rfc4543_decap()
1191 write_move_cmd = append_move(desc, MOVE_SRC_MATH3 | MOVE_DEST_DESCBUF | in cnstr_shdsc_rfc4543_decap()
1195 append_math_sub(desc, VARSEQINLEN, SEQOUTLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_rfc4543_decap()
1198 append_math_sub(desc, VARSEQOUTLEN, SEQOUTLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_rfc4543_decap()
1201 append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA | FIFOLDST_VLF); in cnstr_shdsc_rfc4543_decap()
1204 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_BOTH | FIFOLDST_VLF | in cnstr_shdsc_rfc4543_decap()
1207 set_move_tgt_here(desc, read_move_cmd); in cnstr_shdsc_rfc4543_decap()
1208 set_move_tgt_here(desc, write_move_cmd); in cnstr_shdsc_rfc4543_decap()
1209 append_cmd(desc, CMD_LOAD | DISABLE_AUTO_INFO_FIFO); in cnstr_shdsc_rfc4543_decap()
1211 append_move(desc, MOVE_SRC_INFIFO_CL | MOVE_DEST_OUTFIFO); in cnstr_shdsc_rfc4543_decap()
1212 append_cmd(desc, CMD_LOAD | ENABLE_AUTO_INFO_FIFO); in cnstr_shdsc_rfc4543_decap()
1215 append_seq_fifo_load(desc, icvsize, FIFOLD_CLASS_CLASS1 | in cnstr_shdsc_rfc4543_decap()
1219 DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), in cnstr_shdsc_rfc4543_decap()
1240 void cnstr_shdsc_chachapoly(u32 * const desc, struct alginfo *cdata, in cnstr_shdsc_chachapoly() argument
1250 init_sh_desc(desc, HDR_SHARE_SERIAL | HDR_SAVECTX); in cnstr_shdsc_chachapoly()
1253 key_jump_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_chachapoly()
1256 append_key_as_imm(desc, cdata->key_virt, cdata->keylen, cdata->keylen, in cnstr_shdsc_chachapoly()
1261 append_load_as_imm(desc, cdata->key_virt + cdata->keylen, 4, in cnstr_shdsc_chachapoly()
1265 set_jump_tgt_here(desc, key_jump_cmd); in cnstr_shdsc_chachapoly()
1269 append_operation(desc, adata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_chachapoly()
1271 append_operation(desc, cdata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_chachapoly()
1274 append_operation(desc, adata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_chachapoly()
1276 append_operation(desc, cdata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_chachapoly()
1285 append_seq_load(desc, 4, LDST_CLASS_DECO | in cnstr_shdsc_chachapoly()
1289 wait_load_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_chachapoly()
1293 set_jump_tgt_here(desc, wait_load_cmd); in cnstr_shdsc_chachapoly()
1295 append_seq_load(desc, ivsize, LDST_CLASS_1_CCB | in cnstr_shdsc_chachapoly()
1308 append_load_imm_u32(desc, nfifo, LDST_CLASS_IND_CCB | in cnstr_shdsc_chachapoly()
1311 append_math_add(desc, VARSEQINLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_chachapoly()
1312 append_math_add(desc, VARSEQOUTLEN, ZERO, REG3, CAAM_CMD_SZ); in cnstr_shdsc_chachapoly()
1313 append_seq_fifo_load(desc, 0, FIFOLD_TYPE_NOINFOFIFO | in cnstr_shdsc_chachapoly()
1315 append_move_len(desc, MOVE_AUX_LS | MOVE_SRC_AUX_ABLK | in cnstr_shdsc_chachapoly()
1317 append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA | LDST_VLF); in cnstr_shdsc_chachapoly()
1321 append_seq_fifo_store(desc, ivsize, FIFOST_TYPE_METADATA | in cnstr_shdsc_chachapoly()
1324 wait_cmd = append_jump(desc, JUMP_JSL | JUMP_TYPE_LOCAL | in cnstr_shdsc_chachapoly()
1326 set_jump_tgt_here(desc, wait_cmd); in cnstr_shdsc_chachapoly()
1330 append_math_add(desc, VARSEQINLEN, SEQINLEN, REG0, CAAM_CMD_SZ); in cnstr_shdsc_chachapoly()
1331 append_math_add(desc, VARSEQOUTLEN, SEQINLEN, REG0, in cnstr_shdsc_chachapoly()
1333 aead_append_src_dst(desc, FIFOLD_TYPE_MSG1OUT2); in cnstr_shdsc_chachapoly()
1336 append_seq_store(desc, icvsize, LDST_CLASS_2_CCB | in cnstr_shdsc_chachapoly()
1340 append_math_add(desc, VARSEQINLEN, SEQOUTLEN, REG0, in cnstr_shdsc_chachapoly()
1342 append_math_add(desc, VARSEQOUTLEN, SEQOUTLEN, REG0, in cnstr_shdsc_chachapoly()
1344 aead_append_src_dst(desc, FIFOLD_TYPE_MSG); in cnstr_shdsc_chachapoly()
1347 append_seq_fifo_load(desc, icvsize, FIFOLD_CLASS_CLASS2 | in cnstr_shdsc_chachapoly()
1352 DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), in cnstr_shdsc_chachapoly()
1358 static inline void skcipher_append_src_dst(u32 *desc) in skcipher_append_src_dst() argument
1360 append_math_add(desc, VARSEQOUTLEN, SEQINLEN, REG0, CAAM_CMD_SZ); in skcipher_append_src_dst()
1361 append_math_add(desc, VARSEQINLEN, SEQINLEN, REG0, CAAM_CMD_SZ); in skcipher_append_src_dst()
1362 append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS1 | in skcipher_append_src_dst()
1364 append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA | KEY_VLF); in skcipher_append_src_dst()
1378 void cnstr_shdsc_skcipher_encap(u32 * const desc, struct alginfo *cdata, in cnstr_shdsc_skcipher_encap() argument
1387 init_sh_desc(desc, HDR_SHARE_SERIAL | HDR_SAVECTX); in cnstr_shdsc_skcipher_encap()
1389 key_jump_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_skcipher_encap()
1393 append_key_as_imm(desc, cdata->key_virt, cdata->keylen, in cnstr_shdsc_skcipher_encap()
1400 append_load_as_imm(desc, nonce, CTR_RFC3686_NONCE_SIZE, in cnstr_shdsc_skcipher_encap()
1403 append_move(desc, MOVE_WAITCOMP | MOVE_SRC_OUTFIFO | in cnstr_shdsc_skcipher_encap()
1408 set_jump_tgt_here(desc, key_jump_cmd); in cnstr_shdsc_skcipher_encap()
1412 append_seq_load(desc, ivsize, LDST_SRCDST_BYTE_CONTEXT | in cnstr_shdsc_skcipher_encap()
1418 append_load_imm_be32(desc, 1, LDST_IMM | LDST_CLASS_1_CCB | in cnstr_shdsc_skcipher_encap()
1426 append_operation(desc, options); in cnstr_shdsc_skcipher_encap()
1429 skcipher_append_src_dst(desc); in cnstr_shdsc_skcipher_encap()
1433 append_seq_store(desc, ivsize, LDST_SRCDST_BYTE_CONTEXT | in cnstr_shdsc_skcipher_encap()
1438 DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), in cnstr_shdsc_skcipher_encap()
1454 void cnstr_shdsc_skcipher_decap(u32 * const desc, struct alginfo *cdata, in cnstr_shdsc_skcipher_decap() argument
1462 init_sh_desc(desc, HDR_SHARE_SERIAL | HDR_SAVECTX); in cnstr_shdsc_skcipher_decap()
1464 key_jump_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_skcipher_decap()
1468 append_key_as_imm(desc, cdata->key_virt, cdata->keylen, in cnstr_shdsc_skcipher_decap()
1475 append_load_as_imm(desc, nonce, CTR_RFC3686_NONCE_SIZE, in cnstr_shdsc_skcipher_decap()
1478 append_move(desc, MOVE_WAITCOMP | MOVE_SRC_OUTFIFO | in cnstr_shdsc_skcipher_decap()
1483 set_jump_tgt_here(desc, key_jump_cmd); in cnstr_shdsc_skcipher_decap()
1487 append_seq_load(desc, ivsize, LDST_SRCDST_BYTE_CONTEXT | in cnstr_shdsc_skcipher_decap()
1493 append_load_imm_be32(desc, 1, LDST_IMM | LDST_CLASS_1_CCB | in cnstr_shdsc_skcipher_decap()
1500 append_operation(desc, cdata->algtype | OP_ALG_AS_INIT | in cnstr_shdsc_skcipher_decap()
1503 append_dec_op1(desc, cdata->algtype); in cnstr_shdsc_skcipher_decap()
1506 skcipher_append_src_dst(desc); in cnstr_shdsc_skcipher_decap()
1510 append_seq_store(desc, ivsize, LDST_SRCDST_BYTE_CONTEXT | in cnstr_shdsc_skcipher_decap()
1515 DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), in cnstr_shdsc_skcipher_decap()
1526 void cnstr_shdsc_xts_skcipher_encap(u32 * const desc, struct alginfo *cdata) in cnstr_shdsc_xts_skcipher_encap() argument
1537 init_sh_desc(desc, HDR_SHARE_SERIAL | HDR_SAVECTX); in cnstr_shdsc_xts_skcipher_encap()
1539 key_jump_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_xts_skcipher_encap()
1543 append_key_as_imm(desc, cdata->key_virt, cdata->keylen, in cnstr_shdsc_xts_skcipher_encap()
1547 append_load_as_imm(desc, (void *)§or_size, 8, LDST_CLASS_1_CCB | in cnstr_shdsc_xts_skcipher_encap()
1551 set_jump_tgt_here(desc, key_jump_cmd); in cnstr_shdsc_xts_skcipher_encap()
1558 append_seq_load(desc, 8, LDST_SRCDST_BYTE_CONTEXT | LDST_CLASS_1_CCB | in cnstr_shdsc_xts_skcipher_encap()
1560 append_seq_load(desc, 8, LDST_SRCDST_BYTE_CONTEXT | LDST_CLASS_1_CCB | in cnstr_shdsc_xts_skcipher_encap()
1564 append_operation(desc, cdata->algtype | OP_ALG_AS_INITFINAL | in cnstr_shdsc_xts_skcipher_encap()
1568 skcipher_append_src_dst(desc); in cnstr_shdsc_xts_skcipher_encap()
1571 append_seq_store(desc, 8, LDST_SRCDST_BYTE_CONTEXT | LDST_CLASS_1_CCB | in cnstr_shdsc_xts_skcipher_encap()
1573 append_seq_store(desc, 8, LDST_SRCDST_BYTE_CONTEXT | LDST_CLASS_1_CCB | in cnstr_shdsc_xts_skcipher_encap()
1578 desc, desc_bytes(desc), 1); in cnstr_shdsc_xts_skcipher_encap()
1588 void cnstr_shdsc_xts_skcipher_decap(u32 * const desc, struct alginfo *cdata) in cnstr_shdsc_xts_skcipher_decap() argument
1599 init_sh_desc(desc, HDR_SHARE_SERIAL | HDR_SAVECTX); in cnstr_shdsc_xts_skcipher_decap()
1601 key_jump_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | in cnstr_shdsc_xts_skcipher_decap()
1605 append_key_as_imm(desc, cdata->key_virt, cdata->keylen, in cnstr_shdsc_xts_skcipher_decap()
1609 append_load_as_imm(desc, (void *)§or_size, 8, LDST_CLASS_1_CCB | in cnstr_shdsc_xts_skcipher_decap()
1613 set_jump_tgt_here(desc, key_jump_cmd); in cnstr_shdsc_xts_skcipher_decap()
1620 append_seq_load(desc, 8, LDST_SRCDST_BYTE_CONTEXT | LDST_CLASS_1_CCB | in cnstr_shdsc_xts_skcipher_decap()
1622 append_seq_load(desc, 8, LDST_SRCDST_BYTE_CONTEXT | LDST_CLASS_1_CCB | in cnstr_shdsc_xts_skcipher_decap()
1625 append_dec_op1(desc, cdata->algtype); in cnstr_shdsc_xts_skcipher_decap()
1628 skcipher_append_src_dst(desc); in cnstr_shdsc_xts_skcipher_decap()
1631 append_seq_store(desc, 8, LDST_SRCDST_BYTE_CONTEXT | LDST_CLASS_1_CCB | in cnstr_shdsc_xts_skcipher_decap()
1633 append_seq_store(desc, 8, LDST_SRCDST_BYTE_CONTEXT | LDST_CLASS_1_CCB | in cnstr_shdsc_xts_skcipher_decap()
1637 ": ", DUMP_PREFIX_ADDRESS, 16, 4, desc, in cnstr_shdsc_xts_skcipher_decap()
1638 desc_bytes(desc), 1); in cnstr_shdsc_xts_skcipher_decap()