Lines Matching refs:desc

214 	void *desc;  in ccp_hw_attach_queue()  local
218 desc = NULL; in ccp_hw_attach_queue()
259 error = bus_dmamem_alloc(qp->ring_desc_tag, &desc, in ccp_hw_attach_queue()
264 error = bus_dmamap_load(qp->ring_desc_tag, qp->ring_desc_map, desc, in ccp_hw_attach_queue()
269 qp->desc_ring = desc; in ccp_hw_attach_queue()
306 if (desc != NULL) in ccp_hw_attach_queue()
307 bus_dmamem_free(qp->ring_desc_tag, desc, in ccp_hw_attach_queue()
455 ccp_intr_handle_error(struct ccp_queue *qp, const struct ccp_desc *desc) in ccp_intr_handle_error() argument
490 idx = desc - qp->desc_ring; in ccp_intr_handle_error()
492 (const void *)desc, " "); in ccp_intr_handle_error()
542 const struct ccp_desc *desc; in ccp_intr_run_completions() local
591 desc = &qp->desc_ring[idx]; in ccp_intr_run_completions()
593 ccp_intr_handle_error(qp, desc); in ccp_intr_run_completions()
851 struct ccp_desc *desc; in ccp_passthrough() local
856 desc = &qp->desc_ring[qp->cq_tail]; in ccp_passthrough()
858 memset(desc, 0, sizeof(*desc)); in ccp_passthrough()
859 desc->engine = CCP_ENGINE_PASSTHRU; in ccp_passthrough()
861 desc->pt.ioc = interrupt; in ccp_passthrough()
862 desc->pt.byteswap = swapmode; in ccp_passthrough()
863 desc->pt.bitwise = bitmode; in ccp_passthrough()
864 desc->length = len; in ccp_passthrough()
866 desc->src_lo = (uint32_t)src; in ccp_passthrough()
867 desc->src_hi = src >> 32; in ccp_passthrough()
868 desc->src_mem = src_type; in ccp_passthrough()
870 desc->dst_lo = (uint32_t)dst; in ccp_passthrough()
871 desc->dst_hi = dst >> 32; in ccp_passthrough()
872 desc->dst_mem = dst_type; in ccp_passthrough()
875 desc->lsb_ctx_id = ccp_queue_lsb_entry(qp, LSB_ENTRY_KEY); in ccp_passthrough()
1041 struct ccp_desc *desc; in ccp_sha_single_desc() local
1046 desc = &qp->desc_ring[qp->cq_tail]; in ccp_sha_single_desc()
1048 memset(desc, 0, sizeof(*desc)); in ccp_sha_single_desc()
1049 desc->engine = CCP_ENGINE_SHA; in ccp_sha_single_desc()
1050 desc->som = start; in ccp_sha_single_desc()
1051 desc->eom = end; in ccp_sha_single_desc()
1053 desc->sha.type = defn->engine_type; in ccp_sha_single_desc()
1054 desc->length = len; in ccp_sha_single_desc()
1057 desc->sha_len_lo = (uint32_t)msgbits; in ccp_sha_single_desc()
1058 desc->sha_len_hi = msgbits >> 32; in ccp_sha_single_desc()
1061 desc->src_lo = (uint32_t)addr; in ccp_sha_single_desc()
1062 desc->src_hi = addr >> 32; in ccp_sha_single_desc()
1063 desc->src_mem = CCP_MEMTYPE_SYSTEM; in ccp_sha_single_desc()
1065 desc->lsb_ctx_id = ccp_queue_lsb_entry(qp, LSB_ENTRY_SHA); in ccp_sha_single_desc()
1398 struct ccp_desc *desc; in ccp_do_xts() local
1421 desc = &qp->desc_ring[qp->cq_tail]; in ccp_do_xts()
1422 desc->engine = CCP_ENGINE_XTS_AES; in ccp_do_xts()
1423 desc->som = (i == 0); in ccp_do_xts()
1424 desc->eom = (i == qp->cq_sg_ulptx->sg_nseg - 1); in ccp_do_xts()
1425 desc->ioc = (desc->eom && cctx != NULL); in ccp_do_xts()
1427 __func__, qp->cq_tail, (int)desc->som, (int)desc->eom, in ccp_do_xts()
1428 (int)desc->ioc, (int)dir); in ccp_do_xts()
1430 if (desc->ioc) in ccp_do_xts()
1434 desc->aes_xts.encrypt = dir; in ccp_do_xts()
1435 desc->aes_xts.type = s->blkcipher.cipher_type; in ccp_do_xts()
1436 desc->aes_xts.size = usize; in ccp_do_xts()
1439 qp->cq_tail, (unsigned)desc->aes_xts.type, in ccp_do_xts()
1440 (unsigned)desc->aes_xts.size); in ccp_do_xts()
1442 desc->length = seg->ss_len; in ccp_do_xts()
1443 desc->src_lo = (uint32_t)seg->ss_paddr; in ccp_do_xts()
1444 desc->src_hi = (seg->ss_paddr >> 32); in ccp_do_xts()
1445 desc->src_mem = CCP_MEMTYPE_SYSTEM; in ccp_do_xts()
1448 desc->dst_lo = desc->src_lo; in ccp_do_xts()
1449 desc->dst_hi = desc->src_hi; in ccp_do_xts()
1450 desc->dst_mem = desc->src_mem; in ccp_do_xts()
1452 desc->key_lo = ccp_queue_lsb_address(qp, LSB_ENTRY_KEY); in ccp_do_xts()
1453 desc->key_hi = 0; in ccp_do_xts()
1454 desc->key_mem = CCP_MEMTYPE_SB; in ccp_do_xts()
1456 desc->lsb_ctx_id = ccp_queue_lsb_entry(qp, LSB_ENTRY_IV); in ccp_do_xts()
1469 struct ccp_desc *desc; in ccp_do_blkcipher() local
1619 desc = &qp->desc_ring[qp->cq_tail]; in ccp_do_blkcipher()
1620 desc->engine = CCP_ENGINE_AES; in ccp_do_blkcipher()
1621 desc->som = (i == 0); in ccp_do_blkcipher()
1622 desc->eom = (i == qp->cq_sg_ulptx->sg_nseg - 1); in ccp_do_blkcipher()
1623 desc->ioc = (desc->eom && cctx != NULL); in ccp_do_blkcipher()
1625 __func__, qp->cq_tail, (int)desc->som, (int)desc->eom, in ccp_do_blkcipher()
1626 (int)desc->ioc, (int)dir); in ccp_do_blkcipher()
1628 if (desc->ioc) in ccp_do_blkcipher()
1632 desc->aes.encrypt = dir; in ccp_do_blkcipher()
1633 desc->aes.mode = s->blkcipher.cipher_mode; in ccp_do_blkcipher()
1634 desc->aes.type = s->blkcipher.cipher_type; in ccp_do_blkcipher()
1640 desc->aes.size = 127; in ccp_do_blkcipher()
1643 qp->cq_tail, (unsigned)desc->aes.mode, in ccp_do_blkcipher()
1644 (unsigned)desc->aes.type, (unsigned)desc->aes.size); in ccp_do_blkcipher()
1646 desc->length = seg->ss_len; in ccp_do_blkcipher()
1647 desc->src_lo = (uint32_t)seg->ss_paddr; in ccp_do_blkcipher()
1648 desc->src_hi = (seg->ss_paddr >> 32); in ccp_do_blkcipher()
1649 desc->src_mem = CCP_MEMTYPE_SYSTEM; in ccp_do_blkcipher()
1652 desc->dst_lo = desc->src_lo; in ccp_do_blkcipher()
1653 desc->dst_hi = desc->src_hi; in ccp_do_blkcipher()
1654 desc->dst_mem = desc->src_mem; in ccp_do_blkcipher()
1656 desc->key_lo = ccp_queue_lsb_address(qp, LSB_ENTRY_KEY); in ccp_do_blkcipher()
1657 desc->key_hi = 0; in ccp_do_blkcipher()
1658 desc->key_mem = CCP_MEMTYPE_SB; in ccp_do_blkcipher()
1660 desc->lsb_ctx_id = ccp_queue_lsb_entry(qp, LSB_ENTRY_IV); in ccp_do_blkcipher()
1722 struct ccp_desc *desc; in ccp_do_ghash_aad() local
1732 desc = &qp->desc_ring[qp->cq_tail]; in ccp_do_ghash_aad()
1734 desc->engine = CCP_ENGINE_AES; in ccp_do_ghash_aad()
1735 desc->aes.mode = CCP_AES_MODE_GHASH; in ccp_do_ghash_aad()
1736 desc->aes.type = s->blkcipher.cipher_type; in ccp_do_ghash_aad()
1737 desc->aes.encrypt = CCP_AES_MODE_GHASH_AAD; in ccp_do_ghash_aad()
1739 desc->som = (i == 0); in ccp_do_ghash_aad()
1740 desc->length = seg->ss_len; in ccp_do_ghash_aad()
1742 desc->src_lo = (uint32_t)seg->ss_paddr; in ccp_do_ghash_aad()
1743 desc->src_hi = (seg->ss_paddr >> 32); in ccp_do_ghash_aad()
1744 desc->src_mem = CCP_MEMTYPE_SYSTEM; in ccp_do_ghash_aad()
1746 desc->lsb_ctx_id = ccp_queue_lsb_entry(qp, LSB_ENTRY_IV); in ccp_do_ghash_aad()
1748 desc->key_lo = ccp_queue_lsb_address(qp, LSB_ENTRY_KEY); in ccp_do_ghash_aad()
1749 desc->key_mem = CCP_MEMTYPE_SB; in ccp_do_ghash_aad()
1761 struct ccp_desc *desc; in ccp_do_gctr() local
1766 desc = &qp->desc_ring[qp->cq_tail]; in ccp_do_gctr()
1768 desc->engine = CCP_ENGINE_AES; in ccp_do_gctr()
1769 desc->aes.mode = CCP_AES_MODE_GCTR; in ccp_do_gctr()
1770 desc->aes.type = s->blkcipher.cipher_type; in ccp_do_gctr()
1771 desc->aes.encrypt = dir; in ccp_do_gctr()
1772 desc->aes.size = 8 * (seg->ss_len % GMAC_BLOCK_LEN) - 1; in ccp_do_gctr()
1774 desc->som = som; in ccp_do_gctr()
1775 desc->eom = eom; in ccp_do_gctr()
1778 desc->length = roundup2(seg->ss_len, GMAC_BLOCK_LEN); in ccp_do_gctr()
1780 desc->dst_lo = desc->src_lo = (uint32_t)seg->ss_paddr; in ccp_do_gctr()
1781 desc->dst_hi = desc->src_hi = seg->ss_paddr >> 32; in ccp_do_gctr()
1782 desc->dst_mem = desc->src_mem = CCP_MEMTYPE_SYSTEM; in ccp_do_gctr()
1784 desc->lsb_ctx_id = ccp_queue_lsb_entry(qp, LSB_ENTRY_IV); in ccp_do_gctr()
1786 desc->key_lo = ccp_queue_lsb_address(qp, LSB_ENTRY_KEY); in ccp_do_gctr()
1787 desc->key_mem = CCP_MEMTYPE_SB; in ccp_do_gctr()
1797 struct ccp_desc *desc; in ccp_do_ghash_final() local
1802 desc = &qp->desc_ring[qp->cq_tail]; in ccp_do_ghash_final()
1804 desc->engine = CCP_ENGINE_AES; in ccp_do_ghash_final()
1805 desc->aes.mode = CCP_AES_MODE_GHASH; in ccp_do_ghash_final()
1806 desc->aes.type = s->blkcipher.cipher_type; in ccp_do_ghash_final()
1807 desc->aes.encrypt = CCP_AES_MODE_GHASH_FINAL; in ccp_do_ghash_final()
1809 desc->length = GMAC_BLOCK_LEN; in ccp_do_ghash_final()
1811 desc->src_lo = ccp_queue_lsb_address(qp, LSB_ENTRY_GHASH_IN); in ccp_do_ghash_final()
1812 desc->src_mem = CCP_MEMTYPE_SB; in ccp_do_ghash_final()
1814 desc->lsb_ctx_id = ccp_queue_lsb_entry(qp, LSB_ENTRY_IV); in ccp_do_ghash_final()
1816 desc->key_lo = ccp_queue_lsb_address(qp, LSB_ENTRY_KEY); in ccp_do_ghash_final()
1817 desc->key_mem = CCP_MEMTYPE_SB; in ccp_do_ghash_final()
1819 desc->dst_lo = ccp_queue_lsb_address(qp, LSB_ENTRY_GHASH); in ccp_do_ghash_final()
1820 desc->dst_mem = CCP_MEMTYPE_SB; in ccp_do_ghash_final()