diff options
Diffstat (limited to 'kernel/smp.c')
| -rw-r--r-- | kernel/smp.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/kernel/smp.c b/kernel/smp.c index 894dbe0..4aff013 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -26,17 +26,16 @@ void smp_main() // klog("local apic_addr:0x%08X",local_apic_addr); - - uint32_t *reg=local_apic_addr+FOOLOS_APIC_ID; + // // uint32_t *reg=local_apic_addr+FOOLOS_APIC_ID; //klog("local apic id: 0x%08X",(*reg)); - *reg=local_apic_addr+FOOLOS_APIC_SPUR_INT; - *reg|=0x100;//0xffffffff; // all bits 1 and interrupt 255 + // // // *reg=local_apic_addr+FOOLOS_APIC_SPUR_INT; + // // // *reg|=0x100;//0xffffffff; // all bits 1 and interrupt 255 // *reg=0;//xffffffff; // all bits 1 and interrupt 255 -// int_install(); + int_install(); -// x86_sti(); + x86_sti(); @@ -100,9 +99,8 @@ void smp_start_aps(smp_processors *pros,char *path) { if(pros->boot==i)continue; - klog("starting cpu %d",i); - uint8_t dest=pros->local_apic_id[i]; + klog("starting cpu %d (dest: %d) ",i,dest); reg=local_apic_addr+FOOLOS_APIC_INT_COMMAND_HIGH; *reg=dest<<24; // destination apic. @@ -115,7 +113,7 @@ void smp_start_aps(smp_processors *pros,char *path) // todo: use some real sleep (not implemented yet :( ) //sleep(30); - // start proc 0x7 = 0x7000; etc.. + // start proc 0x7 = 0x7000; *reg=(6<<8)|(1<<14)|0x7; // 110 SIPI } } |
