STRUCT SCMI_XFER_OPS(9)
π 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms