2
0
mirror of https://git.missingno.dev/kolibrios-nvme-driver/ synced 2025-02-02 02:20:09 +01:00

remove unused code and fix sqytdbl_write

This commit is contained in:
Abdur-Rahman Mansoor 2024-06-04 13:47:08 -04:00
parent 4041563623
commit 80eac9303c

View File

@ -101,15 +101,6 @@ proc memset stdcall, p_data:dword, val:byte, sz:dword
endp
; Submit a Administrator Command in the Submission Queue
proc submit_admin_cmd stdcall, sq_ptr:dword, slot:dword
mov esi, [sq_ptr]
xor eax, eax
ret
endp
proc nvme_identify stdcall, pci:dword, slot:dword, nsid:dword, dptr:dword, cid:word, cns:byte
push esi
@ -304,10 +295,12 @@ proc nvme_init stdcall, pci:dword
jl .exit_fail
; Check Interrupt Mask Set/Clear
mov eax, dword [edi + NVME_MMIO.INTMS]
DEBUGF DBG_INFO, "(NVMe) INTMS: %x\n", eax
mov eax, dword [edi + NVME_MMIO.INTMC]
DEBUGF DBG_INFO, "(NVMe) INTMC: %x\n", eax
if 0
mov eax, dword [edi + NVME_MMIO.INTMS]
DEBUGF DBG_INFO, "(NVMe) INTMS: %x\n", eax
mov eax, dword [edi + NVME_MMIO.INTMC]
DEBUGF DBG_INFO, "(NVMe) INTMC: %x\n", eax
end if
; Configure AMS, MPS, CSS
mov eax, dword [edi + NVME_MMIO.CC]
@ -447,7 +440,6 @@ proc sqytdbl_write stdcall, pci:dword, y:byte, offset:dword
mov esi, [pci]
mov edi, [esi + pcidev.sq_ptr]
add edi, [offset]
mov esi, [esi + pcidev.mmio_ptr]
; 1000h + (2y * (4 << CAP.DSTRD))
mov ecx, dword [esi + pcidev.dstrd]
@ -460,6 +452,8 @@ proc sqytdbl_write stdcall, pci:dword, y:byte, offset:dword
add ebx, 0x1000
DEBUGF DBG_INFO, "(NVMe) Writing to submission queue 0x%x doorbell register\n", ebx
mov esi, [esi + pcidev.mmio_ptr]
DEBUGF DBG_INFO, "(NVMe) MMIO: %x\n", esi
mov dword [esi + ebx], edi ; Write to register
pop edi esi ebx
ret