diff --git a/drivers/nvme/nvme.asm b/drivers/nvme/nvme.asm index de4914e..f68f675 100644 --- a/drivers/nvme/nvme.asm +++ b/drivers/nvme/nvme.asm @@ -536,9 +536,8 @@ proc build_prp_list stdcall, nprps:dword, buf:dword, prp_list_ptr:dword .loop: mov eax, esi invoke GetPhysAddr - mov dword [edi + ecx * 4], eax - mov dword [edi + ecx * 4 + 4], 0 - DEBUGF DBG_INFO, "PRP: %x\n", eax + mov dword [edi + ecx * 8], eax + mov dword [edi + ecx * 8 - 4], 0 add esi, PAGE_SIZE inc ecx cmp ecx, ebx @@ -624,6 +623,9 @@ proc alloc_dptr stdcall, ns:dword, prps_ptr:dword, numsectors:dword, prp_list_pt ;test edx, edx ;jz @f ;inc eax + ;test eax, eax + ;jz @f + ;dec eax @@: mov edx, [buf] @@ -1127,7 +1129,7 @@ proc nvme_init stdcall, pci:dword mov dword [ebx + NSINFO.pg_sectors], eax invoke KernelFree, edi if 1 - invoke KernelAlloc, 0x4000 + invoke KernelAlloc, 0x6000 test eax, eax jz .exit_fail mov edi, eax @@ -1135,10 +1137,10 @@ proc nvme_init stdcall, pci:dword test eax, eax jz .exit_fail mov edx, NVM_CMD_READ - mov dword [eax], 24 + mov dword [eax], 25 stdcall nvme_readwrite, [esi + pcidev.nsinfo], edi, 0x1000, 0, eax DEBUGF DBG_INFO, "STRING: %s\n", edi - add edi, 0x1000 + add edi, 0x2000 DEBUGF DBG_INFO, "STRING: %s\n", edi end if DEBUGF DBG_INFO, "nvme%u: Successfully initialized driver\n", [esi + pcidev.num]