optimize the menuconfig redrawing
[lunaix-os.git] / lunaix-os / arch / x86 / boot / i386 / init32.c
1 #include "sys/boot/archinit.h"
2 #include "sys/crx.h"
3 #include "sys/cpu.h"
4
5 void boot_text
6 x86_init(struct multiboot_info* mb)
7 {
8     mb_parse(mb);
9
10     cr4_setfeature(CR4_OSXMMEXCPT | CR4_OSFXSR | CR4_PSE36);
11
12     ptr_t pagetable = kpg_init();
13     cpu_chvmspace(pagetable);
14
15     cr0_unsetfeature(CR0_WP | CR0_EM);
16     cr0_setfeature(CR0_PG | CR0_MP);
17 }