diff options
Diffstat (limited to 'kernel/kernel.c')
| -rw-r--r-- | kernel/kernel.c | 49 |
1 files changed, 22 insertions, 27 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c index e5369f4..df3a573 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -37,7 +37,6 @@ void kernel_main(uint32_t eax,uint32_t ebx) // console_init(); - // // PR // @@ -55,6 +54,11 @@ void kernel_main(uint32_t eax,uint32_t ebx) // gdt_setup(); + // + // Setup Interrupts (code segment: 0x08) + // + int_init(0x08); + // // Process Multiboot Header @@ -63,6 +67,16 @@ void kernel_main(uint32_t eax,uint32_t ebx) // + // Gather Info about other processors. (APs = application processors) + // ACPI or MP + // + smp_processors procdata; + + if(!acpi_find(&procdata)) + if(!mp_find(&procdata)) + panic(FOOLOS_MODULE_NAME,"ACPI and MP search failed! I do not want to continue!"); + + // // Memory Init // // after this is set up we will be able to allocate and deallocate @@ -71,35 +85,22 @@ void kernel_main(uint32_t eax,uint32_t ebx) uint32_t kernel_blocks=mem_init(info); // - // Gather Info about other processors. (APs = application processors) - // ACPI or MP - // - smp_processors procdata; + // Mount Root EXT2 ramimage (needs to be done before other processors started, because of /boot/mp.bin) + // + fs_mount(info); - if(!acpi_find(&procdata)) - if(!mp_find(&procdata)) - panic(FOOLOS_MODULE_NAME,"ACPI and MP search failed! I do not want to continue!"); // - // Start the other Processors (before paging) + // Start the other Processors (before paging because apic addr etc..?) // - smp_log_procdata(&procdata); + // smp_log_procdata(&procdata); //TODO: !!! Check commented out sleep ()!!! - //smp_start_aps(&procdata,0x80000); // starts at 0x80000 - // but it will be copied over mbr - while(1); + smp_start_aps(&procdata,"/boot/mp.bin"); //will be copied over mbr // // Activate Virtual Memory (paging) // pdirectory *dir=vmem_init(kernel_blocks); - - // - // Setup Interrupts (code segment: 0x08) - // - int_init(0x08); - - // // Scan the PCI Bus // @@ -107,13 +108,6 @@ void kernel_main(uint32_t eax,uint32_t ebx) // Its driver will be hopefully implemented one day ;) TODO // //pci_init(); - - - - // - // Mount Root EXT2 ramimage - // - fs_mount(info); // @@ -122,6 +116,7 @@ void kernel_main(uint32_t eax,uint32_t ebx) task_init(dir); + // // Abvoe should never returon // |
