STRUCT SCMI_XFER_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so bestie, this is a page from the Kernel API Manual, and it's literally about struct scmi_xfer_ops β€” which is References to the core SCMI xfer operations. slay.


✨ SYNOPSIS ✨

here's the whole struct, exactly as it lives, no cap:

struct scmi_xfer_ops {
    int (*xfer_get_init)(const struct scmi_protocol_handle *ph, u8
msg_id, size_t tx_size, size_t rx_size, struct scmi_xfer **p);
    void (*reset_rx_to_maxsz)(const struct scmi_protocol_handle *ph,
struct scmi_xfer *xfer);
    int (*do_xfer)(const struct scmi_protocol_handle *ph, struct
scmi_xfer *xfer);
    int (*do_xfer_with_response)(const struct scmi_protocol_handle *ph,
struct scmi_xfer *xfer);
    void (*xfer_put)(const struct scmi_protocol_handle *ph, struct
scmi_xfer *xfer);
 };

like, that's the whole vibe. five function pointers, all of them taking a struct scmi_protocol_handle *ph first because that's just How It Is 🫢


πŸŽ€ Members πŸŽ€

  • xfer_get_init β€” Initialize one struct xfer if any xfer slot is free. (if there's no free slot, no xfer for you πŸ™ˆ)
  • reset_rx_to_maxsz β€” Reset rx size to max transport size. iconic little reset button energy.
  • do_xfer β€” Do the SCMI transfer. that's it, that's the job πŸ’…
  • do_xfer_with_response β€” Do the SCMI transfer waiting for a response. same thing but it waits, main character patience 🌸
  • xfer_put β€” Free the xfer slot. cleanup era, we love to see it ✨

🌈 Description 🌈

okay so important detail bestie: all of these operations expect a protocol handle as the first parameter. like, every single one, no exceptions.

and then β€” this is the good part β€” they internally use it to infer the underlying protocol number. which means it is not possible for a protocol implementation to forge messages for another protocol. πŸš«πŸ”¨ literally cannot happen, the handle knows what's up.

that's the whole security vibe and honestly? obsessed. πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

  • 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_protocol(9)

go read them all, i'll wait πŸ’–


source: ./drivers/firmware/arm_scmi β€” version dated October 2026 β€” and yes the page footer still says struct scmi_xfer_ops(9) because some things are eternal ✨ bye bestie, mwah πŸ’‹

πŸ“¦ where this page comes from