mirror of
https://git.missingno.dev/kolibrios-nvme-driver/
synced 2024-12-22 22:08:47 +01:00
chore: add comments + save value of IDENTC.nn
This commit is contained in:
parent
bb59692ca4
commit
1c69e25c2b
@ -178,6 +178,8 @@ proc determine_active_nsids stdcall, pci:dword
|
||||
invoke GetPhysAddr
|
||||
stdcall nvme_identify, [pci], 0, eax, CNS_IDCS
|
||||
mov eax, dword [esi + IDENTC.nn]
|
||||
mov edx, [pci]
|
||||
mov dword [edx + pcidev.nn], eax
|
||||
test eax, eax
|
||||
jz .fail
|
||||
invoke KernelAlloc, 0x1000
|
||||
@ -191,10 +193,12 @@ proc determine_active_nsids stdcall, pci:dword
|
||||
.loop:
|
||||
cmp ecx, dword [esi + IDENTC.nn]
|
||||
jg .success
|
||||
stdcall nvme_identify, [pci], ecx, ebx, CNS_IDNS
|
||||
stdcall nvme_identify, [pci], ecx, ebx, CNS_IDNS ; identify N'th namespace
|
||||
push ecx
|
||||
xor ecx, ecx
|
||||
|
||||
; We want to check if entire struct is zeroed out, if so, it is not an active NSID,
|
||||
; otherwise it is
|
||||
.inner_loop:
|
||||
mov eax, dword [edi + ecx * 4]
|
||||
test eax, eax
|
||||
|
Loading…
Reference in New Issue
Block a user