'\" t .\" Title: nvme-fw-download .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 09/18/2026 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" .TH "NVME\-FW\-DOWNLOAD" "1" "09/18/2026" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" nvme-fw-download \- Download all or a portion of an nvme firmware image\&. .SH "SYNOPSIS" .sp .nf \fInvme\fR [] \fIfw download\fR [\-\-fw= | \-f ] [\-\-xfer= | \-x ] [\-\-offset= | \-O ] [\-\-stream] .fi .SH "DESCRIPTION" .sp The Firmware Image Download command is used to download all or a portion of the firmware image for a future update to the controller\&. The Firmware Image Download command may be submitted while other commands on the Admin Submission Queue or I/O Submission Queues are outstanding\&. The Firmware Image Download command copies the new firmware image (in whole or in part) to the controller\&. .sp The firmware image may be constructed of multiple pieces that are individually downloaded with separate Firmware Image Download commands\&. Each Firmware Image Download command includes a Dword Offset and Number of Dwords that specify a Dword range\&. The host software shall ensure that firmware pieces do not have Dword ranges that overlap\&. Firmware portions may be submitted out of order to the controller\&. .sp The new firmware image is not applied as part of the Firmware Image Download command\&. It is applied following a reset, where the image to apply and the firmware slot it should be committed to is specified with the Firmware Commit command (nvme fw\-commit )\&. .sp Note: nvme\-cli must allocate a contiguous (linear) memory buffer and map the firmware binary into it\&. To do this, nvme\-cli first attempts to allocate the buffer using huge TLB pages\&. If allocation using huge pages fails, it falls back to using posix_memalign() combined with madvise()\&. If the kernel rejects the huge page advice, nvme\-cli keeps the aligned buffer and lets the I/O path attempt to map it\&. .sp The optional \-\-stream mode avoids allocating a buffer for the complete firmware image\&. It reads and downloads one transfer\-sized portion at a time\&. .sp To increase the likelihood of success, you may want to pre\-allocate a number of huge pages before initiating the firmware download: .sp .if n \{\ .RS 4 .\} .nf echo 20 > /proc/sys/vm/nr_hugepages .fi .if n \{\ .RE .\} .sp For more details, refer to: \m[blue]\fBhttps://www\&.kernel\&.org/doc/Documentation/vm/hugetlbpage\&.txt\fR\m[] .sp The bare \fInvme fw\-download\fR form (without a space) still works as a deprecated alias and will be removed in a future major version\&. New scripts should use \fInvme fw download\fR instead\&. .SH "OPTIONS" .PP \-f , \-\-fw= .RS 4 Required argument\&. This specifies the path to the device\(cqs firmware file on your system that will be read by the program and sent to the device\&. .RE .PP \-x , \-\-xfer= .RS 4 This specifies the size to split each transfer\&. This is useful if the device has a max transfer size requirement for firmware\&. It defaults to 4k\&. .RE .PP \-O , \-\-offset= .RS 4 This specifies the starting offset in dwords\&. This is really only useful if your firmware is split in multiple files; otherwise the offset starts at zero and automatically adjusts based on the \fIxfer\fR size given\&. .RE .PP \-\-stream .RS 4 Read and download one transfer\-sized portion of the firmware image at a time instead of mapping the complete image into memory\&. This avoids the huge page requirement and limits memory use to the transfer size\&. .RE .SH "GLOBAL OPTIONS" .sp The following options are defined at the top\-level nvme command and are available to this subcommand: .PP \-\-dry\-run .RS 4 Print the command that would be executed, but do not actually execute it\&. .RE .PP \-\-no\-ioctl\-probing .RS 4 Disable probing for 64\-bit IOCTL support\&. .RE .PP \-\-no\-retries .RS 4 Disable retry logic on transient errors\&. .RE .PP \-o , \-\-output\-format= .RS 4 Set the reporting format to \fInormal\fR, \fItabular, \*(Aqjson\fR, or \fIbinary\fR\&. Only one output format may be used at a time\&. .RE .PP \-\-output\-format\-version= .RS 4 Select the output format version\&. Version \fI1\fR uses the original field naming, while version \fI2\fR (default) provides more consistent and script\-friendly field names\&. .RE .PP \-\-timeout= .RS 4 Set the timeout for the command in milliseconds\&. .RE .PP \-v, \-\-verbose .RS 4 Increase the level of detail in the output\&. May be specified multiple times to further increase verbosity\&. .RE .sp These options can also be set as machine\-wide defaults in nvme\-cli\&.conf(5)\&. A command\-line flag always overrides the file\&. .SH "EXAMPLES" .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Transfer a firmware size 128KiB at a time: .sp .if n \{\ .RS 4 .\} .nf # nvme fw download /dev/nvme0 \-\-fw=/path/to/nvme\&.fw \-\-xfer=0x20000 .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Read and download a firmware image one transfer\-sized portion at a time: .sp .if n \{\ .RS 4 .\} .nf # nvme fw download /dev/nvme0 \-\-fw=/path/to/nvme\&.fw \-\-stream .fi .if n \{\ .RE .\} .RE .SH "NVME" .sp Part of the nvme\-user suite