54#define MAX_NUM_OF_IO_SQ 8
55#define MAX_NUM_OF_IO_CQ 8
57#define ADMIN_CMD_DRAM_DATA_BUFFER 0x00200000
59#define STORAGE_CAPACITY_L 0x00000000
60#define STORAGE_CAPACITY_H 0x00000000
62#define MAX_NUM_OF_NLB (512 * 1024 / 4096)
65#define ADMIN_DELETE_IO_SQ 0x00
66#define ADMIN_CREATE_IO_SQ 0x01
67#define ADMIN_GET_LOG_PAGE 0x02
68#define ADMIN_DELETE_IO_CQ 0x04
69#define ADMIN_CREATE_IO_CQ 0x05
70#define ADMIN_IDENTIFY 0x06
71#define ADMIN_ABORT 0x08
72#define ADMIN_SET_FEATURES 0x09
73#define ADMIN_GET_FEATURES 0x0A
74#define ADMIN_ASYNCHRONOUS_EVENT_REQUEST 0x0C
75#define ADMIN_FIRMWARE_ACTIVATE 0x10
76#define ADMIN_FIRMWARE_IMAGE_DOWNLOAD 0x11
77#define ADMIN_FORMAT_NVM 0x80
78#define ADMIN_DOORBELL_BUFFER_CONFIG 0x7C
79#define ADMIN_SECURITY_SEND 0x81
80#define ADMIN_SECURITY_RECEIVE 0x82
83#define IO_NVM_FLUSH 0x00
84#define IO_NVM_WRITE 0x01
85#define IO_NVM_READ 0x02
86#define IO_NVM_WRITE_UNCORRECTABLE 0x04
87#define IO_NVM_COMPARE 0x05
88#define IO_NVM_DATASET_MANAGEMENT 0x09
91#define SCT_GENERIC_COMMAND_STATUS 0
92#define SCT_COMMAND_SPECIFIC_STATUS 1
93#define SCT_MEDIA_AND_DATA_INTEGRITY_ERRORS 2
94#define SCT_VENDOR_SPECIFIC 7
97#define SC_SUCCESSFUL_COMPLETION 0x00
98#define SC_INVALID_COMMAND_OPCODE 0x01
99#define SC_INVALID_FIELD_IN_COMMAND 0x02
100#define SC_COMMAND_ID_CONFLICT 0x03
101#define SC_DATA_TRANSFER_ERROR 0x04
102#define SC_COMMANDS_ABORTED_DUE_TO_POWER_LOSS_NOTIFICATION 0x05
103#define SC_INTERNAL_DEVICE_ERROR 0x06
104#define SC_COMMAND_ABORT_REQUESTED 0x07
105#define SC_COMMAND_ABORTED_DUE_TO_SQ_DELETION 0x08
106#define SC_COMMAND_ABORTED_DUE_TO_FAILED_FUSED_COMMAND 0x09
107#define SC_COMMAND_ABORTED_DUE_TO_MISSING_FUSED_COMMAND 0x0A
108#define SC_INVALID_NAMESPACE_OR_FORMAT 0x0B
109#define SC_COMMAND_SEQUENCE_ERROR 0x0C
110#define SC_INVALID_SGL_SEGMENT_DESCRIPTOR 0x0D
111#define SC_INVALID_NUMBER_OF_SGL_DESCRIPTORS 0x0E
112#define SC_DATA_SGL_LENGTH_INVALID 0x0F
113#define SC_METADATA_SGL_LENGTH_INVALID 0x10
114#define SC_SGL_DESCRIPTOR_TYPE_INVALID 0x11
115#define SC_INVALID_USE_OF_CONTROLLER_MEMORY_BUFFER 0x12
116#define SC_PRP_OFFSET_INVALID 0x13
117#define SC_ATOMIC_WRITE_UNIT_EXCEEDED 0x14
118#define SC_SGL_OFFSET_INVALID 0x16
119#define SC_SGL_SUB_TYPE_INVALID 0x17
120#define SC_HOST_IDENTIFIER_INCONSISTENT_FORMAT 0x18
121#define SC_KEEP_ALIVE_TIMEOUT_EXPIRED 0x19
122#define SC_KEEP_ALIVE_TIMEOUT_INVALID 0x1A
125#define SC_LBA_OUT_OF_RANGE 0x80
126#define SC_CAPACITY_EXCEEDED 0x81
127#define SC_NAMESPACE_NOT_READY 0x82
128#define SC_RESERVATION_CONFLICT 0x83
129#define SC_FORMAT_IN_PROGRESS 0x84
132#define SC_COMPLETION_QUEUE_INVALID 0x00
133#define SC_INVALID_QUEUE_IDENTIFIER \
136#define SC_INVALID_QUEUE_SIZE 0x02
137#define SC_ABORT_COMMAND_LIMIT_EXCEEDED 0x03
138#define SC_ASYNCHRONOUS_EVENT_REQUEST_LIMIT_EXCEEDED 0x05
139#define SC_INVALID_FIRMWARE_SLOT 0x06
140#define SC_INVALID_FIRMWARE_IMAGE 0x07
141#define SC_INVALID_INTERRUPT_VECTOR 0x08
142#define SC_INVALID_LOG_PAGE 0x09
143#define SC_INVALID_FORMAT 0x0A
144#define SC_FIRMWARE_ACTIVATION_REQUIRES_CONVENTIONAL_RESET 0x0B
145#define SC_INVALID_QUEUE_DELETION 0x0C
146#define SC_FEATURE_IDENTIFIER_NOT_SAVEABLE 0x0D
147#define SC_FEATURE_NOT_CHANGEABLE 0x0E
148#define SC_FEATURE_NOT_NAMESPACE_SPECIFIC 0x0F
149#define SC_FIRMWARE_ACTIVATION_REQUIRES_NVM_SUBSYSTEM_RESET 0x10
150#define SC_FIRMWARE_ACTIVATION_REQUIRES_RESET 0x11
151#define SC_FIRMWARE_ACTIVATION_REQUIRES_MAXIMUM_TIME_VIOLATION 0x12
152#define SC_FIRMWARE_ACTIVATION_PROHIBITED 0x13
153#define SC_OVERLAPPING_RANGE 0x14
154#define SC_NAMESPACE_INSUFFICIENT_CAPACITY 0x15
155#define SC_NAMESPACE_IDENTIFIER_UNAVAILABLE 0x16
156#define SC_NAMESPACE_ALREADY_ATTACHED 0x18
157#define SC_NAMESPACE_IS_PRIVATE 0x19
158#define SC_NAMESPACE_NOT_ATTACHED 0x1A
159#define SC_THIN_PROVISIONING_NOT_SUPPORTED 0x1B
160#define SC_CONTROLLER_LIST_INVALID 0x1C
163#define SC_CONFLICTING_ATTRIBUTES 0x80
164#define SC_INVALID_PROTECTION_INFORMATION 0x81
165#define SC_ATTEMPTED_WRITE_TO_READ_ONLY_RANGE 0x82
168#define SC_WRITE_FAULT 0x80
169#define SC_UNRECOVERED_READ_ERROR 0x81
170#define SC_END_TO_END_GUARD_CHECK_ERROR 0x82
171#define SC_END_TO_END_APPLICATION_TAG_CHECK_ERROR 0x83
172#define SC_END_TO_END_REFERENCE_TAG_CHECK_ERROR 0x84
173#define SC_COMPARE_FAILURE 0x85
174#define SC_ACCESS_DENIED 0x86
175#define SC_DEALLOCATED_OR_UNWRITTEN_LOGICAL_BLOCK 0x87
179#define ARBITRATION 0x01
180#define POWER_MANAGEMENT 0x02
181#define LBA_RANGE_TYPE 0x03
182#define TEMPERATURE_THRESHOLD 0x04
183#define ERROR_RECOVERY 0x05
184#define VOLATILE_WRITE_CACHE 0x06
185#define NUMBER_OF_QUEUES 0x07
186#define INTERRUPT_COALESCING 0x08
187#define INTERRUPT_VECTOR_CONFIGURATION 0x09
188#define WRITE_ATOMICITY 0x0A
189#define ASYNCHRONOUS_EVENT_CONFIGURATION 0x0B
190#define Power_State_Transition 0x0C
191#define Timestamp 0x0E
192#define SOFTWARE_PROGRESS_MARKER 0x80
194#define NVME_TASK_IDLE 0x0
195#define NVME_TASK_WAIT_CC_EN 0x1
196#define NVME_TASK_RUNNING 0x2
197#define NVME_TASK_SHUTDOWN 0x3
198#define NVME_TASK_WAIT_RESET 0x4
199#define NVME_TASK_RESET 0x5
362 unsigned short SC : 8;
385 unsigned char SV : 1;
440 unsigned short PC : 1;
483 unsigned short PC : 1;
568 unsigned char SN[20];
569 unsigned char MN[40];
682 unsigned char VS[1024];
691 unsigned char RP : 2;
764 unsigned char VS[3712];
795 unsigned short LR : 1;
856 unsigned short LR : 1;
struct _ADMIN_CREATE_IO_SQ_DW11 ADMIN_CREATE_IO_SQ_DW11
struct _NVME_ADMIN_COMMAND NVME_ADMIN_COMMAND
struct _NVME_STATUS NVME_CONTEXT
struct _IO_READ_COMMAND_DW12 IO_READ_COMMAND_DW12
struct _ADMIN_CREATE_IO_SQ_DW10 ADMIN_CREATE_IO_SQ_DW10
struct _IO_DATASET_MANAGEMENT_COMMAND_DW10 _IO_DATASET_MANAGEMENT_COMMAND_DW10
struct _ADMIN_DELETE_IO_SQ_DW10 ADMIN_DELETE_IO_SQ_DW10
struct _NVME_IO_CQ_STATUS NVME_IO_CQ_STATUS
struct _ADMIN_SET_FEATURES_DW10 ADMIN_SET_FEATURES_DW10
struct _ADMIN_GET_LOG_PAGE_DW10 ADMIN_GET_LOG_PAGE_DW10
struct _ADMIN_IDENTIFY_POWER_STATE_DESCRIPTOR ADMIN_IDENTIFY_POWER_STATE_DESCRIPTOR
struct _NVME_IO_COMMAND NVME_IO_COMMAND
struct _ADMIN_IDENTIFY_NAMESPACE ADMIN_IDENTIFY_NAMESPACE
struct _NVME_COMPLETION NVME_COMPLETION
The main structure of completion queue entry.
struct _DATASET_MANAGEMENT_RANGE DATASET_MANAGEMENT_RANGE
struct _IO_DATASET_MANAGEMENT_COMMAND_DW11 _IO_DATASET_MANAGEMENT_COMMAND_DW11
struct _ADMIN_CREATE_IO_CQ_DW11 ADMIN_CREATE_IO_CQ_DW11
struct _DATASET_MANAGEMENT_CONTEXT_ATTRIBUTES DATASET_MANAGEMENT_CONTEXT_ATTRIBUTES
struct _ADMIN_SET_FEATURES_NUMBER_OF_QUEUES_DW11 ADMIN_SET_FEATURES_NUMBER_OF_QUEUES_DW11
struct _IO_READ_COMMAND_DW15 IO_READ_COMMAND_DW15
struct _ADMIN_IDENTIFY_CONTROLLER ADMIN_IDENTIFY_CONTROLLER
struct _ADMIN_IDENTIFY_COMMAND_DW10 ADMIN_IDENTIFY_COMMAND_DW10
struct _NVME_IO_SQ_STATUS NVME_IO_SQ_STATUS
struct _ADMIN_GET_FEATURES_DW10 ADMIN_GET_FEATURES_DW10
struct _IO_READ_COMMAND_DW13 IO_READ_COMMAND_DW13
struct _ADMIN_CREATE_IO_CQ_DW10 ADMIN_CREATE_IO_CQ_DW10
struct _ADMIN_SET_FEATURES_NUMBER_OF_QUEUES_COMPLETE ADMIN_SET_FEATURES_NUMBER_OF_QUEUES_COMPLETE
struct _IO_WRITE_COMMAND_DW13 IO_WRITE_COMMAND_DW13
struct _NVME_ADMIN_QUEUE_STATUS NVME_ADMIN_QUEUE_STATUS
struct _NVME_COMMAND NVME_COMMAND
struct _ADMIN_DELETE_IO_CQ_DW10 ADMIN_DELETE_IO_CQ_DW10
struct _IO_WRITE_COMMAND_DW12 IO_WRITE_COMMAND_DW12
struct _IO_WRITE_COMMAND_DW15 IO_WRITE_COMMAND_DW15
struct _ADMIN_IDENTIFY_FORMAT_DATA ADMIN_IDENTIFY_FORMAT_DATA
unsigned char reserved1[2]
unsigned short supportsFirmwareActivateFirmwareDownload
struct _ADMIN_IDENTIFY_CONTROLLER::@129 LPA
struct _ADMIN_IDENTIFY_CONTROLLER::@128 FRMW
struct _ADMIN_IDENTIFY_CONTROLLER::@131 CQES
unsigned char reserved0[176]
ADMIN_IDENTIFY_POWER_STATE_DESCRIPTOR PSDx[32]
unsigned char supportsSMARTHealthInformationLogPage
unsigned int supportsSGLBitBucketDescriptor
unsigned char supportsCryptographicErase
unsigned char suppottsCommandEffectsLogPage
struct _ADMIN_IDENTIFY_CONTROLLER::@130 SQES
struct _ADMIN_IDENTIFY_CONTROLLER::@133 FUSES
unsigned short supportsDataSetManagement
struct _ADMIN_IDENTIFY_CONTROLLER::@127 OACS
unsigned char reserved3[246]
unsigned char reserved8[164]
unsigned char supportedNumberOfFirmwareSlots
unsigned char maximumSubmissionQueueEntrySize
unsigned char reserved9[1344]
unsigned short supportsFormatNVM
unsigned short supportsCompare
struct _ADMIN_IDENTIFY_CONTROLLER::@135 VWC
unsigned char maximumCompletionQueueEntrySize
unsigned char firstFirmwareSlotReadOnly
unsigned short supportsWriteUncorrectable
unsigned char secureEraseAppliesToAllNamespaces
unsigned char reserved4[2]
struct _ADMIN_IDENTIFY_CONTROLLER::@136 SGLS
unsigned short supportsSecuritySendSecurityReceive
struct _ADMIN_IDENTIFY_CONTROLLER::@132 ONCS
unsigned char reserved7[2]
unsigned short supportsCompareWrite
struct _ADMIN_IDENTIFY_CONTROLLER::@134 FNA
unsigned char requiredCompletionQueueEntrySize
unsigned char formatAppliesToAllNamespaces
unsigned char requiredSubmissionQueueEntrySize
struct _ADMIN_IDENTIFY_NAMESPACE::@141 DPS
unsigned char supportsThinProvisioning
unsigned char supportsWriteExclusiveRegistrants
unsigned char protectionEnabled
unsigned char supportsPersistThroughPowerLoss
unsigned char supportedCombination
unsigned char supportsMetadataAtEndOfLBA
struct _ADMIN_IDENTIFY_NAMESPACE::@137 NSFEAT
unsigned char supportsWriteExclusiveReservation
unsigned char supportsExclusiveAccessAllRegistrants
unsigned char supportsMultipathIOSharing
unsigned char supportsExclusiveAccessRegistrants
struct _ADMIN_IDENTIFY_NAMESPACE::@143 RESCAP
struct _ADMIN_IDENTIFY_NAMESPACE::@142 NMIC
unsigned char supportsProtectionType1
unsigned char supportsProtectionLast8
struct _ADMIN_IDENTIFY_NAMESPACE::@139 MC
unsigned char supportsMetadataAsSeperate
unsigned char supportsWriteExclusiveAllRegistrants
struct _ADMIN_IDENTIFY_NAMESPACE::@138 FLBAS
unsigned char protectionInFirst8
unsigned char supportsProtectionFirst8
ADMIN_IDENTIFY_FORMAT_DATA LBAFx[16]
unsigned char supportsProtectionType2
unsigned char supportsMetadataAsPartOfLBA
unsigned char reserved1[192]
struct _ADMIN_IDENTIFY_NAMESPACE::@140 DPC
unsigned char supportsProtectionType3
unsigned int reserved6[4]
unsigned char reserved0[2]
unsigned int CommandAccessSize
unsigned int startingLBA[2]
DATASET_MANAGEMENT_CONTEXT_ATTRIBUTES ContextAttributes
unsigned int lengthInLogicalBlocks
unsigned char reserved0[3]
unsigned char AccessLatency
unsigned char SequentialRequest
unsigned char AccessFrequency
struct _IO_READ_COMMAND_DW13::@161::@163::@165 DSM
unsigned char Incompressible
unsigned char SequentialRequest
unsigned char reserved0[3]
struct _IO_WRITE_COMMAND_DW13::@148::@150::@152 DSM
unsigned char AccessFrequency
unsigned char Incompressible
unsigned char AccessLatency
unsigned int reserved1[2]
unsigned short cmdSlotTag
unsigned int cmdDword[16]
The main structure of completion queue entry.
struct _NVME_COMPLETION::@72::@74::@76::@78 statusField
unsigned short statusFieldWord
unsigned int reserved1[2]
unsigned int pcieBaseAddrH
unsigned int pcieBaseAddrL
unsigned int pcieBaseAddrH
unsigned int pcieBaseAddrL
NVME_IO_SQ_STATUS ioSqInfo[MAX_NUM_OF_IO_SQ]
unsigned short numOfIOSubmissionQueuesAllocated
NVME_IO_CQ_STATUS ioCqInfo[MAX_NUM_OF_IO_CQ]
unsigned short numOfIOCompletionQueuesAllocated
NVME_ADMIN_QUEUE_STATUS adminQueueInfo