Commit Graph

4 Commits

Author SHA1 Message Date
Tomasz Bursztyka e348415d1c drivers/nvme: Support data bigger than a memory page
Pre-allocating PRP list for such purpose. Which PRP list is relevantly
filled in depending on the data size and data pointer page alignment.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-04-07 13:28:47 +02:00
Tomasz Bursztyka 22db7b76ad drivers/nvme: Add namespace support
Based on FreeBSD's implementation made by James Harris, Intel Copyright
2012-2016.

Namespace in this context, will be a disk. It's not exposed from DTS, as
an actualy NVMe hardware controller card can bring more than one
namespace (disk).

Thus namespace are not instanciated through the device driver model, but
statically allocated and runtime configured, depending on what the
controller exposes.

By default the amount of namespace supported is one as it is the most
common setup.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-04-07 13:28:47 +02:00
Tomasz Bursztyka 7499fae5cd drivers/nvme: Add command infrastructure
Based on FreeBSD's implementation made by James Harris, Intel Copyright
2012-2016.

This is the corner stone of the whole NVMe logic: sending commands and
getting replies, all through memory shared from the host to the
controller.

Then using it to inialize admit/IO queues and identifying the
controller.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-04-07 13:28:47 +02:00
Tomasz Bursztyka b7d4d74e03 drivers/disk: Add NVMe controller support
Based on FreeBSD's implementation made by James Harris, Intel Copyright
2012-2016.

Since Zephyr does not propose any advanced interfaces as FreeBSD (bus
abstractions, memory and DMA abstraction and many more), this comes with
a much simplified and Zephyr-ish way to instanciate, initialize and use
NVMe controller.

ToDo: IO Queues cannot be more than 1. Macros will need to be improved to
manage the case of 2+ IO queues.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-04-07 13:28:47 +02:00