summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2015-09-28 02:40:03 -0700
committeriximeow <me@iximeow.net>2015-09-28 03:36:28 -0700
commit4f63bab19769e2aedb9721322501cecf9934156c (patch)
treeab85cae6e02a944208fa57860b61c2316cd62a11 /src
parent00d5836c010e82463fff1db14e588be881cdac4e (diff)
stub memory mapping module
doesn't boot due to bootloader bug bootloader doesn't support start address other than 0x7e00
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