From 4f63bab19769e2aedb9721322501cecf9934156c Mon Sep 17 00:00:00 2001 From: iximeow Date: Mon, 28 Sep 2015 02:40:03 -0700 Subject: stub memory mapping module doesn't boot due to bootloader bug bootloader doesn't support start address other than 0x7e00 --- src/boot/mod_mem_map.c | 7 +++++++ src/boot/mod_mem_map.h | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 src/boot/mod_mem_map.c create mode 100644 src/boot/mod_mem_map.h (limited to 'src') 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 +#include + +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 -- cgit v1.1