mirror of
https://git.missingno.dev/kolibrios-nvme-driver/
synced 2025-02-07 04:36:50 +01:00
add some more constants and rename some CQ_ENTRY fields
This commit is contained in:
parent
0dd5162d23
commit
652c024779
@ -116,6 +116,46 @@ CC_CRIME = 1 shl 24
|
||||
CC_DEFAULT_IOSQES = 6 shl 16
|
||||
CC_DEFAULT_IOCQES = 4 shl 16
|
||||
|
||||
; Completion Queue Entry Status Field Values
|
||||
CQ_PHASE_TAG = 1 shl 0
|
||||
CQ_STATUS_SC = 0xfe
|
||||
CQ_STATUS_SCT = (1 shl 9) or (1 shl 10) or (1 shl 11)
|
||||
CQ_STATUS_CRD = (1 shl 12) or (1 shl 13)
|
||||
CQ_STATUS_M = 1 shl 14
|
||||
CQ_STATUS_DNR = 1 shl 15
|
||||
|
||||
; Completion Queue Entry Status Field - Status Code Type Values
|
||||
CQ_STATUS_SCT_GCS = 0x0 ; Generic Command Status
|
||||
CQ_STATUS_SCT_CSS = 0x1 ; Command Specific Status
|
||||
CQ_STATUS_SCT_MADIE = 0x2 ; Media and Data Integrity Errors
|
||||
CQ_STATUS_SCT_PRS = 0x3 ; Path Related Status
|
||||
|
||||
; Completion Queue Entry Status Field - Status Code Generic Command Values
|
||||
CQ_STATUS_SC_GCS_SUCCESS = 0x00 ; Successful Completion
|
||||
CQ_STATUS_SC_GCS_ICOP = 0x01 ; Invalid Command Opcode
|
||||
CQ_STATUS_SC_GCS_IFIC = 0x02 ; Invalid Field in Command
|
||||
CQ_STATUS_SC_GCS_CIDC = 0x03 ; Command ID Conflict
|
||||
CQ_STATUS_SC_GCS_DTE = 0x04 ; Data Transfer Error
|
||||
CQ_STATUS_SC_GCS_CAPLN = 0x05 ; Commands Aborted due to Power Loss Notification
|
||||
CQ_STATUS_SC_GCS_INERR = 0x06 ; Internal Error
|
||||
CQ_STATUS_SC_GCS_CAR = 0x07 ; Command Abort Requested
|
||||
CQ_STATUS_SC_GCS_CASQD = 0x08 ; Command Aborted due to SQ Deletion
|
||||
CQ_STATUS_SC_GCS_CAFFC = 0x09 ; Command Aborted due to Failed Fused Command
|
||||
CQ_STATUS_SC_GCS_CAMFC = 0x0A ; Command Aborted due to Missing Fused Command
|
||||
CQ_STATUS_SC_GCS_INNOF = 0x0B ; Invalid Namespace or Format
|
||||
CQ_STATUS_SC_GCS_CSE = 0x0C ; Command Sequence Error
|
||||
CQ_STATUS_SC_GCS_INSGL = 0x0D ; Invalid SGL Segment Descriptor
|
||||
CQ_STATUS_SC_GCS_INNSGL = 0x0E ; Invalid Number of SGL Descriptors
|
||||
CQ_STATUS_SC_GCS_OPDEN = 0x15 ; Operation Denied
|
||||
CQ_STATUS_SC_GCS_NSIWP = 0x20 ; Namespace is Write Protected
|
||||
CQ_STATUS_SC_GCS_CINT = 0x21 ; Command Interrupted
|
||||
CQ_STATUS_SC_GCS_TTE = 0x22 ; Transient Transport Error
|
||||
|
||||
; Completion Queue Entry Status Field - Status Code Media and Data Integrity Errors
|
||||
CQ_STATUS_SC_MADIE_WF = 0x80 ; Write Fault
|
||||
CQ_STATUS_SC_MADIE_URE = 0x81 ; Unrecovered Read Error
|
||||
CQ_STATUS_SC_MADIE_ACDEN = 0x86 ; Access Denied
|
||||
CQ_STATUS_SC_MADIE_DOULB = 0x87 ; Deallocated or Unwritten Logical Block
|
||||
|
||||
struct NVME_REG_MAP
|
||||
CAP rq 1 ; Controller Capabilities
|
||||
@ -152,9 +192,9 @@ ends
|
||||
struct CQ_ENTRY
|
||||
cdw0 dd ?
|
||||
dd ? ; reserved
|
||||
sq_head_ptr dw ?
|
||||
sq_identifier dw ?
|
||||
cmd dw ?
|
||||
sqhd dw ?
|
||||
sqid dw ?
|
||||
cid dw ?
|
||||
status dw ?
|
||||
ends
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user