summaryrefslogtreecommitdiff
path: root/kernel/kernel.c
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-10 04:13:28 +0200
committerMiguel <m.i@gmx.at>2018-09-10 04:13:28 +0200
commit65f5cca027af81e77b3e06da658b6d13f1861a03 (patch)
tree4e1aa57b8d4dedb00beb649992054faf6f24ff40 /kernel/kernel.c
parent67e7f93fc2ea9c6d04698f9af29be78d0123afb0 (diff)
fixing paging / per cpu pages
Diffstat (limited to 'kernel/kernel.c')
-rw-r--r--kernel/kernel.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c
index d30abf0..dd8d3f0 100644
--- a/kernel/kernel.c
+++ b/kernel/kernel.c
@@ -52,7 +52,7 @@ void kernel_main(uint32_t eax,uint32_t ebx)
// -- GET CONFIGS -- //
klog("Read Multiboot Structures ...");
multiboot_information *cfg_multiboot;
- cfg_multiboot=multiboot_read(eax, ebx,true);
+ cfg_multiboot=multiboot_read(eax, ebx,false);
klog("Read Advanced Power Configuration Interface (ACPI) Structures ...");
acpi_information cfg_acpi;
@@ -79,10 +79,14 @@ void kernel_main(uint32_t eax,uint32_t ebx)
fixme("write convenneint management funcs as: mapCPU, mapKErnel, map USerspace..");
fixme("move stack and guard with empty pages!");
- struct pdirectory_struct *dir=vmem_init(0, // this is hardcoded to first 32megs anyway
- (uint32_t)cfg_multiboot->framebuffer_addr,
- cfg_acpi.local_apic_address,
- cfg_acpi.io_apic_address);
+ vmem_init(0, // this is hardcoded to first 32megs anyway
+ (uint32_t)cfg_multiboot->framebuffer_addr,
+ cfg_acpi.local_apic_address,
+ cfg_acpi.io_apic_address);
+
+ struct pdirectory_struct *dir=vmem_kernel_dir();
+ x86_set_page_directory(dir);
+ x86_paging_enable();
// -- RAM IMAGE -- //
klog("Ram Filesystem init ... ");
@@ -100,10 +104,6 @@ void kernel_main(uint32_t eax,uint32_t ebx)
uint32_t sstdout = syscall_open("term",0,0); // stdout 1
uint32_t sstderr = syscall_open("stderr",0,0); // stderr 2
- // -- ... -- //
- klog("Scheduler init ...");
- scheduler_init(dir);
-
klog("Keyboard init ...");
keyboard_init(0);