mirror of
https://git.missingno.dev/kolibrios-nvme-driver/
synced 2024-12-22 13:58:47 +01:00
fix: allocate correct number of PRPs for PRP list
This commit is contained in:
parent
bd93b426c0
commit
3d95901b65
@ -325,7 +325,7 @@ proc build_prp_list stdcall, nprps:dword, buf:dword, prp_list_ptr:dword
|
|||||||
mov eax, esi
|
mov eax, esi
|
||||||
invoke GetPhysAddr
|
invoke GetPhysAddr
|
||||||
mov dword [edi + ecx * 8], eax
|
mov dword [edi + ecx * 8], eax
|
||||||
mov dword [edi + ecx * 8 - 4], 0
|
mov dword [edi + ecx * 8 + 4], 0
|
||||||
add esi, PAGE_SIZE
|
add esi, PAGE_SIZE
|
||||||
inc ecx
|
inc ecx
|
||||||
cmp ecx, ebx
|
cmp ecx, ebx
|
||||||
@ -416,6 +416,11 @@ proc alloc_dptr stdcall, ns:dword, prps_ptr:dword, numsectors:dword, prp_list_pt
|
|||||||
mov eax, [numsectors]
|
mov eax, [numsectors]
|
||||||
xor edx, edx
|
xor edx, edx
|
||||||
div ecx
|
div ecx
|
||||||
|
test [buf], PAGE_SIZE - 1
|
||||||
|
jz @f
|
||||||
|
inc eax
|
||||||
|
|
||||||
|
@@:
|
||||||
stdcall build_prp_list, eax, ebx, [prp_list_ptr]
|
stdcall build_prp_list, eax, ebx, [prp_list_ptr]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .err
|
jz .err
|
||||||
|
Loading…
Reference in New Issue
Block a user