apply fixes mentioned by @Sweetbread and @Doczom

This commit is contained in:
2024-08-21 13:39:17 -04:00
parent d4441724ce
commit 0aace3dc73
3 changed files with 35 additions and 40 deletions

View File

@@ -131,7 +131,6 @@ proc set_features stdcall, pci:dword, prp1:dword, fid:byte, cdw11:dword
mov eax, [prp1] mov eax, [prp1]
mov dword [esp + SQ_ENTRY.prp1], eax mov dword [esp + SQ_ENTRY.prp1], eax
movzx eax, [fid] movzx eax, [fid]
;or eax, 1 shl 31 ; CDW10.SV
mov dword [esp + SQ_ENTRY.cdw10], eax mov dword [esp + SQ_ENTRY.cdw10], eax
mov eax, [cdw11] mov eax, [cdw11]
mov dword [esp + SQ_ENTRY.cdw11], eax mov dword [esp + SQ_ENTRY.cdw11], eax

View File

@@ -8,7 +8,7 @@
;; ;; ;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
format PE DLL native format PE DLL native 0.05
entry START entry START
API_VERSION = 0 ;debug API_VERSION = 0 ;debug
@@ -463,7 +463,6 @@ proc nvme_readwrite stdcall, ns:dword, buf:dword, start_sector:qword, numsectors
mov eax, [numsectors_ptr] mov eax, [numsectors_ptr]
mov eax, dword [eax] mov eax, dword [eax]
DEBUGF DBG_INFO, "buf: %x, start_sector: %u:%u, numsectors: %u\n", [buf], [start_sector + 4], [start_sector], eax
mov dword [ebx + 4], 0 ; PRP2 entry (0 by default) mov dword [ebx + 4], 0 ; PRP2 entry (0 by default)
mov dword [ebx + 8], edx ; command type (read or write) mov dword [ebx + 8], edx ; command type (read or write)
mov dword [ebx + 12], eax ; save original numsectors value mov dword [ebx + 12], eax ; save original numsectors value
@@ -479,7 +478,6 @@ proc nvme_readwrite stdcall, ns:dword, buf:dword, start_sector:qword, numsectors
test eax, eax test eax, eax
jz .fail jz .fail
DEBUGF DBG_INFO, "PRP1: %x, PRP2: %x\n", [ebx], [ebx + 4]
mov eax, dword [start_sector] mov eax, dword [start_sector]
; According to the NVMe specification, the NLB field in the I/O read and write ; According to the NVMe specification, the NLB field in the I/O read and write
@@ -1136,7 +1134,6 @@ proc cqyhdbl_write stdcall, pci:dword, y:dword, cqh:dword
mov edi, dword [esi + pcidev.queue_entries] mov edi, dword [esi + pcidev.queue_entries]
lea edi, dword [edi + ecx] lea edi, dword [edi + ecx]
mov eax, [cqh] mov eax, [cqh]
DEBUGF DBG_INFO, "nvme%u: Writing to CQ%u doorbell register 0x%x: %u\n", [esi + pcidev.num], [y], dx, ax
mov esi, dword [esi + pcidev.io_addr] mov esi, dword [esi + pcidev.io_addr]
mov word [esi + edx], ax ; Write to CQyHDBL mov word [esi + edx], ax ; Write to CQyHDBL
mov word [edi + NVM_QUEUE_ENTRY.head], ax mov word [edi + NVM_QUEUE_ENTRY.head], ax
@@ -1194,7 +1191,6 @@ proc sqytdbl_write stdcall, pci:dword, y:word, cmd:dword
shl edx, cl shl edx, cl
imul edx, ebx imul edx, ebx
add edx, 0x1000 add edx, 0x1000
DEBUGF DBG_INFO, "nvme%u: Writing to SQ%u doorbell register 0x%x: %u\n", [esi + pcidev.num], [y], dx, ax
mov word [edi + NVM_QUEUE_ENTRY.tail], ax mov word [edi + NVM_QUEUE_ENTRY.tail], ax
mov esi, dword [esi + pcidev.io_addr] mov esi, dword [esi + pcidev.io_addr]
mov word [esi + edx], ax mov word [esi + edx], ax

View File

@@ -372,7 +372,7 @@ struct IDENTC
vid dw ? vid dw ?
ssvid dw ? ssvid dw ?
sn dt ?, ? sn dt ?, ?
mn dt ?, ?, ?, ? mn rt 4
fr dq ? fr dq ?
rab db ? rab db ?
ieee db ?, ?, ? ieee db ?, ?, ?
@@ -445,41 +445,41 @@ struct IDENTC
sgls dd ? sgls dd ?
mnan dd ? mnan dd ?
rb 224 rb 224
subnqn dq ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? subnqn rq 32
rb 768 rb 768
rb 256 rb 256
psd0 dq ?, ?, ?, ? psd0 rq 4
psd1 dq ?, ?, ?, ? psd1 rq 4
psd2 dq ?, ?, ?, ? psd2 rq 4
psd3 dq ?, ?, ?, ? psd3 rq 4
psd4 dq ?, ?, ?, ? psd4 rq 4
psd5 dq ?, ?, ?, ? psd5 rq 4
psd6 dq ?, ?, ?, ? psd6 rq 4
psd7 dq ?, ?, ?, ? psd7 rq 4
psd8 dq ?, ?, ?, ? psd8 rq 4
psd9 dq ?, ?, ?, ? psd9 rq 4
psd10 dq ?, ?, ?, ? psd10 rq 4
psd11 dq ?, ?, ?, ? psd11 rq 4
psd12 dq ?, ?, ?, ? psd12 rq 4
psd13 dq ?, ?, ?, ? psd13 rq 4
psd14 dq ?, ?, ?, ? psd14 rq 4
psd15 dq ?, ?, ?, ? psd15 rq 4
psd16 dq ?, ?, ?, ? psd16 rq 4
psd17 dq ?, ?, ?, ? psd17 rq 4
psd18 dq ?, ?, ?, ? psd18 rq 4
psd19 dq ?, ?, ?, ? psd19 rq 4
psd20 dq ?, ?, ?, ? psd20 rq 4
psd21 dq ?, ?, ?, ? psd21 rq 4
psd22 dq ?, ?, ?, ? psd22 rq 4
psd23 dq ?, ?, ?, ? psd23 rq 4
psd24 dq ?, ?, ?, ? psd24 rq 4
psd25 dq ?, ?, ?, ? psd25 rq 4
psd26 dq ?, ?, ?, ? psd26 rq 4
psd27 dq ?, ?, ?, ? psd27 rq 4
psd28 dq ?, ?, ?, ? psd28 rq 4
psd29 dq ?, ?, ?, ? psd29 rq 4
psd30 dq ?, ?, ?, ? psd30 rq 4
psd31 dq ?, ?, ?, ? psd31 rq 4
rb 1024 rb 1024
ends ends