mirror of
https://git.missingno.dev/kolibrios-nvme-driver/
synced 2025-01-03 11:25:55 +01:00
fix: comment out excessive debug lines
Printing too many messages to the screen much causes KolibriOS to crash, so we have to remove them for now
This commit is contained in:
parent
603a48e351
commit
b4d3c82480
@ -179,7 +179,6 @@ proc is_active_namespace stdcall, pci:dword, nsid:dword
|
|||||||
@@:
|
@@:
|
||||||
mov esi, eax
|
mov esi, eax
|
||||||
invoke GetPhysAddr
|
invoke GetPhysAddr
|
||||||
DEBUGF DBG_INFO, "Identify Namespace: %u\n", [nsid]
|
|
||||||
stdcall nvme_identify, [pci], [nsid], eax, CNS_IDNS
|
stdcall nvme_identify, [pci], [nsid], eax, CNS_IDNS
|
||||||
xor ecx, ecx
|
xor ecx, ecx
|
||||||
|
|
||||||
@ -192,16 +191,13 @@ proc is_active_namespace stdcall, pci:dword, nsid:dword
|
|||||||
jne @b
|
jne @b
|
||||||
|
|
||||||
.not_active_nsid:
|
.not_active_nsid:
|
||||||
DEBUGF DBG_INFO, "Not an active NSID\n"
|
|
||||||
invoke KernelFree, esi
|
invoke KernelFree, esi
|
||||||
pop edi esi
|
pop edi esi
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.is_active_nsid:
|
.is_active_nsid:
|
||||||
;DEBUGF DBG_INFO, "ACTIVE NSID: %u\n", [nsid]
|
DEBUGF DBG_INFO, "(NVMe) Active NSID: %u\n", [nsid]
|
||||||
;cmp [nsid], 1
|
|
||||||
;jne @b
|
|
||||||
invoke KernelFree, esi
|
invoke KernelFree, esi
|
||||||
pop edi esi
|
pop edi esi
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
@ -717,6 +713,8 @@ proc nvme_init stdcall, pci:dword
|
|||||||
stdcall create_io_submission_queue, [pci], eax, 1, 1
|
stdcall create_io_submission_queue, [pci], eax, 1, 1
|
||||||
|
|
||||||
stdcall determine_active_nsids, [pci]
|
stdcall determine_active_nsids, [pci]
|
||||||
|
test eax, eax
|
||||||
|
jz .exit_fail ; No active NSIDS
|
||||||
|
|
||||||
DEBUGF DBG_INFO, "(NVMe) Successfully initialized driver!\n"
|
DEBUGF DBG_INFO, "(NVMe) Successfully initialized driver!\n"
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
@ -815,7 +813,7 @@ proc cqyhdbl_write stdcall, pci:dword, y:dword, cqh:word
|
|||||||
lea edi, dword [edi + ecx]
|
lea edi, dword [edi + ecx]
|
||||||
mov esi, dword [esi + pcidev.io_addr]
|
mov esi, dword [esi + pcidev.io_addr]
|
||||||
mov ax, [cqh]
|
mov ax, [cqh]
|
||||||
DEBUGF DBG_INFO, "(NVMe) Writing to completion queue doorbell register 0x%x: %u\n", dx, ax
|
;DEBUGF DBG_INFO, "(NVMe) Writing to completion queue doorbell register 0x%x: %u\n", dx, ax
|
||||||
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
|
||||||
pop edi esi
|
pop edi esi
|
||||||
@ -858,7 +856,7 @@ proc sqytdbl_write stdcall, pci:dword, y:word, cmd:dword
|
|||||||
shl dx, cl
|
shl dx, cl
|
||||||
imul dx, bx
|
imul dx, bx
|
||||||
add dx, 0x1000
|
add dx, 0x1000
|
||||||
DEBUGF DBG_INFO, "(NVMe) Writing to submission queue doorbell register 0x%x: %u\n", dx, ax
|
;DEBUGF DBG_INFO, "(NVMe) Writing to submission queue doorbell register 0x%x: %u\n", dx, 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
|
||||||
movzx ecx, [y]
|
movzx ecx, [y]
|
||||||
@ -948,6 +946,8 @@ proc is_queue_full stdcall, tail:word, head:word
|
|||||||
|
|
||||||
endp
|
endp
|
||||||
|
|
||||||
|
;proc consume_cq_entries stdcall,
|
||||||
|
|
||||||
proc irq_handler
|
proc irq_handler
|
||||||
|
|
||||||
push esi edi
|
push esi edi
|
||||||
@ -964,7 +964,7 @@ proc irq_handler
|
|||||||
mov esi, dword [esi + pcidev.queue_entries]
|
mov esi, dword [esi + pcidev.queue_entries]
|
||||||
movzx ecx, word [esi + NVM_QUEUE_ENTRY.head]
|
movzx ecx, word [esi + NVM_QUEUE_ENTRY.head]
|
||||||
movzx edx, word [esi + NVM_QUEUE_ENTRY.tail]
|
movzx edx, word [esi + NVM_QUEUE_ENTRY.tail]
|
||||||
DEBUGF DBG_INFO, "IRQ (head): 0x%x, (tail): 0x%x\n", cx, dx
|
;DEBUGF DBG_INFO, "IRQ (head): 0x%x, (tail): 0x%x\n", cx, dx
|
||||||
stdcall is_queue_full, edx, ecx
|
stdcall is_queue_full, edx, ecx
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jnz .end
|
jnz .end
|
||||||
@ -975,7 +975,7 @@ proc irq_handler
|
|||||||
mov esi, dword [esi + NVM_QUEUE_ENTRY.cq_ptr]
|
mov esi, dword [esi + NVM_QUEUE_ENTRY.cq_ptr]
|
||||||
mov ax, word [esi + edx + CQ_ENTRY.status]
|
mov ax, word [esi + edx + CQ_ENTRY.status]
|
||||||
and ax, not CQ_PHASE_TAG ; ignore phase tag bit
|
and ax, not CQ_PHASE_TAG ; ignore phase tag bit
|
||||||
DEBUGF DBG_INFO, "(NVMe) Status: 0x%x\n", ax
|
;DEBUGF DBG_INFO, "(NVMe) Status: 0x%x\n", ax
|
||||||
test al, al ; check status code (0 on success)
|
test al, al ; check status code (0 on success)
|
||||||
jz .ok
|
jz .ok
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user