The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
nvme.h File Reference

NVMe disks (PCI class 01:08:02). More...

Go to the source code of this file.

Data Structures

struct  nvme_disk_t

Functions

nvme_disk_t * nvme_init (void)
 find and set up the first NVMe controller.

Detailed Description

NVMe disks (PCI class 01:08:02).

nvme_init sets up the first NVMe controller with one admin queue pair and one I/O queue pair, and makes namespace 1 a block device of 512-byte sectors. a process that waits for a command sleeps until the controller interrupts; during boot, or without an interrupt, the driver polls the completion queue. namespaces with another sector size are not used.

Function Documentation

◆ nvme_init()

nvme_disk_t * nvme_init ( void )

find and set up the first NVMe controller.

call after pci_init and mmio_init.

Returns
the disk, or NULL if there is none or it cannot be used.