From 7e2da9a580fb42ebf46096364e511ef57bc05cd8 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Mon, 17 Nov 2014 23:17:51 +0100 Subject: little cleanup --- kernel/kernel.c | 55 +++++-------------------------------------------------- 1 file changed, 5 insertions(+), 50 deletions(-) (limited to 'kernel/kernel.c') diff --git a/kernel/kernel.c b/kernel/kernel.c index a5bbfcc..2f7cfc3 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -29,61 +29,12 @@ #include "floppy.h" #endif -// some multiprocessor shit that should move away TODO -uint32_t c1,c2,c3; -volatile uint8_t proc; -uint32_t cpu_counter[SMP_MAX_PROC]; - -void kernel_ap() -{ - proc++; - uint8_t p=proc; - while(1) - { - cpu_counter[p]++; - - lock_spin(0); - if(cpu_counter[p]%1000000==0)log(FOOLOS_MODULE_NAME,FOOLOS_LOG_DEBUG,"cpu[%d] %d",p,cpu_counter[p]); - lock_release(0); - } -} - - -// mouse coords testing, move away -volatile int16_t mouse_x; -volatile int16_t mouse_y; - // // KERNEL MAIN - -// this is the very heart of our operating system! // void kernel_main(uint32_t initial_stack, int mp) { - - /// TODO - /////// SYMMETRIC MULTIPROCESSING, APS get caought here, move it away /// - // catch the APs (Application Processors) - if(mp==1) - { - uint32_t ebp=pmmngr_alloc_block()+4095; - - asm volatile("mov %0, %%ebp"::"r"(ebp)); - asm volatile("mov %ebp, %esp"); - asm volatile("jmp kernel_ap"); - } - - proc=c1=c2=c3=0; - for(int i=0;i