STRUCT MOX_RWTM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct mox_rwtm(9) πŸ’–

okay bestie, welcome to the struct mox_rwtm(9) page of the Kernel API Manual β€” this is where the driver keeps all its private little secrets, no cap. It's the driver private data structure, and honestly? It's carrying the whole vibe. 🫢


✨ NAME ✨

struct mox_rwtm β€” driver private data structure. that's it, that's the whole thing, and yet she's iconic. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct mox_rwtm {
    struct mbox_client mbox_client;
    struct mbox_chan *mbox;
    struct hwrng hwrng;
    struct armada_37xx_rwtm_rx_msg reply;
    void *buf;
    dma_addr_t buf_phys;
    struct mutex busy;
    struct completion cmd_done;
    bool has_board_info;
    u64 serial_number;
    int board_version, ram_size;
    u8 mac_address1[ETH_ALEN], mac_address2[ETH_ALEN];
  #ifdef CONFIG_TURRIS_MOX_RWTM_KEYCTL;
    u8 pubkey[MOX_ECC_PUBKEY_LEN];
  #endif;
};

look at her. a whole struct. main character energy fr fr. πŸ”₯


🌸 Members 🌸

okay so now we go field by field, don't skip, because every single one of these matters. πŸŽ€

  • mbox_client β€” the rWTM mailbox client. she's the one who shows up to the mailbox, iykyk. πŸ’Œ
  • mbox β€” the rWTM mailbox channel. this is the actual mailbox situation.
  • hwrng β€” the RNG driver structure. randomness, but make it kernel. ✨
  • reply β€” the last mailbox reply, filled in by the receive callback. she remembers everything. 😭
  • buf β€” the DMA buffer.
  • buf_phys β€” the physical address of that DMA buffer. yes, the physical one, not the other one. πŸ’…
  • busy β€” a mutex protecting mailbox command execution. one at a time, besties, we are not overlapping. 🚫
  • cmd_done β€” the command-done completion. she's the "we're so back" signal. πŸ””
  • has_board_info β€” a bool for whether board information is present. is she there or not? vibe check. πŸ•΅οΈ
  • serial_number β€” the serial number of the device, a u64. her social security number basically. πŸ™ˆ
  • board_version β€” board version / revision of the device. an int, along with…
  • ram_size β€” …RAM size of the device. these two share a line and honestly? power couple. πŸ‘‘
  • mac_address1 β€” the first MAC address of the device, u8 mac_address1[ETH_ALEN].
  • mac_address2 β€” the second MAC address of the device, u8 mac_address2[ETH_ALEN]. yes there are two, slay. πŸ¦‹
  • pubkey β€” the board ECDSA public key, u8 pubkey[MOX_ECC_PUBKEY_LEN], and note she only exists when CONFIG_TURRIS_MOX_RWTM_KEYCTL is defined. conditional queen. πŸ’œ

🧚 SEE ALSO 🧚

  • Kernel file: ./drivers/firmware/turris-mox-rwtm.c β€” go read her, she's the whole source of truth. πŸ“–

ngl, if you're poking at this struct you're already kind of a legend. go be great. ⭐

πŸ’– that's the page, bestie πŸ’– β€” brought to you from ./drivers/firmware, dated October 2026, and yes that's the source/version + date sign-off, we simply had to mention it. πŸ“πŸŒ·

πŸ“¦ where this page comes from