drivers/crypto/sa2ul.h
Source file repositories/reference/linux-study-clean/drivers/crypto/sa2ul.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/sa2ul.h- Extension
.h- Size
- 12240 bytes
- Lines
- 408
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
crypto/aes.hcrypto/sha1.hcrypto/sha2.h
Detected Declarations
struct sa_tfm_ctxstruct sa_match_datastruct sa_crypto_datastruct sa_cmdl_param_infostruct sa_cmdl_upd_infostruct sa_ctx_infostruct sa_tfm_ctxstruct sa_sha_req_ctxstruct sa_eng_infoenum sa_submodeenum sa_ealg_idenum sa_aalg_idenum sa_eng_algo_id
Annotated Snippet
struct sa_crypto_data {
void __iomem *base;
const struct sa_match_data *match_data;
struct platform_device *pdev;
struct dma_pool *sc_pool;
struct device *dev;
spinlock_t scid_lock; /* lock for SC-ID allocation */
/* Security context data */
u16 sc_id_start;
u16 sc_id_end;
u16 sc_id;
unsigned long ctx_bm[DIV_ROUND_UP(SA_MAX_NUM_CTX,
BITS_PER_LONG)];
struct sa_tfm_ctx *ctx;
struct dma_chan *dma_rx1;
struct dma_chan *dma_rx2;
struct dma_chan *dma_tx;
};
/**
* struct sa_cmdl_param_info: Command label parameters info
* @index: Index of the parameter in the command label format
* @offset: the offset of the parameter
* @size: Size of the parameter
*/
struct sa_cmdl_param_info {
u16 index;
u16 offset;
u16 size;
};
/* Maximum length of Auxiliary data in 32bit words */
#define SA_MAX_AUX_DATA_WORDS 8
/**
* struct sa_cmdl_upd_info: Command label updation info
* @flags: flags in command label
* @submode: Encryption submodes
* @enc_size: Size of first pass encryption size
* @enc_size2: Size of second pass encryption size
* @enc_offset: Encryption payload offset in the packet
* @enc_iv: Encryption initialization vector for pass2
* @enc_iv2: Encryption initialization vector for pass2
* @aad: Associated data
* @payload: Payload info
* @auth_size: Authentication size for pass 1
* @auth_size2: Authentication size for pass 2
* @auth_offset: Authentication payload offset
* @auth_iv: Authentication initialization vector
* @aux_key_info: Authentication aux key information
* @aux_key: Aux key for authentication
*/
struct sa_cmdl_upd_info {
u16 flags;
u16 submode;
struct sa_cmdl_param_info enc_size;
struct sa_cmdl_param_info enc_size2;
struct sa_cmdl_param_info enc_offset;
struct sa_cmdl_param_info enc_iv;
struct sa_cmdl_param_info enc_iv2;
struct sa_cmdl_param_info aad;
struct sa_cmdl_param_info payload;
struct sa_cmdl_param_info auth_size;
struct sa_cmdl_param_info auth_size2;
struct sa_cmdl_param_info auth_offset;
struct sa_cmdl_param_info auth_iv;
struct sa_cmdl_param_info aux_key_info;
u32 aux_key[SA_MAX_AUX_DATA_WORDS];
};
/*
* Number of 32bit words appended after the command label
* in PSDATA to identify the crypto request context.
* word-0: Request type
* word-1: pointer to request
*/
#define SA_PSDATA_CTX_WORDS 4
/* Maximum size of Command label in 32 words */
#define SA_MAX_CMDL_WORDS (SA_DMA_NUM_PS_WORDS - SA_PSDATA_CTX_WORDS)
/**
* struct sa_ctx_info: SA context information
* @sc: Pointer to security context
* @sc_phys: Security context physical address that is passed on to SA2UL
* @sc_id: Security context ID
* @cmdl_size: Command label size
* @cmdl: Command label for a particular iteration
* @cmdl_upd_info: structure holding command label updation info
* @epib: Extended protocol information block words
Annotation
- Immediate include surface: `crypto/aes.h`, `crypto/sha1.h`, `crypto/sha2.h`.
- Detected declarations: `struct sa_tfm_ctx`, `struct sa_match_data`, `struct sa_crypto_data`, `struct sa_cmdl_param_info`, `struct sa_cmdl_upd_info`, `struct sa_ctx_info`, `struct sa_tfm_ctx`, `struct sa_sha_req_ctx`, `struct sa_eng_info`, `enum sa_submode`.
- Atlas domain: Driver Families / drivers/crypto.
- Implementation status: source implementation candidate.
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.