diff options
| author | Miguel <m.i@gmx.at> | 2018-09-09 17:28:59 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-09-09 17:28:59 +0200 |
| commit | 4cda542d863839c5b0e026ccee297ca5ff3dd9cd (patch) | |
| tree | 7b8f7734f8f982df82b5c784386232e35a7ced44 /kernel/kernel.c | |
| parent | 9a4b35fd5a32490f8f15b48f978e7b1fbfdceb2a (diff) | |
switched to apic/ioapic finally
Diffstat (limited to 'kernel/kernel.c')
| -rw-r--r-- | kernel/kernel.c | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c index 12b2063..50815d1 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -1,13 +1,16 @@ -#include <stdint.h> -#include "kernel/kernel.h" +#include "kernel.h" + +#include "serial.h" +#include "multiboot.h" +#include "acpi.h" + +// #include "kernel/mem.h" #include "kernel/vmem.h" #include "kernel/gdt.h" #include "kernel/scheduler.h" -#include "kernel/multiboot.h" -#include "driver/serial.h" #include "driver/timer.h" #include "driver/keyboard.h" #include "driver/mouse.h" @@ -15,12 +18,13 @@ #include "syscalls.h" #include "fifo.h" #include "mp.h" -#include "asm_mp.h" +#include "asm_smp.h" #include "asm_x86.h" #include "interrupts.h" #include "ringbuffer.h" #include "driver/screen.h" #include "asm_pic.h" +#include "smp.h" #include "fs/fs.h" #include "kmalloc.h" @@ -38,23 +42,22 @@ void kernel_main(uint32_t eax,uint32_t ebx) klog("Version: git-commit: %s",GIT_REVISION); klog("======================================"); - klog("Communication Port (COM1) init ..."); //delayed info - fixme("Check if kernel size does not exceed memory limits!"); - // collect some info (before we start paging) - klog("Search / Read Multiboot Structures ... "); + klog("Communication Port (COM1) initialized."); //delayed info + + klog("Read Multiboot Structures ..."); multiboot_information *info; - info=get_multiboot(eax, ebx); + info=multiboot_read(eax, ebx); - klog("Search / Read ACPI Structures... "); - smp_processors procdata; - bool acpi_found=acpi_find(&procdata); - - klog("Search / Read MP Structures... "); - smp_processors procdata2; - bool mp_found=mp_find(&procdata2); - // + klog("Read Advanced Power Configuration Interface (ACPI) Structures ..."); + acpi_information procdata; + bool acpi_found=acpi_fill(&procdata); + if(!acpi_found) kpanic("We Currently rely on ACPI Structures Sorry!"); + + //klog("Read Multiprocessor (MP) Structures (Legacy) ... "); + //smp_processors procdata2; + //bool mp_found=mp_find(&procdata2); klog("Global Descriptor Table (GDT) init ..."); gdt_init(); @@ -72,6 +75,7 @@ void kernel_main(uint32_t eax,uint32_t ebx) klog("Mouse init ..."); mouse_init(); + klog("MEMORY MANAGEMENT"); // memory management klog("Memory init ... "); uint32_t kernel_blocks=mem_init(info); @@ -80,6 +84,7 @@ void kernel_main(uint32_t eax,uint32_t ebx) pdirectory *dir=vmem_init(kernel_blocks,(uint32_t)info->framebuffer_addr,procdata.local_apic_address,procdata.io_apic_address); // + klog("Ram Filesystem init ... "); fs_mount(info); |
