2
0
mirror of https://git.missingno.dev/kolibrios-nvme-driver/ synced 2025-01-03 19:35:56 +01:00

fix: indentation

This commit is contained in:
Abdur-Rahman Mansoor 2024-05-26 13:24:34 -04:00
parent d172666be2
commit 46076ba2f0
2 changed files with 25 additions and 23 deletions

View File

@ -30,14 +30,14 @@ include "macros.inc"
proc START c, reason:dword
cmp [reason], DRV_ENTRY
jne .err
cmp [reason], DRV_ENTRY
jne .err
.entry:
DEBUGF DBG_INFO, "Detecting NVMe hardware...\n"
call detect_nvme
call detect_nvme
test eax, eax
jz .err
jz .err
mov eax, dword [p_nvme_devices]
test eax, eax
jz .err
@ -54,29 +54,30 @@ proc START c, reason:dword
inc ecx
cmp ecx, dword [pcidevs_len]
jne .loop
invoke RegService, my_service, service_proc
ret
invoke RegService, my_service, service_proc
ret
.err:
call nvme_cleanup
xor eax, eax
ret
xor eax, eax
ret
endp
proc service_proc stdcall, ioctl:dword
mov ebx, [ioctl]
mov eax, [ebx+IOCTL.io_code]
cmp eax, SRV_GETVERSION
jne @F
mov ebx, [ioctl]
mov eax, [ebx+IOCTL.io_code]
cmp eax, SRV_GETVERSION
jne @F
mov eax, [ebx+IOCTL.output]
cmp [ebx+IOCTL.out_size], 4
jne @F
mov dword [eax], API_VERSION
xor eax, eax
ret
mov eax, [ebx+IOCTL.output]
cmp [ebx+IOCTL.out_size], 4
jne @F
mov dword [eax], API_VERSION
xor eax, eax
ret
@@:
or eax, -1
ret
@ -89,6 +90,7 @@ proc memset stdcall, p_data:dword, val:byte, sz:dword
mov edx, [sz]
mov bl, [val]
xor ecx, ecx
@@:
mov byte [p_data + ecx], bl
inc ecx
@ -129,7 +131,7 @@ endp
proc detect_nvme
invoke GetPCIList
invoke GetPCIList
mov edx, eax
.check_dev:
@ -268,10 +270,10 @@ proc nvme_init stdcall, pci:dword
; Configure Admin Submission/Completion Queue Base Address
xor eax, eax
inc eax
xor eax, eax
inc eax
pop ebx
ret
ret
.exit_fail:
PDEBUGF DBG_INFO, "PCI(%u.%u.%u): failed to initialize NVMe controller\n", byte [pci + pcidev.bus], byte [pci + pcidev.devfn]

View File

@ -210,7 +210,7 @@ struct pcidev
bus db ?
devfn db ?
rw 1
mmio_ptr dd ?
mmio_ptr dd ?
ends
TOTAL_PCIDEVS = 4
TOTAL_PCIDEVS_MALLOC_SZ = TOTAL_PCIDEVS * sizeof.pcidev