summaryrefslogtreecommitdiff
path: root/src/arch/amd64/shim.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/amd64/shim.c')
-rw-r--r--src/arch/amd64/shim.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/arch/amd64/shim.c b/src/arch/amd64/shim.c
index dcd37bf..4afa6d2 100644
--- a/src/arch/amd64/shim.c
+++ b/src/arch/amd64/shim.c
@@ -4,23 +4,17 @@
#include <shim.h>
#include <memory.h>
+#include "paging.h"
#include "mboot.h"
static struct boot_info boot_info;
// entry point for amd64
void* amd64_shim(void *mboot_data_ptr) {
- //struct pml4e *pml4 = (struct pml4e *)0x1000;
- //struct pdpte *pdpt = (struct pdpte *)0x2000;
- //struct pde *pd = (struct pde *)0x3000;
- //struct pte *pt = (struct pte *)0x4000;
- //pd[1].flags = F_PRESENT | F_WRITEABLE;
- //pd[1].address = ((uint64_t)pt) >> 12;
- //map_page(pml4, (void *)0x80000000, (void *)0xB8002, F_WRITEABLE);
- //__asm("invlpg 0x200000");
- //void *ret;
- //find_phys_addr(pml4, (void *)0x80000000, &ret);
- //return ret;
+ serial_init();
+ paging_init();
+
+ kmap_page(mboot_data_ptr, mboot_data_ptr, F_WRITEABLE);
struct mboot_info mboot_info;
mboot_info = mboot_load_info(mboot_data_ptr);