2
0
mirror of https://git.missingno.dev/kolibrios-nvme-driver/ synced 2024-12-22 22:08:47 +01:00

feat: add in write to disk functions and remove unnecessary div in nvme_init

This commit is contained in:
Abdur-Rahman Mansoor 2024-07-23 13:04:52 -04:00
parent e3241e35cc
commit 1b88a4ff17

View File

@ -1108,6 +1108,7 @@ proc nvme_init stdcall, pci:dword
mov ecx, dword [edi + IDENTN.lbaf0]
shr ecx, 16 ; Get LBADS
and ecx, 0xff
movzx edx, cl
dec ecx
mov eax, 2
shl eax, cl
@ -1119,10 +1120,9 @@ proc nvme_init stdcall, pci:dword
jne .exit_fail
mov dword [ebx + NSINFO.lbads], eax
mov ecx, PAGE_SIZE
xchg eax, ecx
xor edx, edx
div ecx
mov eax, PAGE_SIZE
mov cl, dl
shr eax, cl
mov dword [ebx + NSINFO.pg_sectors], eax
invoke KernelFree, edi
if 0
@ -1468,7 +1468,7 @@ align 4
dd 0 ; no closemedia function
dd nvme_query_media
dd nvme_read
dd 0 ; no write function (for now)
dd nvme_write
dd 0 ; no flush function
dd 0 ; use default cache size
.end: