add printing pagetable location
This commit is contained in:
parent
95ac2d439a
commit
e5cf785097
|
|
@ -2,8 +2,10 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include "../../main.h"
|
#include <arch/x86/stivale2-parse.h>
|
||||||
#include "arch/x86/stivale2-parse.h"
|
#include <print/print.h>
|
||||||
|
|
||||||
|
#include <main.h>
|
||||||
|
|
||||||
static uint8_t stack[4096] = {0};
|
static uint8_t stack[4096] = {0};
|
||||||
void stivale2_main(struct stivale2_struct *info);
|
void stivale2_main(struct stivale2_struct *info);
|
||||||
|
|
@ -28,6 +30,15 @@ void stivale2_main(struct stivale2_struct *info) {
|
||||||
parse_stivale2(info);
|
parse_stivale2(info);
|
||||||
print_stivale2_memmap(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};
|
char *argv[3] = {"stivale2", info->bootloader_brand, info->bootloader_version};
|
||||||
kmain(3, argv);
|
kmain(3, argv);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue