drivers/crypto/marvell/cesa/cesa.h
Source file repositories/reference/linux-study-clean/drivers/crypto/marvell/cesa/cesa.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/marvell/cesa/cesa.h- Extension
.h- Size
- 25591 bytes
- Lines
- 919
- Domain
- Driver Families
- Bucket
- drivers/crypto
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
crypto/internal/hash.hcrypto/internal/skcipher.hlinux/dma-direction.hlinux/dmapool.h
Detected Declarations
struct mv_cesa_sec_accel_descstruct mv_cesa_skcipher_op_ctxstruct mv_cesa_hash_op_ctxstruct mv_cesa_op_ctxstruct mv_cesa_tdma_descstruct mv_cesa_sg_dma_iterstruct mv_cesa_dma_iterstruct mv_cesa_tdma_chainstruct mv_cesa_enginestruct mv_cesa_capsstruct mv_cesa_dev_dmastruct mv_cesa_enginestruct mv_cesa_devstruct mv_cesa_req_opsstruct mv_cesa_ctxstruct mv_cesa_hash_ctxstruct mv_cesa_hmac_ctxstruct mv_cesa_reqstruct mv_cesa_sg_std_iterstruct mv_cesa_skcipher_std_reqstruct mv_cesa_skcipher_reqstruct mv_cesa_ahash_std_reqstruct mv_cesa_ahash_dma_reqstruct mv_cesa_ahash_reqenum mv_cesa_req_typefunction mv_cesa_engine_enqueue_complete_requestfunction mv_cesa_engine_dequeue_complete_requestfunction mv_cesa_req_get_typefunction mv_cesa_update_op_cfgfunction mv_cesa_get_op_cfgfunction mv_cesa_set_op_cfgfunction mv_cesa_adjust_opfunction mv_cesa_set_crypt_op_lenfunction mv_cesa_set_mac_op_total_lenfunction mv_cesa_set_mac_op_frag_lenfunction mv_cesa_set_int_maskfunction mv_cesa_get_int_maskfunction mv_cesa_mac_op_is_first_fragfunction mv_cesa_queue_reqfunction mv_cesa_req_dma_iter_initfunction mv_cesa_sg_dma_iter_initfunction mv_cesa_req_dma_iter_transfer_lenfunction mv_cesa_req_dma_iter_next_opfunction mv_cesa_dma_processfunction mv_cesa_tdma_desc_iter_initfunction mv_cesa_sg_copy_to_sramfunction mv_cesa_sg_copy_from_sram
Annotated Snippet
struct mv_cesa_sec_accel_desc {
__le32 config;
__le32 enc_p;
__le32 enc_len;
__le32 enc_key_p;
__le32 enc_iv;
__le32 mac_src_p;
__le32 mac_digest;
__le32 mac_iv;
};
/**
* struct mv_cesa_skcipher_op_ctx - cipher operation context
* @key: cipher key
* @iv: cipher IV
*
* Context associated to a cipher operation.
*/
struct mv_cesa_skcipher_op_ctx {
__le32 key[8];
u32 iv[4];
};
/**
* struct mv_cesa_hash_op_ctx - hash or hmac operation context
* @key: cipher key
* @iv: cipher IV
*
* Context associated to an hash or hmac operation.
*/
struct mv_cesa_hash_op_ctx {
u32 iv[16];
__le32 hash[8];
};
/**
* struct mv_cesa_op_ctx - crypto operation context
* @desc: CESA descriptor
* @ctx: context associated to the crypto operation
*
* Context associated to a crypto operation.
*/
struct mv_cesa_op_ctx {
struct mv_cesa_sec_accel_desc desc;
union {
struct mv_cesa_skcipher_op_ctx skcipher;
struct mv_cesa_hash_op_ctx hash;
} ctx;
};
/* TDMA descriptor flags */
#define CESA_TDMA_DST_IN_SRAM BIT(31)
#define CESA_TDMA_SRC_IN_SRAM BIT(30)
#define CESA_TDMA_END_OF_REQ BIT(29)
#define CESA_TDMA_BREAK_CHAIN BIT(28)
#define CESA_TDMA_SET_STATE BIT(27)
#define CESA_TDMA_TYPE_MSK GENMASK(26, 0)
#define CESA_TDMA_DUMMY 0
#define CESA_TDMA_DATA 1
#define CESA_TDMA_OP 2
#define CESA_TDMA_RESULT 3
/**
* struct mv_cesa_tdma_desc - TDMA descriptor
* @byte_cnt: number of bytes to transfer
* @src: DMA address of the source
* @dst: DMA address of the destination
* @next_dma: DMA address of the next TDMA descriptor
* @cur_dma: DMA address of this TDMA descriptor
* @next: pointer to the next TDMA descriptor
* @op: CESA operation attached to this TDMA descriptor
* @data: raw data attached to this TDMA descriptor
* @flags: flags describing the TDMA transfer. See the
* "TDMA descriptor flags" section above
*
* TDMA descriptor used to create a transfer chain describing a crypto
* operation.
*/
struct mv_cesa_tdma_desc {
__le32 byte_cnt;
union {
__le32 src;
u32 src_dma;
};
union {
__le32 dst;
u32 dst_dma;
};
__le32 next_dma;
Annotation
- Immediate include surface: `crypto/internal/hash.h`, `crypto/internal/skcipher.h`, `linux/dma-direction.h`, `linux/dmapool.h`.
- Detected declarations: `struct mv_cesa_sec_accel_desc`, `struct mv_cesa_skcipher_op_ctx`, `struct mv_cesa_hash_op_ctx`, `struct mv_cesa_op_ctx`, `struct mv_cesa_tdma_desc`, `struct mv_cesa_sg_dma_iter`, `struct mv_cesa_dma_iter`, `struct mv_cesa_tdma_chain`, `struct mv_cesa_engine`, `struct mv_cesa_caps`.
- Atlas domain: Driver Families / drivers/crypto.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.