[MEMORY] GDT

This commit is contained in:
thomas committed 2017-03-27 23:09:08 +02:00
1 parent deb1f031ce
commit 1f06c0bcf1
4 files changed
+69 -17

No files matched your search

+2 -16
View File
@@ -2,6 +2,7 @@
#include <int.h>
#include <multiboot.h>
#include <mem.h>
#include <gdt.h>
int kmain(uint64_t multiboot_magic, void *multiboot_data)
{
@@ -14,23 +15,8 @@ int kmain(uint64_t multiboot_magic, void *multiboot_data)
multiboot_init(multiboot_magic, P2V(multiboot_data));
vmm_init();
pmm_init();
gdt_init();
// We still need the GDT to be mapped in
extern void *BootGDT;
vmm_set_page(0, V2P(&BootGDT), V2P(&BootGDT), PAGE_PRESENT);
void *a = kmalloc(0x400);
void *b = kmalloc(0x200);
void *c = kmalloc(0x100);
kfree(b);
void *d = kmalloc(0x100);
(void)a;
(void)b;
(void)c;
(void)d;
heap_print();
debug_info("BOOT COMPLETE\n");
for(;;)asm("hlt");