summaryrefslogtreecommitdiff
path: root/Kernel/Devices/BlockDevice.h
diff options
context:
space:
mode:
authorPankaj Raghav <pankydev8@gmail.com>2021-12-16 20:37:54 +0530
committerAndreas Kling <kling@serenityos.org>2022-01-01 14:55:58 +0100
commite99fafb683d0ec63f64662cc71b98900118f9f74 (patch)
tree6bac149173860f3804200b85fa5e4b357ece7807 /Kernel/Devices/BlockDevice.h
parent602b35aa62586f5d75ea329ebc29e49cdb470932 (diff)
downloadserenity-e99fafb683d0ec63f64662cc71b98900118f9f74.zip
Kernel/NVMe: Add initial NVMe driver support
Add a basic NVMe driver support to serenity based on NVMe spec 1.4. The driver can support multiple NVMe drives (subsystems). But in a NVMe drive, the driver can support one controller with multiple namespaces. Each core will get a separate NVMe Queue. As the system lacks MSI support, PIN based interrupts are used for IO. Tested the NVMe support by replacing IDE driver with the NVMe driver :^)
Diffstat (limited to 'Kernel/Devices/BlockDevice.h')
-rw-r--r--Kernel/Devices/BlockDevice.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Devices/BlockDevice.h b/Kernel/Devices/BlockDevice.h
index 1fdcf21197..a3c3197eb9 100644
--- a/Kernel/Devices/BlockDevice.h
+++ b/Kernel/Devices/BlockDevice.h
@@ -68,6 +68,8 @@ protected:
: Device(major, minor)
, m_block_size(block_size)
{
+ // 512 is the minimum sector size in most block devices
+ VERIFY(m_block_size >= 512);
}
private: