diff options
author | Bart Van Assche <bvanassche@google.com> | 2022-11-23 18:56:18 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-11-23 18:56:18 +0000 |
commit | 71b9916bab71328ec690b8677524e512d580d28f (patch) | |
tree | 207cdb23f8257e270a30143fde23d2033901581f /inhex/nvme_identify_ctl.hex | |
parent | 8718296061e35ba33bf88847e7498f3d7e38f8f1 (diff) | |
parent | 448b67b18a80f8cc0feaaa669deaf169faa169f3 (diff) | |
download | sg3_utils-71b9916bab71328ec690b8677524e512d580d28f.tar.gz |
Merge remote-tracking branch 'aosp/upstream-main' into HEAD am: 448b67b18a
Original change: https://android-review.googlesource.com/c/platform/external/sg3_utils/+/2312210
Change-Id: I9653250a81928fffacf92bb5d9daffbc0ad7b2a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'inhex/nvme_identify_ctl.hex')
-rw-r--r-- | inhex/nvme_identify_ctl.hex | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/inhex/nvme_identify_ctl.hex b/inhex/nvme_identify_ctl.hex new file mode 100644 index 00000000..f22141e2 --- /dev/null +++ b/inhex/nvme_identify_ctl.hex @@ -0,0 +1,27 @@ +# 64 byte NVMe Identify controller command (an Admin command) that is +# suitable for: +# sg_raw --cmdfile=<this_file_name> --request=4096 <nvme_device> +# +# The address field (at byte offset 24, 8 bytes and little endian) gives +# special meaning to the highest address pointers: +# ffffffff fffffffe use address of data-in buffer +# ffffffff fffffffd use address of data-out buffer +# +# The data length field (at byte offset 36, 4 bytes and little endian) +# gives special meaning to the highest block counts: +# fffffffe use byte length of data-in buffer +# fffffffd use byte length of data-out buffer +# +# Since The Identify command reads data "in" from the device, then the +# data-in buffer is appropriate. + +06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 fe ff ff ff ff ff ff ff +00 00 00 00 fe ff ff ff 01 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +# A typical invocation in Linux and FreeBSD would look like this: +# sg_raw --cmdfile=nvme_identify_ctl.hex -r 4k /dev/nvme0 +# +# NVMe likes "4k" (4096 bytes) buffer size, preferably aligned to +# a 4096 byte (or "page") boundary. |