2 Definitions based on NVMe spec. version 1.1.
4 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
5 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 @par Specification Reference:
15 NVMe Specification 1.1
25 // controller register offsets
27 #define NVME_CAP_OFFSET 0x0000 // Controller Capabilities
28 #define NVME_VER_OFFSET 0x0008 // Version
29 #define NVME_INTMS_OFFSET 0x000c // Interrupt Mask Set
30 #define NVME_INTMC_OFFSET 0x0010 // Interrupt Mask Clear
31 #define NVME_CC_OFFSET 0x0014 // Controller Configuration
32 #define NVME_CSTS_OFFSET 0x001c // Controller Status
33 #define NVME_NSSR_OFFSET 0x0020 // NVM Subsystem Reset
34 #define NVME_AQA_OFFSET 0x0024 // Admin Queue Attributes
35 #define NVME_ASQ_OFFSET 0x0028 // Admin Submission Queue Base Address
36 #define NVME_ACQ_OFFSET 0x0030 // Admin Completion Queue Base Address
37 #define NVME_SQ0_OFFSET 0x1000 // Submission Queue 0 (admin) Tail Doorbell
38 #define NVME_CQ0_OFFSET 0x1004 // Completion Queue 0 (admin) Head Doorbell
41 // These register offsets are defined as 0x1000 + (N * (4 << CAP.DSTRD))
42 // Get the doorbell stride bit shift value from the controller capabilities.
44 #define NVME_SQTDBL_OFFSET(QID, DSTRD) 0x1000 + ((2 * (QID)) * (4 << (DSTRD))) // Submission Queue y (NVM) Tail Doorbell
45 #define NVME_CQHDBL_OFFSET(QID, DSTRD) 0x1000 + (((2 * (QID)) + 1) * (4 << (DSTRD))) // Completion Queue y (NVM) Head Doorbell
51 // 3.1.1 Offset 00h: CAP - Controller Capabilities
54 UINT16 Mqes
; // Maximum Queue Entries Supported
55 UINT8 Cqr
:1; // Contiguous Queues Required
56 UINT8 Ams
:2; // Arbitration Mechanism Supported
60 UINT16 Nssrs
:1; // NVM Subsystem Reset Supported NSSRS
61 UINT16 Css
:4; // Command Sets Supported - Bit 37
69 // 3.1.2 Offset 08h: VS - Version
72 UINT16 Mnr
; // Minor version number
73 UINT16 Mjr
; // Major version number
77 // 3.1.5 Offset 14h: CC - Controller Configuration
80 UINT16 En
:1; // Enable
82 UINT16 Css
:3; // I/O Command Set Selected
83 UINT16 Mps
:4; // Memory Page Size
84 UINT16 Ams
:3; // Arbitration Mechanism Selected
85 UINT16 Shn
:2; // Shutdown Notification
86 UINT8 Iosqes
:4; // I/O Submission Queue Entry Size
87 UINT8 Iocqes
:4; // I/O Completion Queue Entry Size
90 #define NVME_CC_SHN_NORMAL_SHUTDOWN 1
91 #define NVME_CC_SHN_ABRUPT_SHUTDOWN 2
94 // 3.1.6 Offset 1Ch: CSTS - Controller Status
97 UINT32 Rdy
:1; // Ready
98 UINT32 Cfs
:1; // Controller Fatal Status
99 UINT32 Shst
:2; // Shutdown Status
100 UINT32 Nssro
:1; // NVM Subsystem Reset Occurred
103 #define NVME_CSTS_SHST_SHUTDOWN_OCCURRING 1
104 #define NVME_CSTS_SHST_SHUTDOWN_COMPLETED 2
106 // 3.1.8 Offset 24h: AQA - Admin Queue Attributes
109 UINT16 Asqs
:12; // Submission Queue Size
111 UINT16 Acqs
:12; // Completion Queue Size
116 // 3.1.9 Offset 28h: ASQ - Admin Submission Queue Base Address
118 #define NVME_ASQ UINT64
120 // 3.1.10 Offset 30h: ACQ - Admin Completion Queue Base Address
122 #define NVME_ACQ UINT64
125 // 3.1.11 Offset (1000h + ((2y) * (4 << CAP.DSTRD))): SQyTDBL - Submission Queue y Tail Doorbell
133 // 3.1.12 Offset (1000h + ((2y + 1) * (4 << CAP.DSTRD))): CQyHDBL - Completion Queue y Head Doorbell
141 // NVM command set structures
149 UINT64 Slba
; /* Starting Sector Address */
153 UINT16 Nlb
; /* Number of Sectors */
155 UINT16 Prinfo
:4; /* Protection Info Check */
156 UINT16 Fua
:1; /* Force Unit Access */
157 UINT16 Lr
:1; /* Limited Retry */
161 UINT32 Af
:4; /* Access Frequency */
162 UINT32 Al
:2; /* Access Latency */
163 UINT32 Sr
:1; /* Sequential Request */
164 UINT32 In
:1; /* Incompressible */
169 UINT32 Eilbrt
; /* Expected Initial Logical Block Reference Tag */
173 UINT16 Elbat
; /* Expected Logical Block Application Tag */
174 UINT16 Elbatm
; /* Expected Logical Block Application Tag Mask */
184 UINT64 Slba
; /* Starting Sector Address */
188 UINT16 Nlb
; /* Number of Sectors */
190 UINT16 Prinfo
:4; /* Protection Info Check */
191 UINT16 Fua
:1; /* Force Unit Access */
192 UINT16 Lr
:1; /* Limited Retry */
196 UINT32 Af
:4; /* Access Frequency */
197 UINT32 Al
:2; /* Access Latency */
198 UINT32 Sr
:1; /* Sequential Request */
199 UINT32 In
:1; /* Incompressible */
204 UINT32 Ilbrt
; /* Initial Logical Block Reference Tag */
208 UINT16 Lbat
; /* Logical Block Application Tag */
209 UINT16 Lbatm
; /* Logical Block Application Tag Mask */
219 UINT32 Flush
; /* Flush */
223 // Write Uncorrectable command
229 UINT64 Slba
; /* Starting LBA */
233 UINT32 Nlb
:16; /* Number of Logical Blocks */
235 } NVME_WRITE_UNCORRECTABLE
;
238 // Write Zeroes command
244 UINT64 Slba
; /* Starting LBA */
248 UINT16 Nlb
; /* Number of Logical Blocks */
250 UINT16 Prinfo
:4; /* Protection Info Check */
251 UINT16 Fua
:1; /* Force Unit Access */
252 UINT16 Lr
:1; /* Limited Retry */
260 UINT32 Ilbrt
; /* Initial Logical Block Reference Tag */
264 UINT16 Lbat
; /* Logical Block Application Tag */
265 UINT16 Lbatm
; /* Logical Block Application Tag Mask */
275 UINT64 Slba
; /* Starting LBA */
279 UINT16 Nlb
; /* Number of Logical Blocks */
281 UINT16 Prinfo
:4; /* Protection Info Check */
282 UINT16 Fua
:1; /* Force Unit Access */
283 UINT16 Lr
:1; /* Limited Retry */
291 UINT32 Eilbrt
; /* Expected Initial Logical Block Reference Tag */
295 UINT16 Elbat
; /* Expected Logical Block Application Tag */
296 UINT16 Elbatm
; /* Expected Logical Block Application Tag Mask */
303 NVME_WRITE_UNCORRECTABLE WriteUncorrectable
;
304 NVME_WRITE_ZEROES WriteZeros
;
305 NVME_COMPARE Compare
;
309 UINT16 Mp
; /* Maximum Power */
310 UINT8 Rsvd1
; /* Reserved as of Nvm Express 1.1 Spec */
311 UINT8 Mps
:1; /* Max Power Scale */
312 UINT8 Nops
:1; /* Non-Operational State */
313 UINT8 Rsvd2
:6; /* Reserved as of Nvm Express 1.1 Spec */
314 UINT32 Enlat
; /* Entry Latency */
315 UINT32 Exlat
; /* Exit Latency */
316 UINT8 Rrt
:5; /* Relative Read Throughput */
317 UINT8 Rsvd3
:3; /* Reserved as of Nvm Express 1.1 Spec */
318 UINT8 Rrl
:5; /* Relative Read Leatency */
319 UINT8 Rsvd4
:3; /* Reserved as of Nvm Express 1.1 Spec */
320 UINT8 Rwt
:5; /* Relative Write Throughput */
321 UINT8 Rsvd5
:3; /* Reserved as of Nvm Express 1.1 Spec */
322 UINT8 Rwl
:5; /* Relative Write Leatency */
323 UINT8 Rsvd6
:3; /* Reserved as of Nvm Express 1.1 Spec */
324 UINT8 Rsvd7
[16]; /* Reserved as of Nvm Express 1.1 Spec */
328 // Identify Controller Data
332 // Controller Capabilities and Features 0-255
334 UINT16 Vid
; /* PCI Vendor ID */
335 UINT16 Ssvid
; /* PCI sub-system vendor ID */
336 UINT8 Sn
[20]; /* Product serial number */
338 UINT8 Mn
[40]; /* Proeduct model number */
339 UINT8 Fr
[8]; /* Firmware Revision */
340 UINT8 Rab
; /* Recommended Arbitration Burst */
341 UINT8 Ieee_oui
[3]; /* Organization Unique Identifier */
342 UINT8 Cmic
; /* Multi-interface Capabilities */
343 UINT8 Mdts
; /* Maximum Data Transfer Size */
344 UINT8 Cntlid
[2]; /* Controller ID */
345 UINT8 Rsvd1
[176]; /* Reserved as of Nvm Express 1.1 Spec */
347 // Admin Command Set Attributes
349 UINT16 Oacs
; /* Optional Admin Command Support */
350 #define NAMESPACE_MANAGEMENT_SUPPORTED BIT3
351 #define FW_DOWNLOAD_ACTIVATE_SUPPORTED BIT2
352 #define FORMAT_NVM_SUPPORTED BIT1
353 #define SECURITY_SEND_RECEIVE_SUPPORTED BIT0
354 UINT8 Acl
; /* Abort Command Limit */
355 UINT8 Aerl
; /* Async Event Request Limit */
356 UINT8 Frmw
; /* Firmware updates */
357 UINT8 Lpa
; /* Log Page Attributes */
358 UINT8 Elpe
; /* Error Log Page Entries */
359 UINT8 Npss
; /* Number of Power States Support */
360 UINT8 Avscc
; /* Admin Vendor Specific Command Configuration */
361 UINT8 Apsta
; /* Autonomous Power State Transition Attributes */
362 UINT8 Rsvd2
[246]; /* Reserved as of Nvm Express 1.1 Spec */
364 // NVM Command Set Attributes
366 UINT8 Sqes
; /* Submission Queue Entry Size */
367 UINT8 Cqes
; /* Completion Queue Entry Size */
368 UINT16 Rsvd3
; /* Reserved as of Nvm Express 1.1 Spec */
369 UINT32 Nn
; /* Number of Namespaces */
370 UINT16 Oncs
; /* Optional NVM Command Support */
371 UINT16 Fuses
; /* Fused Operation Support */
372 UINT8 Fna
; /* Format NVM Attributes */
373 UINT8 Vwc
; /* Volatile Write Cache */
374 UINT16 Awun
; /* Atomic Write Unit Normal */
375 UINT16 Awupf
; /* Atomic Write Unit Power Fail */
376 UINT8 Nvscc
; /* NVM Vendor Specific Command Configuration */
377 UINT8 Rsvd4
; /* Reserved as of Nvm Express 1.1 Spec */
378 UINT16 Acwu
; /* Atomic Compare & Write Unit */
379 UINT16 Rsvd5
; /* Reserved as of Nvm Express 1.1 Spec */
380 UINT32 Sgls
; /* SGL Support */
381 UINT8 Rsvd6
[164]; /* Reserved as of Nvm Express 1.1 Spec */
383 // I/O Command set Attributes
385 UINT8 Rsvd7
[1344]; /* Reserved as of Nvm Express 1.1 Spec */
387 // Power State Descriptors
389 NVME_PSDESCRIPTOR PsDescriptor
[32];
391 UINT8 VendorData
[1024]; /* Vendor specific data */
392 } NVME_ADMIN_CONTROLLER_DATA
;
395 UINT16 Ms
; /* Metadata Size */
396 UINT8 Lbads
; /* LBA Data Size */
397 UINT8 Rp
:2; /* Relative Performance */
398 #define LBAF_RP_BEST 00b
399 #define LBAF_RP_BETTER 01b
400 #define LBAF_RP_GOOD 10b
401 #define LBAF_RP_DEGRADED 11b
402 UINT8 Rsvd1
:6; /* Reserved as of Nvm Express 1.1 Spec */
406 // Identify Namespace Data
410 // NVM Command Set Specific
412 UINT64 Nsze
; /* Namespace Size (total number of blocks in formatted namespace) */
413 UINT64 Ncap
; /* Namespace Capacity (max number of logical blocks) */
414 UINT64 Nuse
; /* Namespace Utilization */
415 UINT8 Nsfeat
; /* Namespace Features */
416 UINT8 Nlbaf
; /* Number of LBA Formats */
417 UINT8 Flbas
; /* Formatted LBA size */
418 UINT8 Mc
; /* Metadata Capabilities */
419 UINT8 Dpc
; /* End-to-end Data Protection capabilities */
420 UINT8 Dps
; /* End-to-end Data Protection Type Settings */
421 UINT8 Nmic
; /* Namespace Multi-path I/O and Namespace Sharing Capabilities */
422 UINT8 Rescap
; /* Reservation Capabilities */
423 UINT8 Rsvd1
[88]; /* Reserved as of Nvm Express 1.1 Spec */
424 UINT64 Eui64
; /* IEEE Extended Unique Identifier */
428 NVME_LBAFORMAT LbaFormat
[16];
430 UINT8 Rsvd2
[192]; /* Reserved as of Nvm Express 1.1 Spec */
431 UINT8 VendorData
[3712]; /* Vendor specific data */
432 } NVME_ADMIN_NAMESPACE_DATA
;
435 // NvmExpress Admin Identify Cmd
443 } NVME_ADMIN_IDENTIFY
;
446 // NvmExpress Admin Create I/O Completion Queue
452 UINT32 Qid
:16; /* Queue Identifier */
453 UINT32 Qsize
:16; /* Queue Size */
458 UINT32 Pc
:1; /* Physically Contiguous */
459 UINT32 Ien
:1; /* Interrupts Enabled */
460 UINT32 Rsvd1
:14; /* reserved as of Nvm Express 1.1 Spec */
461 UINT32 Iv
:16; /* Interrupt Vector for MSI-X or MSI*/
465 // NvmExpress Admin Create I/O Submission Queue
471 UINT32 Qid
:16; /* Queue Identifier */
472 UINT32 Qsize
:16; /* Queue Size */
477 UINT32 Pc
:1; /* Physically Contiguous */
478 UINT32 Qprio
:2; /* Queue Priority */
479 UINT32 Rsvd1
:13; /* Reserved as of Nvm Express 1.1 Spec */
480 UINT32 Cqid
:16; /* Completion Queue ID */
484 // NvmExpress Admin Delete I/O Completion Queue
495 // NvmExpress Admin Delete I/O Submission Queue
506 // NvmExpress Admin Abort Command
512 UINT32 Sqid
:16; /* Submission Queue identifier */
513 UINT32 Cid
:16; /* Command Identifier */
517 // NvmExpress Admin Firmware Activate Command
523 UINT32 Fs
:3; /* Submission Queue identifier */
524 UINT32 Aa
:2; /* Command Identifier */
526 } NVME_ADMIN_FIRMWARE_ACTIVATE
;
529 // NvmExpress Admin Firmware Image Download Command
535 UINT32 Numd
; /* Number of Dwords */
539 UINT32 Ofst
; /* Offset */
540 } NVME_ADMIN_FIRMWARE_IMAGE_DOWNLOAD
;
543 // NvmExpress Admin Get Features Command
549 UINT32 Fid
:8; /* Feature Identifier */
550 UINT32 Sel
:3; /* Select */
552 } NVME_ADMIN_GET_FEATURES
;
555 // NvmExpress Admin Get Log Page Command
561 UINT32 Lid
:8; /* Log Page Identifier */
562 #define LID_ERROR_INFO 0x1
563 #define LID_SMART_INFO 0x2
564 #define LID_FW_SLOT_INFO 0x3
566 UINT32 Numd
:12; /* Number of Dwords */
567 UINT32 Rsvd2
:4; /* Reserved as of Nvm Express 1.1 Spec */
568 } NVME_ADMIN_GET_LOG_PAGE
;
571 // NvmExpress Admin Set Features Command
577 UINT32 Fid
:8; /* Feature Identifier */
579 UINT32 Sv
:1; /* Save */
580 } NVME_ADMIN_SET_FEATURES
;
583 // NvmExpress Admin Format NVM Command
589 UINT32 Lbaf
:4; /* LBA Format */
590 UINT32 Ms
:1; /* Metadata Settings */
591 UINT32 Pi
:3; /* Protection Information */
592 UINT32 Pil
:1; /* Protection Information Location */
593 UINT32 Ses
:3; /* Secure Erase Settings */
595 } NVME_ADMIN_FORMAT_NVM
;
598 // NvmExpress Admin Security Receive Command
605 UINT32 Spsp
:16; /* SP Specific */
606 UINT32 Secp
:8; /* Security Protocol */
610 UINT32 Al
; /* Allocation Length */
611 } NVME_ADMIN_SECURITY_RECEIVE
;
614 // NvmExpress Admin Security Send Command
621 UINT32 Spsp
:16; /* SP Specific */
622 UINT32 Secp
:8; /* Security Protocol */
626 UINT32 Tl
; /* Transfer Length */
627 } NVME_ADMIN_SECURITY_SEND
;
630 NVME_ADMIN_IDENTIFY Identify
;
631 NVME_ADMIN_CRIOCQ CrIoCq
;
632 NVME_ADMIN_CRIOSQ CrIoSq
;
633 NVME_ADMIN_DEIOCQ DeIoCq
;
634 NVME_ADMIN_DEIOSQ DeIoSq
;
635 NVME_ADMIN_ABORT Abort
;
636 NVME_ADMIN_FIRMWARE_ACTIVATE Activate
;
637 NVME_ADMIN_FIRMWARE_IMAGE_DOWNLOAD FirmwareImageDownload
;
638 NVME_ADMIN_GET_FEATURES GetFeatures
;
639 NVME_ADMIN_GET_LOG_PAGE GetLogPage
;
640 NVME_ADMIN_SET_FEATURES SetFeatures
;
641 NVME_ADMIN_FORMAT_NVM FormatNvm
;
642 NVME_ADMIN_SECURITY_RECEIVE SecurityReceive
;
643 NVME_ADMIN_SECURITY_SEND SecuritySend
;
656 NVME_ADMIN_CMD Admin
; // Union of Admin commands
657 NVME_CMD Nvm
; // Union of Nvm commands
666 // CDW 0, Common to all comnmands
669 UINT8 Fuse
:2; // Fused Operation
671 UINT8 Psdt
:1; // PRP or SGL for Data Transfer
672 UINT16 Cid
; // Command Identifier
677 UINT32 Nsid
; // Namespace Identifier
687 UINT64 Mptr
; // Metadata Pointer
692 UINT64 Prp
[2]; // First and second PRP entries
694 NVME_PAYLOAD Payload
;
713 UINT16 Sqhd
; // Submission Queue Head Pointer
714 UINT16 Sqid
; // Submission Queue Identifier
718 UINT16 Cid
; // Command Identifier
719 UINT16 Pt
:1; // Phase Tag
720 UINT16 Sc
:8; // Status Code
721 UINT16 Sct
:3; // Status Code Type
724 UINT16 Dnr
:1; // Do Not Retry
728 // Nvm Express Admin cmd opcodes
730 #define NVME_ADMIN_DEIOSQ_CMD 0x00
731 #define NVME_ADMIN_CRIOSQ_CMD 0x01
732 #define NVME_ADMIN_GET_LOG_PAGE_CMD 0x02
733 #define NVME_ADMIN_DEIOCQ_CMD 0x04
734 #define NVME_ADMIN_CRIOCQ_CMD 0x05
735 #define NVME_ADMIN_IDENTIFY_CMD 0x06
736 #define NVME_ADMIN_ABORT_CMD 0x08
737 #define NVME_ADMIN_SET_FEATURES_CMD 0x09
738 #define NVME_ADMIN_GET_FEATURES_CMD 0x0A
739 #define NVME_ADMIN_ASYNC_EVENT_REQUEST_CMD 0x0C
740 #define NVME_ADMIN_NAMESACE_MANAGEMENT_CMD 0x0D
741 #define NVME_ADMIN_FW_COMMIT_CMD 0x10
742 #define NVME_ADMIN_FW_IAMGE_DOWNLOAD_CMD 0x11
743 #define NVME_ADMIN_NAMESACE_ATTACHMENT_CMD 0x15
744 #define NVME_ADMIN_FORMAT_NVM_CMD 0x80
745 #define NVME_ADMIN_SECURITY_SEND_CMD 0x81
746 #define NVME_ADMIN_SECURITY_RECEIVE_CMD 0x82
748 #define NVME_IO_FLUSH_OPC 0
749 #define NVME_IO_WRITE_OPC 1
750 #define NVME_IO_READ_OPC 2
753 DeleteIOSubmissionQueueOpcode
= NVME_ADMIN_DEIOSQ_CMD
,
754 CreateIOSubmissionQueueOpcode
= NVME_ADMIN_CRIOSQ_CMD
,
755 GetLogPageOpcode
= NVME_ADMIN_GET_LOG_PAGE_CMD
,
756 DeleteIOCompletionQueueOpcode
= NVME_ADMIN_DEIOCQ_CMD
,
757 CreateIOCompletionQueueOpcode
= NVME_ADMIN_CRIOCQ_CMD
,
758 IdentifyOpcode
= NVME_ADMIN_IDENTIFY_CMD
,
759 AbortOpcode
= NVME_ADMIN_ABORT_CMD
,
760 SetFeaturesOpcode
= NVME_ADMIN_SET_FEATURES_CMD
,
761 GetFeaturesOpcode
= NVME_ADMIN_GET_FEATURES_CMD
,
762 AsyncEventRequestOpcode
= NVME_ADMIN_ASYNC_EVENT_REQUEST_CMD
,
763 NamespaceManagementOpcode
= NVME_ADMIN_NAMESACE_MANAGEMENT_CMD
,
764 FirmwareCommitOpcode
= NVME_ADMIN_FW_COMMIT_CMD
,
765 FirmwareImageDownloadOpcode
= NVME_ADMIN_FW_IAMGE_DOWNLOAD_CMD
,
766 NamespaceAttachmentOpcode
= NVME_ADMIN_NAMESACE_ATTACHMENT_CMD
,
767 FormatNvmOpcode
= NVME_ADMIN_FORMAT_NVM_CMD
,
768 SecuritySendOpcode
= NVME_ADMIN_SECURITY_SEND_CMD
,
769 SecurityReceiveOpcode
= NVME_ADMIN_SECURITY_RECEIVE_CMD
770 } NVME_ADMIN_COMMAND_OPCODE
;
773 // Controller or Namespace Structure (CNS) field
774 // (ref. spec. v1.1 figure 82).
777 IdentifyNamespaceCns
= 0x0,
778 IdentifyControllerCns
= 0x1,
779 IdentifyActiveNsListCns
= 0x2
780 } NVME_ADMIN_IDENTIFY_CNS
;
784 // (ref. spec. 1.1 figure 60).
787 ActivateActionReplace
= 0x0,
788 ActivateActionReplaceActivate
= 0x1,
789 ActivateActionActivate
= 0x2
790 } NVME_FW_ACTIVATE_ACTION
;
794 // (ref. spec. 1.1 Figure 60).
797 FirmwareSlotCtrlChooses
= 0x0,
805 } NVME_FW_ACTIVATE_SLOT
;
808 // Get Log Page ? Log Page Identifiers
809 // (ref. spec. v1.1 Figure 73).
812 ErrorInfoLogID
= LID_ERROR_INFO
,
813 SmartHealthInfoLogID
= LID_SMART_INFO
,
814 FirmwareSlotInfoLogID
= LID_FW_SLOT_INFO
818 // Get Log Page ? Firmware Slot Information Log
819 // (ref. spec. v1.1 Figure 77).
823 // Indicates the firmware slot from which the actively running firmware revision was loaded.
825 UINT8 ActivelyRunningFwSlot
:3;
828 // Indicates the firmware slot that is going to be activated at the next controller reset. If this field is 0h, then the controller does not indicate the firmware slot that is going to be activated at the next controller reset.
830 UINT8 NextActiveFwSlot
:3;
832 } NVME_ACTIVE_FW_INFO
;
835 // Get Log Page ? Firmware Slot Information Log
836 // (ref. spec. v1.1 Figure 77).
840 // Specifies information about the active firmware revision.
842 NVME_ACTIVE_FW_INFO ActiveFwInfo
;
845 // Contains the revision of the firmware downloaded to firmware slot 1/7. If no valid firmware revision is present or if this slot is unsupported, all zeros shall be returned.
847 CHAR8 FwRevisionSlot
[7][8];
848 UINT8 Reserved2
[448];
849 } NVME_FW_SLOT_INFO_LOG
;
852 // SMART / Health Information (Log Identifier 02h)
853 // (ref. spec. v1.1 5.10.1.2)
857 // This field indicates critical warnings for the state of the controller.
859 UINT8 CriticalWarningAvailableSpare
:1;
860 UINT8 CriticalWarningTemperature
:1;
861 UINT8 CriticalWarningReliability
:1;
862 UINT8 CriticalWarningMediaReadOnly
:1;
863 UINT8 CriticalWarningVolatileBackup
:1;
864 UINT8 CriticalWarningReserved
:3;
866 // Contains a value corresponding to a temperature in degrees Kelvin that represents the current composite temperature of the controller and namespace(s) associated with that controller. The manner in which this value is computed is implementation specific and may not represent the actual temperature of any physical point in the NVM subsystem.
868 UINT16 CompositeTemp
;
870 // Contains a normalized percentage (0 to 100%) of the remaining spare capacity available.
872 UINT8 AvailableSpare
;
874 // When the Available Spare falls below the threshold indicated in this field, an asynchronous event completion may occur. The value is indicated as a normalized percentage (0 to 100%).
876 UINT8 AvailableSpareThreshold
;
878 // Contains a vendor specific estimate of the percentage of NVM subsystem life used based on the actual usage and the manufacturer?s prediction of NVM life. A value of 100 indicates that the estimated endurance of the NVM in the NVM subsystem has been consumed, but may not indicate an NVM subsystem failure. The value is allowed to exceed 100. Percentages greater than 254 shall be represented as 255. This value shall be updated once per power-on hour (when the controller is not in a sleep state).
880 UINT8 PercentageUsed
;
883 // Contains the number of 512 byte data units the host has read from the controller; this value does not include metadata.
885 UINT8 DataUnitsRead
[16];
887 // Contains the number of 512 byte data units the host has written to the controller; this value does not include metadata.
889 UINT8 DataUnitsWritten
[16];
891 // Contains the number of read commands completed by the controller.
893 UINT8 HostReadCommands
[16];
895 // Contains the number of write commands completed by the controller.
897 UINT8 HostWriteCommands
[16];
899 // Contains the amount of time the controller is busy with I/O commands. This value is reported in minutes.
901 UINT8 ControllerBusyTime
[16];
903 // Contains the number of power cycles.
905 UINT8 PowerCycles
[16];
907 // Contains the number of power-on hours.
909 UINT8 PowerOnHours
[16];
911 // Contains the number of unsafe shutdowns.
913 UINT8 UnsafeShutdowns
[16];
915 // Contains the number of occurrences where the controller detected an unrecovered data integrity error.
917 UINT8 MediaAndDataIntegrityErrors
[16];
919 // Contains the number of Error Information log entries over the life of the controller.
921 UINT8 NumberErrorInformationLogEntries
[16];
923 // Contains the amount of time in minutes that the controller is operational and the Composite Temperature is greater than or equal to the Warning Composite Temperature Threshold (WCTEMP) field and less than the Critical Composite Temperature Threshold (CCTEMP) field in the Identify Controller data structure in Figure 90.
925 UINT32 WarningCompositeTemperatureTime
;
927 // Contains the amount of time in minutes that the controller is operational and the Composite Temperature is greater the Critical Composite Temperature Threshold (CCTEMP) field in the Identify Controller data structure in Figure 90.
929 UINT32 CriticalCompositeTemperatureTime
;
931 // Contains the current temperature in degrees Kelvin reported by the temperature sensor. An implementation that does not implement the temperature sensor reports a temperature of zero degrees Kelvin.
933 UINT16 TemperatureSensor
[8];
934 UINT8 Reserved2
[296];
935 } NVME_SMART_HEALTH_INFO_LOG
;