Edit

Share via


STORAGE_HW_BOOT_PARTITION_DOWNLOAD structure (winioctl.h)

Contains a boot partition image payload to be downloaded to an NVMe storage controller or disk. This structure is used as the input buffer for the IOCTL_STORAGE_BOOT_PARTITION_DOWNLOAD control code.

Syntax

typedef struct _STORAGE_HW_BOOT_PARTITION_DOWNLOAD {
  DWORD     Version;
  DWORD     Size;
  DWORD     Flags;
  BYTE      BPID;
  BYTE      Reserved[3];
  DWORDLONG Offset;
  DWORDLONG BufferSize;
  BYTE      ImageBuffer[ANYSIZE_ARRAY];
} STORAGE_HW_BOOT_PARTITION_DOWNLOAD, *PSTORAGE_HW_BOOT_PARTITION_DOWNLOAD;

Members

Version

The version of this structure. Set this to STORAGE_HW_BOOT_PARTITION_DOWNLOAD_STRUCTURE_VERSION (0x01).

Size

The size of this structure including the image buffer, in bytes.

Flags

Flags associated with this download. The following are valid flags that this member can hold.

Flag Description
STORAGE_HW_BOOT_PARTITION_REQUEST_FLAG_CONTROLLER Indicates that the target of the request is a controller or adapter, different than the device handle or object itself (for example, NVMe SSD or HBA).

BPID

The boot partition ID that the image will be downloaded to. Valid values are 0 or 1.

Reserved[3]

Reserved for future use.

Offset

The offset within the boot partition image where this chunk begins. This value should be aligned to ImagePayloadAlignment from STORAGE_HW_BOOT_PARTITION_INFO.

BufferSize

The size of the ImageBuffer data, in bytes. This value should be a multiple of ImagePayloadAlignment from STORAGE_HW_BOOT_PARTITION_INFO.

ImageBuffer[ANYSIZE_ARRAY]

The boot partition image data for this download chunk.

Remarks

This structure is used with IOCTL_STORAGE_BOOT_PARTITION_DOWNLOAD, which issues an NVMe Firmware Download command (NVME_ADMIN_COMMAND_FIRMWARE_IMAGE_DOWNLOAD) to transfer image data to the controller's internal buffer. For large boot partition images that exceed the controller's maximum transfer size (reported in ImagePayloadMaxSize from STORAGE_HW_BOOT_PARTITION_INFO), the image must be split into multiple chunks and downloaded using multiple IOCTL calls with the appropriate Offset values.

After all image data has been downloaded, use IOCTL_STORAGE_BOOT_PARTITION_ACTIVATE with the STORAGE_HW_BOOT_PARTITION_REQUEST_REPLACE_EXISTING_BOOT_PARTITION flag to commit the downloaded image to the boot partition.

Note

These IOCTLs are currently only supported for PCIe NVMe devices.

Requirements

Requirement Value
Minimum supported client Windows 11 26H1
Header winioctl.h (include Windows.h)

See also

IOCTL_STORAGE_BOOT_PARTITION_DOWNLOAD

IOCTL_STORAGE_BOOT_PARTITION_GET_INFO

IOCTL_STORAGE_BOOT_PARTITION_ACTIVATE

STORAGE_HW_BOOT_PARTITION_INFO

STORAGE_HW_BOOT_PARTITION_ACTIVATE