libnvme_write_reg64(9)

πŸ“¦ version 3.2, in arch rolling

🌸 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