diff --git a/drivers/nvme/nvme.asm b/drivers/nvme/nvme.asm index dd7ec41..084c273 100644 --- a/drivers/nvme/nvme.asm +++ b/drivers/nvme/nvme.asm @@ -337,6 +337,24 @@ proc delete_io_submission_queue stdcall, pci:dword, qid:word endp +; See page 117-118 of the NVMe 1.4 specification for reference +; INCOMPLETE +proc get_log_page stdcall, pci:dword, dptr:dword, lid:byte + + push esi + mov esi, [pci] + mov esi, [esi + pcidev.sq_ptr] + stdcall memset, esi, 0, sizeof.SQ_ENTRY + stdcall set_cdw0, ADM_CMD_GET_LOG_PAGE, 0 ; [TODO: Set CID to valid value] + mov dword [esi + SQ_ENTRY.cdw0], eax + mov eax, [dptr] + mov dword [esi + SQ_ENTRY.dptr], eax + pop esi + ret + +endp + + proc detect_nvme invoke GetPCIList