diff --git a/drivers/nvme/nvme.asm b/drivers/nvme/nvme.asm index fc2401e..24893c1 100644 --- a/drivers/nvme/nvme.asm +++ b/drivers/nvme/nvme.asm @@ -26,6 +26,7 @@ include "../fdo.inc" include "../pci.inc" include "../peimport.inc" include "nvme.inc" +include "macros.inc" proc START c, reason:dword @@ -134,13 +135,7 @@ proc detect_nvme ret .found_dev: - if __DEBUG__ - movzx ebx, byte [eax + PCIDEV.devfn] - shr ebx, 3 ; get rid of 3 lowest bits (function code), the rest bits is device code - movzx ecx, byte [eax + PCIDEV.devfn] - and ecx, 00000111b ; get only 3 lowest bits (function code) - DEBUGF DBG_INFO, "PCI(%u.%u.%u): Detected NVMe device...\n", [eax + PCIDEV.bus], ebx, ecx - end if + PCI_DEBUGF DBG_INFO, eax, "PCI(%u.%u.%u): Detected NVMe device...\n" push eax mov eax, dword [pcidevs_len] cmp eax, MAX_NVM_PCIDEVS @@ -216,7 +211,7 @@ proc nvme_init, bus:dword, devfn:dword test ebx, CAP_CSS_NVM_CMDSET jz .exit_fail - if __DEBUG__ + if __DEBUG__ eq 1 and ebx, CAP_MPSMIN and ecx, CAP_MPSMAX shr ebx, 16