MdePkg[all]  1.08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Nvme.h File Reference

Data Structures

struct  NVME_CAP
 
struct  NVME_VER
 
struct  NVME_CC
 
struct  NVME_CSTS
 
struct  NVME_AQA
 
struct  NVME_SQTDBL
 
struct  NVME_CQHDBL
 
struct  NVME_READ
 
struct  NVME_WRITE
 
struct  NVME_FLUSH
 
struct  NVME_WRITE_UNCORRECTABLE
 
struct  NVME_WRITE_ZEROES
 
struct  NVME_COMPARE
 
union  NVME_CMD
 
struct  NVME_PSDESCRIPTOR
 
struct  NVME_ADMIN_CONTROLLER_DATA
 
struct  NVME_LBAFORMAT
 
struct  NVME_ADMIN_NAMESPACE_DATA
 
struct  NVME_ADMIN_IDENTIFY
 
struct  NVME_ADMIN_CRIOCQ
 
struct  NVME_ADMIN_CRIOSQ
 
struct  NVME_ADMIN_DEIOCQ
 
struct  NVME_ADMIN_DEIOSQ
 
struct  NVME_ADMIN_ABORT
 
struct  NVME_ADMIN_FIRMWARE_ACTIVATE
 
struct  NVME_ADMIN_FIRMWARE_IMAGE_DOWNLOAD
 
struct  NVME_ADMIN_GET_FEATURES
 
struct  NVME_ADMIN_GET_LOG_PAGE
 
struct  NVME_ADMIN_SET_FEATURES
 
struct  NVME_ADMIN_FORMAT_NVM
 
struct  NVME_ADMIN_SECURITY_RECEIVE
 
struct  NVME_ADMIN_SECURITY_SEND
 
union  NVME_ADMIN_CMD
 
struct  NVME_RAW
 
union  NVME_PAYLOAD
 
struct  NVME_SQ
 
struct  NVME_CQ
 
struct  NVME_ACTIVE_FW_INFO
 
struct  NVME_FW_SLOT_INFO_LOG
 
struct  NVME_SMART_HEALTH_INFO_LOG
 

Macros

#define NVME_CAP_OFFSET   0x0000
 
#define NVME_VER_OFFSET   0x0008
 
#define NVME_INTMS_OFFSET   0x000c
 
#define NVME_INTMC_OFFSET   0x0010
 
#define NVME_CC_OFFSET   0x0014
 
#define NVME_CSTS_OFFSET   0x001c
 
#define NVME_NSSR_OFFSET   0x0020
 
#define NVME_AQA_OFFSET   0x0024
 
#define NVME_ASQ_OFFSET   0x0028
 
#define NVME_ACQ_OFFSET   0x0030
 
#define NVME_SQ0_OFFSET   0x1000
 
#define NVME_CQ0_OFFSET   0x1004
 
#define NVME_SQTDBL_OFFSET(QID, DSTRD)   0x1000 + ((2 * (QID)) * (4 << (DSTRD)))
 
#define NVME_CQHDBL_OFFSET(QID, DSTRD)   0x1000 + (((2 * (QID)) + 1) * (4 << (DSTRD)))
 
#define NVME_CC_SHN_NORMAL_SHUTDOWN   1
 
#define NVME_CC_SHN_ABRUPT_SHUTDOWN   2
 
#define NVME_CSTS_SHST_SHUTDOWN_OCCURRING   1
 
#define NVME_CSTS_SHST_SHUTDOWN_COMPLETED   2
 
#define NVME_ASQ   UINT64
 
#define NVME_ACQ   UINT64
 
#define NAMESPACE_MANAGEMENT_SUPPORTED   BIT3
 
#define FW_DOWNLOAD_ACTIVATE_SUPPORTED   BIT2
 
#define FORMAT_NVM_SUPPORTED   BIT1
 
#define SECURITY_SEND_RECEIVE_SUPPORTED   BIT0
 
#define LBAF_RP_BEST   00b
 
#define LBAF_RP_BETTER   01b
 
#define LBAF_RP_GOOD   10b
 
#define LBAF_RP_DEGRADED   11b
 
#define LID_ERROR_INFO   0x1
 
#define LID_SMART_INFO   0x2
 
#define LID_FW_SLOT_INFO   0x3
 
#define NVME_ADMIN_DEIOSQ_CMD   0x00
 
#define NVME_ADMIN_CRIOSQ_CMD   0x01
 
#define NVME_ADMIN_GET_LOG_PAGE_CMD   0x02
 
#define NVME_ADMIN_DEIOCQ_CMD   0x04
 
#define NVME_ADMIN_CRIOCQ_CMD   0x05
 
#define NVME_ADMIN_IDENTIFY_CMD   0x06
 
#define NVME_ADMIN_ABORT_CMD   0x08
 
#define NVME_ADMIN_SET_FEATURES_CMD   0x09
 
#define NVME_ADMIN_GET_FEATURES_CMD   0x0A
 
#define NVME_ADMIN_ASYNC_EVENT_REQUEST_CMD   0x0C
 
#define NVME_ADMIN_NAMESACE_MANAGEMENT_CMD   0x0D
 
#define NVME_ADMIN_FW_COMMIT_CMD   0x10
 
#define NVME_ADMIN_FW_IAMGE_DOWNLOAD_CMD   0x11
 
#define NVME_ADMIN_NAMESACE_ATTACHMENT_CMD   0x15
 
#define NVME_ADMIN_FORMAT_NVM_CMD   0x80
 
#define NVME_ADMIN_SECURITY_SEND_CMD   0x81
 
#define NVME_ADMIN_SECURITY_RECEIVE_CMD   0x82
 
#define NVME_IO_FLUSH_OPC   0
 
#define NVME_IO_WRITE_OPC   1
 
#define NVME_IO_READ_OPC   2
 

Enumerations

enum  NVME_ADMIN_COMMAND_OPCODE {
  DeleteIOSubmissionQueueOpcode = NVME_ADMIN_DEIOSQ_CMD, CreateIOSubmissionQueueOpcode = NVME_ADMIN_CRIOSQ_CMD, GetLogPageOpcode = NVME_ADMIN_GET_LOG_PAGE_CMD, DeleteIOCompletionQueueOpcode = NVME_ADMIN_DEIOCQ_CMD,
  CreateIOCompletionQueueOpcode = NVME_ADMIN_CRIOCQ_CMD, IdentifyOpcode = NVME_ADMIN_IDENTIFY_CMD, AbortOpcode = NVME_ADMIN_ABORT_CMD, SetFeaturesOpcode = NVME_ADMIN_SET_FEATURES_CMD,
  GetFeaturesOpcode = NVME_ADMIN_GET_FEATURES_CMD, AsyncEventRequestOpcode = NVME_ADMIN_ASYNC_EVENT_REQUEST_CMD, NamespaceManagementOpcode = NVME_ADMIN_NAMESACE_MANAGEMENT_CMD, FirmwareCommitOpcode = NVME_ADMIN_FW_COMMIT_CMD,
  FirmwareImageDownloadOpcode = NVME_ADMIN_FW_IAMGE_DOWNLOAD_CMD, NamespaceAttachmentOpcode = NVME_ADMIN_NAMESACE_ATTACHMENT_CMD, FormatNvmOpcode = NVME_ADMIN_FORMAT_NVM_CMD, SecuritySendOpcode = NVME_ADMIN_SECURITY_SEND_CMD,
  SecurityReceiveOpcode = NVME_ADMIN_SECURITY_RECEIVE_CMD
}
 
enum  NVME_ADMIN_IDENTIFY_CNS { IdentifyNamespaceCns = 0x0, IdentifyControllerCns = 0x1, IdentifyActiveNsListCns = 0x2 }
 
enum  NVME_FW_ACTIVATE_ACTION { ActivateActionReplace = 0x0, ActivateActionReplaceActivate = 0x1, ActivateActionActivate = 0x2 }
 
enum  NVME_FW_ACTIVATE_SLOT {
  FirmwareSlotCtrlChooses = 0x0, FirmwareSlot1 = 0x1, FirmwareSlot2 = 0x2, FirmwareSlot3 = 0x3,
  FirmwareSlot4 = 0x4, FirmwareSlot5 = 0x5, FirmwareSlot6 = 0x6, FirmwareSlot7 = 0x7
}
 
enum  NVME_LOG_ID { ErrorInfoLogID = LID_ERROR_INFO, SmartHealthInfoLogID = LID_SMART_INFO, FirmwareSlotInfoLogID = LID_FW_SLOT_INFO }
 

Detailed Description

Definitions based on NVMe spec. version 1.1.

(C) Copyright 2016 Hewlett Packard Enterprise Development LP
Copyright (c) 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Specification Reference:
NVMe Specification 1.1

Macro Definition Documentation

#define FORMAT_NVM_SUPPORTED   BIT1
#define FW_DOWNLOAD_ACTIVATE_SUPPORTED   BIT2
#define LBAF_RP_BEST   00b
#define LBAF_RP_BETTER   01b
#define LBAF_RP_DEGRADED   11b
#define LBAF_RP_GOOD   10b
#define LID_ERROR_INFO   0x1
#define LID_FW_SLOT_INFO   0x3
#define LID_SMART_INFO   0x2
#define NAMESPACE_MANAGEMENT_SUPPORTED   BIT3
#define NVME_ACQ   UINT64
#define NVME_ACQ_OFFSET   0x0030
#define NVME_ADMIN_ABORT_CMD   0x08
#define NVME_ADMIN_ASYNC_EVENT_REQUEST_CMD   0x0C
#define NVME_ADMIN_CRIOCQ_CMD   0x05
#define NVME_ADMIN_CRIOSQ_CMD   0x01
#define NVME_ADMIN_DEIOCQ_CMD   0x04
#define NVME_ADMIN_DEIOSQ_CMD   0x00
#define NVME_ADMIN_FORMAT_NVM_CMD   0x80
#define NVME_ADMIN_FW_COMMIT_CMD   0x10
#define NVME_ADMIN_FW_IAMGE_DOWNLOAD_CMD   0x11
#define NVME_ADMIN_GET_FEATURES_CMD   0x0A
#define NVME_ADMIN_GET_LOG_PAGE_CMD   0x02
#define NVME_ADMIN_IDENTIFY_CMD   0x06
#define NVME_ADMIN_NAMESACE_ATTACHMENT_CMD   0x15
#define NVME_ADMIN_NAMESACE_MANAGEMENT_CMD   0x0D
#define NVME_ADMIN_SECURITY_RECEIVE_CMD   0x82
#define NVME_ADMIN_SECURITY_SEND_CMD   0x81
#define NVME_ADMIN_SET_FEATURES_CMD   0x09
#define NVME_AQA_OFFSET   0x0024
#define NVME_ASQ   UINT64
#define NVME_ASQ_OFFSET   0x0028
#define NVME_CAP_OFFSET   0x0000
#define NVME_CC_OFFSET   0x0014
#define NVME_CC_SHN_ABRUPT_SHUTDOWN   2
#define NVME_CC_SHN_NORMAL_SHUTDOWN   1
#define NVME_CQ0_OFFSET   0x1004
#define NVME_CQHDBL_OFFSET (   QID,
  DSTRD 
)    0x1000 + (((2 * (QID)) + 1) * (4 << (DSTRD)))
#define NVME_CSTS_OFFSET   0x001c
#define NVME_CSTS_SHST_SHUTDOWN_COMPLETED   2
#define NVME_CSTS_SHST_SHUTDOWN_OCCURRING   1
#define NVME_INTMC_OFFSET   0x0010
#define NVME_INTMS_OFFSET   0x000c
#define NVME_IO_FLUSH_OPC   0
#define NVME_IO_READ_OPC   2
#define NVME_IO_WRITE_OPC   1
#define NVME_NSSR_OFFSET   0x0020
#define NVME_SQ0_OFFSET   0x1000
#define NVME_SQTDBL_OFFSET (   QID,
  DSTRD 
)    0x1000 + ((2 * (QID)) * (4 << (DSTRD)))
#define NVME_VER_OFFSET   0x0008
#define SECURITY_SEND_RECEIVE_SUPPORTED   BIT0

Enumeration Type Documentation

Enumerator
DeleteIOSubmissionQueueOpcode 
CreateIOSubmissionQueueOpcode 
GetLogPageOpcode 
DeleteIOCompletionQueueOpcode 
CreateIOCompletionQueueOpcode 
IdentifyOpcode 
AbortOpcode 
SetFeaturesOpcode 
GetFeaturesOpcode 
AsyncEventRequestOpcode 
NamespaceManagementOpcode 
FirmwareCommitOpcode 
FirmwareImageDownloadOpcode 
NamespaceAttachmentOpcode 
FormatNvmOpcode 
SecuritySendOpcode 
SecurityReceiveOpcode 
Enumerator
IdentifyNamespaceCns 
IdentifyControllerCns 
IdentifyActiveNsListCns 
Enumerator
ActivateActionReplace 
ActivateActionReplaceActivate 
ActivateActionActivate 
Enumerator
FirmwareSlotCtrlChooses 
FirmwareSlot1 
FirmwareSlot2 
FirmwareSlot3 
FirmwareSlot4 
FirmwareSlot5 
FirmwareSlot6 
FirmwareSlot7 
Enumerator
ErrorInfoLogID 
SmartHealthInfoLogID 
FirmwareSlotInfoLogID