summaryrefslogtreecommitdiff
path: root/src/sys/include/dms
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-10-14 20:23:19 -0400
committerIan Moffett <ian@osmora.org>2025-10-14 20:23:19 -0400
commitaaa076ff1d68545085fb85ee24d5410b60a123bd (patch)
tree98b1642cd6aae676b15318e376661e7b343196f9 /src/sys/include/dms
parent6a0c08f51e59328d9a158bb521b1f1cf57663962 (diff)
kern: dms: Make DMS block size aware
In order to safely copy between disk and host memory through a programming interface, DMS must be aware of the hardware disk block size Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include/dms')
-rw-r--r--src/sys/include/dms/dms.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sys/include/dms/dms.h b/src/sys/include/dms/dms.h
index fca40b4..06e78ac 100644
--- a/src/sys/include/dms/dms.h
+++ b/src/sys/include/dms/dms.h
@@ -74,14 +74,19 @@ struct dms_ops {
*
* @name: Name of this device
* @ops: Operations that can be performed
- * @data: Driver specific data
+ * @data: Driver specific data [set by driver]
+ * @bsize: Disk block size [set by driver]
* @id: ID of the disk
* @link: Internal queue link
+ *
+ * XXX: The `data' and `bsize' fields must be set by
+ * the driver
*/
struct dms_disk {
char name[DISKNAME_MAX];
struct dms_ops *ops;
void *data;
+ uint16_t bsize;
disk_id_t id;
TAILQ_ENTRY(dms_disk) link;
};