1*44704f69SBart Van Assche# 64 byte NVMe Identify controller command (an Admin command) that is 2*44704f69SBart Van Assche# suitable for: 3*44704f69SBart Van Assche# sg_raw --cmdfile=<this_file_name> --request=4096 <nvme_device> 4*44704f69SBart Van Assche# 5*44704f69SBart Van Assche# The address field (at byte offset 24, 8 bytes and little endian) gives 6*44704f69SBart Van Assche# special meaning to the highest address pointers: 7*44704f69SBart Van Assche# ffffffff fffffffe use address of data-in buffer 8*44704f69SBart Van Assche# ffffffff fffffffd use address of data-out buffer 9*44704f69SBart Van Assche# 10*44704f69SBart Van Assche# The data length field (at byte offset 36, 4 bytes and little endian) 11*44704f69SBart Van Assche# gives special meaning to the highest block counts: 12*44704f69SBart Van Assche# fffffffe use byte length of data-in buffer 13*44704f69SBart Van Assche# fffffffd use byte length of data-out buffer 14*44704f69SBart Van Assche# 15*44704f69SBart Van Assche# Since The Identify command reads data "in" from the device, then the 16*44704f69SBart Van Assche# data-in buffer is appropriate. 17*44704f69SBart Van Assche 18*44704f69SBart Van Assche06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 19*44704f69SBart Van Assche00 00 00 00 00 00 00 00 fe ff ff ff ff ff ff ff 20*44704f69SBart Van Assche00 00 00 00 fe ff ff ff 01 00 00 00 00 00 00 00 21*44704f69SBart Van Assche00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 22*44704f69SBart Van Assche 23*44704f69SBart Van Assche# A typical invocation in Linux and FreeBSD would look like this: 24*44704f69SBart Van Assche# sg_raw --cmdfile=nvme_identify_ctl.hex -r 4k /dev/nvme0 25*44704f69SBart Van Assche# 26*44704f69SBart Van Assche# NVMe likes "4k" (4096 bytes) buffer size, preferably aligned to 27*44704f69SBart Van Assche# a 4096 byte (or "page") boundary. 28