drivers/crypto/tegra/tegra-se.h
Source file repositories/reference/linux-study-clean/drivers/crypto/tegra/tegra-se.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/tegra/tegra-se.h- Extension
.h- Size
- 19740 bytes
- Lines
- 590
- 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
linux/bitfield.hlinux/iommu.hlinux/host1x.hcrypto/aead.hcrypto/engine.hcrypto/hash.hcrypto/sha1.hcrypto/sha3.hcrypto/skcipher.h
Detected Declarations
struct tegra_se_algstruct tegra_se_regsstruct tegra_se_hwstruct tegra_sestruct tegra_se_cmdbufstruct tegra_se_datbufenum se_aes_algenum se_hash_algfunction se_algname_to_algidfunction tegra_key_submit_reserved_aesfunction tegra_key_submit_reserved_xtsfunction tegra_key_is_reservedfunction host1x_opcode_setpayloadfunction host1x_opcode_incr_wfunction host1x_opcode_nonincr_wfunction host1x_opcode_incrfunction host1x_opcode_nonincrfunction host1x_uclass_incr_syncpt_cond_ffunction host1x_uclass_incr_syncpt_indx_ffunction host1x_uclass_wait_syncpt_rfunction host1x_uclass_incr_syncpt_r
Annotated Snippet
struct tegra_se_alg {
struct tegra_se *se_dev;
const char *alg_base;
union {
struct skcipher_engine_alg skcipher;
struct aead_engine_alg aead;
struct ahash_engine_alg ahash;
} alg;
};
struct tegra_se_regs {
u32 op;
u32 config;
u32 last_blk;
u32 linear_ctr;
u32 out_addr;
u32 aad_len;
u32 cryp_msg_len;
u32 manifest;
u32 key_addr;
u32 key_data;
u32 key_dst;
u32 result;
};
struct tegra_se_hw {
const struct tegra_se_regs *regs;
int (*init_alg)(struct tegra_se *se);
void (*deinit_alg)(struct tegra_se *se);
bool support_sm_alg;
u32 host1x_class;
u32 kac_ver;
};
struct tegra_se {
int (*manifest)(u32 user, u32 alg, u32 keylen);
const struct tegra_se_hw *hw;
struct host1x_client client;
struct host1x_channel *channel;
struct tegra_se_cmdbuf *cmdbuf;
struct tegra_se_cmdbuf *keybuf;
struct crypto_engine *engine;
struct host1x_syncpt *syncpt;
struct device *dev;
struct clk *clk;
unsigned int opcode_addr;
unsigned int stream_id;
unsigned int syncpt_id;
void __iomem *base;
u32 owner;
};
struct tegra_se_cmdbuf {
dma_addr_t iova;
u32 *addr;
struct device *dev;
struct kref ref;
struct host1x_bo bo;
ssize_t size;
u32 words;
};
struct tegra_se_datbuf {
u8 *buf;
dma_addr_t addr;
ssize_t size;
};
static inline int se_algname_to_algid(const char *name)
{
if (!strcmp(name, "cbc(aes)"))
return SE_ALG_CBC;
else if (!strcmp(name, "ecb(aes)"))
return SE_ALG_ECB;
else if (!strcmp(name, "ctr(aes)"))
return SE_ALG_CTR;
else if (!strcmp(name, "xts(aes)"))
return SE_ALG_XTS;
else if (!strcmp(name, "cmac(aes)"))
return SE_ALG_CMAC;
else if (!strcmp(name, "gcm(aes)"))
return SE_ALG_GCM;
else if (!strcmp(name, "ccm(aes)"))
return SE_ALG_CBC_MAC;
else if (!strcmp(name, "sha1"))
return SE_ALG_SHA1;
else if (!strcmp(name, "sha224"))
return SE_ALG_SHA224;
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/iommu.h`, `linux/host1x.h`, `crypto/aead.h`, `crypto/engine.h`, `crypto/hash.h`, `crypto/sha1.h`, `crypto/sha3.h`.
- Detected declarations: `struct tegra_se_alg`, `struct tegra_se_regs`, `struct tegra_se_hw`, `struct tegra_se`, `struct tegra_se_cmdbuf`, `struct tegra_se_datbuf`, `enum se_aes_alg`, `enum se_hash_alg`, `function se_algname_to_algid`, `function tegra_key_submit_reserved_aes`.
- 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.