update i386 entrypoint
This commit is contained in:
parent
e5cf785097
commit
0c17fc4402
|
|
@ -4,17 +4,10 @@
|
||||||
|
|
||||||
#include "../../main.h"
|
#include "../../main.h"
|
||||||
#include <arch/x86/stivale2-parse.h>
|
#include <arch/x86/stivale2-parse.h>
|
||||||
|
#include <print/print.h>
|
||||||
|
|
||||||
void stivale2_main(struct stivale2_struct *info);
|
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))
|
__attribute__((section(".stivale2hdr"), used))
|
||||||
struct stivale2_header header2 = {
|
struct stivale2_header header2 = {
|
||||||
.entry_point = 0,
|
.entry_point = 0,
|
||||||
|
|
@ -27,6 +20,15 @@ void stivale2_main(struct stivale2_struct *info) {
|
||||||
parse_stivale2(info);
|
parse_stivale2(info);
|
||||||
print_stivale2_memmap(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};
|
char *argv[3] = {"stivale2", info->bootloader_brand, info->bootloader_version};
|
||||||
kmain(3, argv);
|
kmain(3, argv);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue