#include "memory.h" #include "kprintf.h" #include "string.h" #include extern uint32_t boot_page_directory; uint32_t *page_directory = &boot_page_directory; uint32_t page_table1[1024] __attribute__((aligned(4096))); uint32_t page_table_entries[1024] __attribute__((aligned(4096))); void init_memory(void) { for (int16_t i = 0; i < 0x300; i++) page_directory[i] = 0x02; for (int16_t i = 0; i < 1024; i++) page_table1[i] = i << 12 | 0x03; page_directory[0] = (uint32_t)page_table1 | 0x03; }