summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/boot/mod_mem_map.c7
-rw-r--r--src/boot/mod_mem_map.h25
2 files changed, 32 insertions, 0 deletions
diff --git a/src/boot/mod_mem_map.c b/src/boot/mod_mem_map.c
new file mode 100644
index 0000000..0e89ee7
--- /dev/null
+++ b/src/boot/mod_mem_map.c
@@ -0,0 +1,7 @@
+#include "mod_mem_map.h"
+
+#include "../output/vga_character.h"
+
+void populate_memory_map(void) {
+ vga_graphics_write_str("pretend i populated the memory map, ok?");
+}
diff --git a/src/boot/mod_mem_map.h b/src/boot/mod_mem_map.h
new file mode 100644
index 0000000..16e5658
--- /dev/null
+++ b/src/boot/mod_mem_map.h
@@ -0,0 +1,25 @@
+#ifndef mod_mem_map
+#define mod_mem_map
+
+#include <stdint.h>
+#include <stddef.h>
+
+struct memory_map_entry_ {
+ struct memory_map_entry_* next;
+ size_t start;
+ size_t end;
+} memory_map_entry;
+
+struct memory_map_ {
+ struct memory_map_entry* unreserved;
+ uint16_t unreserved_count;
+
+ struct memory_map_entry* reserved;
+ uint16_t reserved_count;
+} memory_map;
+
+extern struct memory_map* system_memory_map;
+
+void populate_memory_map(void);
+
+#endif