zephyr/drivers/disk/nvme
Tomasz Bursztyka 95b8493857 drivers/nvme: Return an error in case of non dword-aligned data buffer
This is a specific case for NVMe where given data buffer pointers must
be dword (4 bytes) aligned.

There is no virtual memory management between the user thread and NVMe
driver (which one could detect such wrong alignement on physical memory
and thus reallocate the memory properly, so it would be fully
transparent for the user thread), thus the need to push that check to
the user.

This has been going under the radar so far as Qemu does not seem to
follow NVMe specifications where PRP1 (in DPTR) must always be
dword-aligned. It really does not follow the rule: specifications
details that if bits 1:0 of PRP1 are set, the controller may generate
an error or treat the address as if these bits were unset. Seems like
a bug in Qemu, I did not check the code there however.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-09-22 09:23:18 +02:00
..
CMakeLists.txt drivers/nvme: Integrate to disk subsystem 2023-04-07 13:28:47 +02:00
Kconfig drivers/nvme: Support data bigger than a memory page 2023-04-07 13:28:47 +02:00
nvme_cmd.c drivers/nvme: Rewrite how data pointer is filled 2023-09-22 09:23:18 +02:00
nvme_cmd.h drivers/nvme: Rely on CONFIG_MMU_PAGE_SIZE for PRP 2023-09-22 09:23:18 +02:00
nvme_controller_cmd.c drivers/nvme: Add namespace support 2023-04-07 13:28:47 +02:00
nvme_controller.c drivers/nvme: Add debug information in case of request error 2023-09-22 09:23:18 +02:00
nvme_disk.c drivers/nvme: Return an error in case of non dword-aligned data buffer 2023-09-22 09:23:18 +02:00
nvme_helpers.h drivers/nvme: Return an error in case of non dword-aligned data buffer 2023-09-22 09:23:18 +02:00
nvme_namespace.c drivers/nvme: Integrate to disk subsystem 2023-04-07 13:28:47 +02:00
nvme_namespace.h drivers/nvme: Integrate to disk subsystem 2023-04-07 13:28:47 +02:00
nvme.h drivers/nvme: Add concurrent access control over Disk API functions 2023-04-07 13:28:47 +02:00