summaryrefslogtreecommitdiff
path: root/kernel/kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kernel.c')
-rw-r--r--kernel/kernel.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c
index 533ff7c..d1de73f 100644
--- a/kernel/kernel.c
+++ b/kernel/kernel.c
@@ -4,6 +4,7 @@
#include "lib/logger/log.h"
#include "lib/int/stdint.h"
#include "lib/bool/bool.h"
+
#include "smp.h"
#include "time.h"
@@ -21,7 +22,15 @@ void kernel_ap()
{
proc++;
uint8_t p=proc;
- while(1)cpu_counter[p]++;
+ while(1)
+ {
+ cpu_counter[p]++;
+/*
+ lock_spin(0);
+ log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"cpu[%d] %d",p,cpu_counter[p]);
+ lock_release(0);
+*/
+ }
}
//
@@ -131,19 +140,13 @@ void kernel_main(uint32_t initial_stack, int mp)
mem_init(0x7c00+1,*((uint16_t *)(0x7c00)));
// init spinlocks
- log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"Initializing Spinlocks");
-
init_spinlocks();
- lock_spin(0);
-
//
// Start the other Processors (also before paging !)
//
smp_log_procdata(&procdata);
- lock_spin(0);
-
smp_start_aps(&procdata,0x80000); // starts at 0x90000
// but it will be copied over mbr