STRUCT SCMI_PROTOCOL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so bestie, welcome to the Kernel API Manual ✨ β€” this is the page for struct scmi_protocol(9), aka the protocol descriptor. it's literally the little ID card every SCMI protocol carries around so the kernel knows who it is, who owns it, what it can do, and what version vibes it's on. let's get into it 🫢


✨ NAME ✨

struct scmi_protocol β€” the protocol descriptor. that's it, that's the whole name. iconic behavior honestly πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole struct, copied exactly because we do not mess with source code in this house:

struct scmi_protocol {
    const u8                                id;
    struct module                           *owner;
    const scmi_prot_init_ph_fn_t            instance_init;
    const scmi_prot_init_ph_fn_t            instance_deinit;
    const void                              *ops;
    const struct scmi_protocol_events       *events;
    unsigned int                            supported_version;
    char *vendor_id;
    char *sub_vendor_id;
    u32 impl_ver;
 };

look at her. all those aligned fields. the way that this struct is just organized πŸ˜­πŸ’–


πŸŽ€ Members πŸŽ€

okay now the part you actually came for β€” every single member, no skips, no cap:

  • id β€” the Protocol ID. that's the whole thing. it's the protocol's name tag 🏷️
  • owner β€” the Module reference, if there is one. no module? no problem πŸ’…
  • instance_init β€” the Mandatory protocol initialization function. mandatory mandatory β€” like, you literally cannot skip this one, it's giving "you must attend the group chat" energy πŸ”₯
  • instance_deinit β€” the Optional protocol de-initialization function. cleanup era, but only if you feel like it 🌸
  • ops β€” an Optional reference to the operations the protocol provides, exposed over in scmi_protocol.h. this is where the protocol keeps its actual skill set ✨
  • events β€” an Optional reference to the events this protocol supports. notification girlies rise up πŸ””
  • supported_version β€” the highest version currently supported for this protocol by the agent. and here's the key bit: each protocol implementation in the agent is supposed to downgrade to match the protocol version supported by the platform. so like, dress for the platform you're actually on, not the one you wish you were on 😌
  • vendor_id β€” a firmware vendor string used for matching vendor protocols. ⚠️ it's ignored when id identifies a standard protocol, and it cannot be NULL otherwise. so standard protocol? ignore. vendor protocol? you better fill it in, bestie 🚨
  • sub_vendor_id β€” a firmware sub_vendor string, also for matching vendor protocols. this one is ignored if NULL, and also ignored when id identifies a standard protocol. so it's the chill optional one of the vendor strings πŸ¦‹
  • impl_ver β€” a firmware implementation version for vendor protocols matching. ignored if zero, and ignored if id identifies a standard protocol. zero = don't care, standard protocol = don't care, otherwise it's matching time ⭐

πŸ’œ Description πŸ’œ

quick note bestie, don't miss this one: vendor protocols matching at load time happens by attempting the closest match first against the tuple (vendor, sub_vendor, impl_ver).

so it's not a "first one wins" situation, it's a "who's the most specific" situation. the closest match gets picked first 🎯 iykyk


🌈 SEE ALSO 🌈

go read these, they're all in the Kernel file ./drivers/firmware/arm_scmi/protocols.h:

  • struct scmi_msg_resp_prot_version(9)
  • struct scmi_msg(9)
  • struct scmi_msg_hdr(9)
  • struct scmi_xfer(9)
  • struct scmi_protocol_handle(9)
  • struct scmi_iterator_state(9)
  • struct scmi_iterator_ops(9)
  • struct scmi_proto_helpers_ops(9)
  • struct scmi_xfer_ops(9)

that's the whole friend group right there, go say hi πŸ’–


and that's the page!! πŸŽ‰ this little cutie lives in ./drivers/firmware/arm_scmi, it's dated October 2026, and it's filed under struct scmi_protocol(9) in the Kernel API Manual. slay, go read some source, mwah πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from