STRUCT S5P_AES_DEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct s5p_aes_dev(9) πŸ’…

okay bestie, this is the Kernel API Manual page for struct s5p_aes_dev(9), and she is the crypto device state container. Not me being obsessed with a kernel struct, but here we are β€” main character energy, no cap. πŸ’–

✨ NAME ✨

struct s5p_aes_dev β€” crypto device state container. That's the whole name, and honestly it's giving exactly what it needs to give. πŸ‘‘

πŸ¦‹ SYNOPSIS πŸ¦‹

Here's the struct in all her glory, copied exactly so nothing gets renamed, merged, or invented:

struct s5p_aes_dev {
    struct device                   *dev;
    struct clk                      *clk;
    struct clk                      *pclk;
    void __iomem                    *ioaddr;
    void __iomem                    *aes_ioaddr;
    int irq_fc;
    struct skcipher_request         *req;
    struct s5p_aes_ctx              *ctx;
    struct scatterlist              *sg_src;
    struct scatterlist              *sg_dst;
    struct scatterlist              *sg_src_cpy;
    struct scatterlist              *sg_dst_cpy;
    struct tasklet_struct           tasklet;
    struct crypto_queue             queue;
    bool busy;
    spinlock_t lock;
    struct resource                 *res;
    void __iomem                    *io_hash_base;
    spinlock_t hash_lock;
    unsigned long                   hash_flags;
    struct crypto_queue             hash_queue;
    struct tasklet_struct           hash_tasklet;
    u8 xmit_buf[BUFLEN];
    struct ahash_request            *hash_req;
    struct scatterlist              *hash_sg_iter;
    unsigned int                    hash_sg_cnt;
    bool use_hash;
};

πŸŽ€ Members πŸŽ€

okay so here's the member-by-member breakdown, iykyk:

  • dev β€” associated device. The device she's tied to.
  • clk β€” clock for accessing hardware. You need this clock to get at the hardware.
  • pclk β€” APB bus clock necessary to access the hardware. The APB bus clock, and yes, it's necessary to access the hardware.
  • ioaddr β€” mapped IO memory region. The mapped IO memory area.
  • aes_ioaddr β€” per-varian offset for AES block IO memory. The per-varian offset for the AES block IO memory β€” keeping the original wording, bestie.
  • irq_fc β€” feed control interrupt line. The feed control interrupt line.
  • req β€” crypto request currently handled by the device. The crypto request the device is handling right now.
  • ctx β€” configuration for currently handled crypto request. The config for the crypto request currently in progress.
  • sg_src β€” scatter list with source data for currently handled block in device. This one is DMA-mapped into device.
  • sg_dst β€” scatter list with destination data for currently handled block in device. This one is also DMA-mapped into device.
  • sg_src_cpy β€” in case of unaligned access, copied scatter list with source data. Exactly that: the copied scatter list with source data when unaligned access happens.
  • sg_dst_cpy β€” in case of unaligned access, copied scatter list with destination data. Same vibe, but destination data.
  • tasklet β€” new request scheduling jib. Yep, jib. Iconic wording, we keep it.
  • queue β€” crypto queue. The crypto queue.
  • busy β€” indicates whether the device is currently handling some request thus it uses some of the fields from this state, like: req, ctx, sg_src/sg_dst (and copies). This essentially protects against concurrent access to these fields. Basically: she's the guard telling you whether those fields are in use.
  • lock β€” lock for protecting both access to device hardware registers and fields related to current request (including the busy field). Both jobs, one lock. Slay.
  • res β€” resources for hash. The resources for hash.
  • io_hash_base β€” per-variant offset for HASH block IO memory. The per-variant offset for the HASH block IO memory.
  • hash_lock β€” lock for protecting hash_req, hash_queue and hash_flags variable. The lock holding down those three.
  • hash_flags β€” flags for current HASH op. Flags for the current HASH operation.
  • hash_queue β€” async hash queue. The async hash queue.
  • hash_tasklet β€” new HASH request scheduling job. The new HASH request scheduling job.
  • xmit_buf β€” buffer for current HASH request transfer into SSS block. Buffer time for the current HASH request transfer into the SSS block.
  • hash_req β€” current request sending to SSS HASH block. The current request being sent to the SSS HASH block.
  • hash_sg_iter β€” scatterlist transferred through DMA into SSS HASH block. The scatterlist moved through DMA into the SSS HASH block.
  • hash_sg_cnt β€” counter for hash_sg_iter. Counts the hash_sg_iter.
  • use_hash β€” true if HASH algs enabled. Exactly that.

🌈 SEE ALSO 🌈

Kernel file ./drivers/crypto/s5p-sss.c is the home base, and here's the whole friend group:

mwah πŸ’‹ source/version: ./drivers/crypto; date: October 2026; and yes, we're still talking about struct s5p_aes_dev(9) β€” periodt. 🌈

πŸ“¦ where this page comes from