2
0
mirror of https://git.missingno.dev/kolibrios-nvme-driver/ synced 2025-02-02 02:20:09 +01:00

add set_cdw0 proc

This commit is contained in:
Abdur-Rahman Mansoor 2024-06-04 16:06:32 -04:00
parent 721fe6582f
commit c74cff54cb

View File

@ -101,6 +101,15 @@ proc memset stdcall, p_data:dword, val:byte, sz:dword
endp
proc set_cdw0 stdcall, opcode:byte, cid:word
movzx eax, [cid]
shl eax, 16
or eax, [opcode]
ret
endp
proc nvme_identify stdcall, pci:dword, slot:dword, nsid:dword, dptr:dword, cid:word, cns:byte
push esi
@ -206,6 +215,7 @@ proc get_features stdcall, pci:dword, dptr:dword, sel:byte, fid:byte
mov esi, [pci]
mov esi, [esi + pcidev.sq_ptr]
stdcall memset, esi, 0, sizeof.SQ_ENTRY
mov
movzx eax, [fid] ; CDW10.FID
movzx ebx, [sel]
and ebx, 111b