PCI 16x50 UART Controller, O2 Enablement (#39)
[lunaix-os.git] / lunaix-os / arch / x86 / boot / x86_64 / init64.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_PCIDE);
11
12     ptr_t pagetable = kpg_init();
13     cpu_chvmspace(pagetable);
14
15     cr0_unsetfeature(CR0_WP | CR0_EM);
16     cr0_setfeature(CR0_MP);
17 }