libnvme_write_reg64(9)
πΈ libnvme_write_reg64 β the libnvme API manual, bestie edition πΈ
okay so this page lives in the libnvme API manual and it's all about libnvme_write_reg64(9), which β say it with me β writes a 64-bit controller register of a PCIe controller. iconic behavior honestly β¨
π NAME π
libnvme_write_reg64 β write a 64-bit controller register of a PCIe controller π
π¦ SYNOPSIS π¦
int libnvme_write_reg64 (struct libnvme_transport_handle *hdl , __u32
offset , __u64 value , bool mmio32 );
like, that's the whole vibe. four args, one int back. slay π
β¨ ARGUMENTS β¨
hdlβ the transport handle π«Ά your little passport to the transport, basically.offsetβ offset of the register, in bytes. yes, bytes. keep up bestie πvalueβ the value you're writing. the actual payload, the main character πmmio32β write the register as two 32-bit values, low half first. some devices literally do not support 64-bit MMIO, so this is your fallback queen π§ lowkey important.
π DESCRIPTION π
so here's the tea: offset must be a multiple of 8. not optional, not a suggestion, fr fr β multiple of 8 or nothing π
and this one should only be sent to controller handles, not to namespaces. like, read the room. controller handles only. no cap π«
β RETURN β
0 on success, or a negative error code otherwise β that's the whole dealio π
and specifically: -ENOTSUP means the transport has no memory-mapped registers. so if you see that, it's not you, it's the transport ππ
and that's the page!! mwah π β this lil masterpiece comes from the libnvme API manual, source/version libnvme_write_reg64, dated October 2026. go write some registers bestie, you got this ππ₯π
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms