STRUCT TB_NVM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct tb_nvm(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’– this page is literally all about struct tb_nvm, and it’s giving β€œNVM info holder with main character energy.” let’s get into it, no cap.

🌸 NAME 🌸

struct tb_nvm - Structure holding NVM information πŸŽ€

🌈 SYNOPSIS 🌈

here’s the whole struct, character for character, periodt:

struct tb_nvm {
    struct device *dev;
    u32 major;
    u32 minor;
    int id;
    struct nvmem_device *active;
    size_t active_size;
    struct nvmem_device *non_active;
    void *buf;
    void *buf_data_start;
    size_t buf_data_size;
    bool authenticating;
    bool flushed;
    const struct tb_nvm_vendor_ops *vops;
};

πŸ‘‘ Members πŸ‘‘

okay, member-by-member vibe check, bestie:

  • dev β€” Owner of the NVM πŸ”‘
  • major β€” Major version number of the active NVM portion
  • minor β€” Minor version number of the active NVM portion
  • id β€” Identifier used with both NVM portions β€” one id, two portions, iconic
  • active β€” Active portion NVMem device ✨
  • active_size β€” Size in bytes of the active NVM
  • non_active β€” Non-active portion NVMem device πŸ¦‹
  • buf β€” Buffer where the NVM image is stored before it is written to the actual NVM flash device
  • buf_data_start β€” Where the actual image starts after skipping possible headers
  • buf_data_size β€” Number of bytes actually consumed by the new NVM image
  • authenticating β€” The device is authenticating the new NVM
  • flushed β€” The image has been flushed to the storage area
  • vops β€” Router vendor specific NVM operations (optional)

πŸ’« Description πŸ’«

⚠️ important bestie: the user of this structure needs to handle serialization of possible concurrent access. that’s the whole note, fr fr β€” no cap, it’s on the user of this structure.

πŸ¦‹ SEE ALSO πŸ¦‹

the reference rabbit hole starts at Kernel file ./drivers/thunderbolt/tb.h, and includes the whole squad:


okay bye bestie! πŸ’œ source/version: ./drivers/thunderbolt; date: October 2026; footer energy: struct tb_nvm(9). mwah πŸŽ€

πŸ“¦ where this page comes from