STRUCT CXL_MBOX_CMD(9)
π NAME π
struct cxl_mbox_cmd β bestie, this is literally the command that gets submitted to hardware β¨ like it's the little envelope you hand over to the hardware and you're like "here, do this for me, ily" π«Ά
πΈ SYNOPSIS πΈ
struct cxl_mbox_cmd {
u16 opcode;
void *payload_in;
void *payload_out;
size_t size_in;
size_t size_out;
size_t min_out;
int poll_count;
int poll_interval_ms;
u16 return_code;
};
π MEMBERS π
opcodeβ (input) the command set, plus the actual command you're submitting to hardware. it's giving "who are you and what do you want" πpayload_inβ (input) a pointer to the input payload. the little gift bag of data you're sending in πpayload_outβ (output) pointer to the output payload. ngl, the caller has to allocate it β that's on you bestie, no cap πsize_inβ (input) how many bytes to load frompayload_in. count 'em fr fr π’size_outβ (input) the max number of bytes loaded intopayload_out. (output) the number of bytes actually generated by the device. for fixed-size output commands this is always expected to be deterministic (iconic, predictable behaviour β¨). for variable-sized output commands, it tells you the exact number of bytes written. so it's doing double duty and honestly? main character energy πmin_outβ (input) the internal command output payload size validation. like a bouncer checking the payload is big enough πͺpoll_countβ (input) the number of timeouts to attempt. how many chances you're giving it before you're like "ok I'm done" πpoll_interval_msβ (input) the time between mailbox background command polling interval timeouts. the lil breather between checks β³return_codeβ (output) the error code returned from hardware. the hardware's final verdict on your request π«‘
π¦ DESCRIPTION π¦
okay so this is the primary mechanism used to send commands to the hardware. like, this is the way. periodt π
all the fields except payload_* correspond exactly to the fields described in the Command Register section of CXL 2.0 8.2.8.4.5. not approximately. exactly. we don't do approximation here π―
and then payload_in and payload_out get written to, and read from, the Command Payload Registers defined in CXL 2.0 8.2.8.4.8. iykyk π
β SEE ALSO β
- Kernel file
./include/cxl/mailbox.h struct cxl_mailbox(9)
okay that's the whole page bestie, go forth and submit commands responsibly π§ββοΈβ¨ this lil writeup lives in ./include/cxl and it's dated October 2026 β mwah, bye! ππ
π¦ 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