hl_fw_send_cpu_message(9)
π hl_fw_send_cpu_message(9) β or, how to slide into your device CPU's DMs
okay so bestie, welcome to the Kernel API Manual β¨ this one's a kernel function, hl_fw_send_cpu_message, and its whole personality is: send a CPU message to the device. that's it. that's the vibe. let's get into it π«Ά
β¨ SYNOPSIS β¨
int hl_fw_send_cpu_message (struct hl_device *hdev , u32 hw_queue_id ,
u32 *msg , u16 size , u32 timeout_us , u64 *result );
like, look at her. six params, one int return, zero notes. iconic behavior fr fr π
π ARGUMENTS π
hdevβ pointer tohl_devicestructure. literally the device, the whole main character πhw_queue_idβ the HW queue ID π¦ (yes she has a queue number, respect it)msgβ raw data of the message/packet. no makeup, no filter, just raw bytes πsizeβ size ofmsgin bytes. it's au16, keep it cute πtimeout_usβ timeout in usec to wait for CPU reply on the message. the "how long do I sit by my phone waiting for a text back" window β³resultβ return code reported by FW. the receipts, basically π§Ύ
πΈ DESCRIPTION πΈ
send message to the device CPU. that's literally the entire description, she's a woman of few words and honestly? obsessed π― no cap, that's the whole functionality β you're passing a message to the device CPU, that's the assignment.
π₯ RETURN π₯
0on success β slay π- non-zero for failure β and here's the specific breakdown, iykyk:
-ENOMEMβ memory allocation failure π the malloc said no-EAGAINβ CPU is disabled (try again when enabled) π she's not taking calls rn, try later-ETIMEDOUTβ timeout waiting for FW response β° left on read, tragic-EIOβ protocol error π something got miscommunicated in the group chat
ngl, that -EAGAIN one is important β it's not a dead end, it's a "not right now." try again when the CPU is enabled, bestie π«Ά
π¦ SEE ALSO π¦
Kernel file ./drivers/accel/habanalabs/common/firmware_if.c β that's where she lives π
and the whole friend group, in order:
hl_fw_version_cmp(9), extract_u32_until_given_char(9), hl_get_sw_major_minor_subminor(9), hl_get_preboot_major_minor(9), hl_release_firmware(9), hl_fw_copy_fw_to_device(9), hl_fw_copy_msg_to_device(9), hl_fw_load_fw_to_device(9), hl_fw_preboot_update_state(9), hl_fw_dynamic_report_error_status(9), hl_fw_dynamic_send_cmd(9), hl_fw_dynamic_extract_fw_response(9), hl_fw_dynamic_wait_for_status(9), hl_fw_dynamic_send_clear_cmd(9), hl_fw_dynamic_send_protocol_cmd(9), hl_fw_compat_crc32(9), hl_fw_dynamic_validate_memory_bound(9), hl_fw_dynamic_validate_descriptor(9), hl_fw_dynamic_read_and_validate_descriptor(9), hl_fw_dynamic_request_descriptor(9), hl_fw_dynamic_read_device_fw_version(9), hl_fw_dynamic_copy_image(9), hl_fw_dynamic_copy_msg(9), hl_fw_boot_fit_update_state(9), hl_fw_dynamic_load_image(9), hl_fw_linux_update_state(9), hl_fw_dynamic_send_msg(9), hl_fw_dynamic_init_cpu(9), hl_fw_static_init_cpu(9), hl_fw_init_cpu(9)
like. that's the whole squad. go read them too, they're all eating π₯
and that's the page, bestie!! source path is ./drivers/accel/habanalabs/common, and this lil icon was dated October 2026 β so go forth, send your CPU message, and remember: 0 means success, and success means slay πβ¨π
π¦ 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