OS Manuals

libnvme_read_regs-libnvme3(2)

libnvme_read_regs - Read the controller registers of a PCIe controller

libnvme_read_regs(9) libnvme API manual libnvme_read_regs(9)

libnvme_read_regs - Read the controller registers of a PCIe controller

int libnvme_read_regs (struct libnvme_transport_handle *hdl , __u32 offset , void *buf , __u32 len );

Transport handle
Offset of the first register in bytes
Buffer to store the register values
Number of bytes to read

Copies the register range [offset, offset + len) of the controller into buf, using 32-bit MMIO reads. The register values are stored in little-endian byte order, as they appear in the register map. offset and len must be multiples of 4 and the range must be within the first 4 KiB of the register map.

This should only be sent to controller handles, not to namespaces.

0 on success or a negative error code otherwise. -ENOTSUP indicates that the transport has no memory-mapped registers.

libnvme_read_regs October 2026

nvme-cli 3.2-r0 · os · ingested 2026-10-31