diff --git a/kernel/src/arch/x86_64/entry-stivale2.c b/kernel/src/arch/x86_64/entry-stivale2.c index fc57f0c..822c706 100644 --- a/kernel/src/arch/x86_64/entry-stivale2.c +++ b/kernel/src/arch/x86_64/entry-stivale2.c @@ -2,8 +2,10 @@ #include #include -#include "../../main.h" -#include "arch/x86/stivale2-parse.h" +#include +#include + +#include static uint8_t stack[4096] = {0}; void stivale2_main(struct stivale2_struct *info); @@ -28,6 +30,15 @@ void stivale2_main(struct stivale2_struct *info) { parse_stivale2(info); print_stivale2_memmap(info); + uint64_t* cr3; + __asm__ __volatile__ ( + "movq %%cr3, %0\n\t" + : "=r" (cr3) + : /* no input */ + : /* no clobbers */ + ); + printf("PAGE TABLE AT: %x\n", cr3); + char *argv[3] = {"stivale2", info->bootloader_brand, info->bootloader_version}; kmain(3, argv); }