summaryrefslogtreecommitdiffhomepage
path: root/src/loader/inc/disk.h
diff options
context:
space:
mode:
authorMarvin Borner2021-07-12 18:14:44 +0200
committerMarvin Borner2021-07-12 18:15:29 +0200
commit1b429c0fc28e5cd8b474ad5a1de1fa6f3d7c2e2a (patch)
tree593af3e3ec78795bb47553f492db07fb7e87e373 /src/loader/inc/disk.h
parentd414d2f6f46bd425d727af5baae3e2658d6e1384 (diff)
Renamed files to match presentation
Diffstat (limited to 'src/loader/inc/disk.h')
-rw-r--r--src/loader/inc/disk.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/loader/inc/disk.h b/src/loader/inc/disk.h
new file mode 100644
index 0000000..e4fb285
--- /dev/null
+++ b/src/loader/inc/disk.h
@@ -0,0 +1,21 @@
+// MIT License, Copyright (c) 2021 Marvin Borner
+
+#ifndef DISK_H
+#define DISK_H
+
+#include <def.h>
+
+// General disk assumptions
+#define BLOCK_SIZE 1024
+#define BLOCK_COUNT 256 // BLOCK_SIZE / sizeof(u32)
+#define SECTOR_SIZE 512
+#define SECTOR_COUNT (BLOCK_SIZE / SECTOR_SIZE) // 2
+
+struct dev;
+struct fs {
+ s32 (*read)(const char *, void *, u32, u32, struct dev *);
+};
+
+void disk_detect(struct dev *dev);
+
+#endif