update i386 entrypoint

This commit is contained in:
Quinten Kock 2020-12-05 04:09:24 +01:00
parent e5cf785097
commit 0c17fc4402
1 changed files with 10 additions and 8 deletions

View File

@ -4,17 +4,10 @@
#include "../../main.h"
#include <arch/x86/stivale2-parse.h>
#include <print/print.h>
void stivale2_main(struct stivale2_struct *info);
struct stivale2_header_tag_smp smp_request = {
.tag = {
.identifier = STIVALE2_HEADER_TAG_SMP_ID,
.next = 0
},
.flags = 02
};
__attribute__((section(".stivale2hdr"), used))
struct stivale2_header header2 = {
.entry_point = 0,
@ -27,6 +20,15 @@ void stivale2_main(struct stivale2_struct *info) {
parse_stivale2(info);
print_stivale2_memmap(info);
uint32_t* cr3;
__asm__ __volatile__ (
"movl %%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);
}