diff options
| author | Miguel <m.i@gmx.at> | 2018-09-29 19:57:52 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-09-29 19:57:52 +0200 |
| commit | 75433d155c152b809e9f25b1099fc06d6106308b (patch) | |
| tree | f4f84309e6cf2aa9bc0d9df5ae532b94a60fea0f /kernel/smp.c | |
| parent | 73e80bf4b6c69b92a04b525f114a072a1c4b0d3a (diff) | |
improving window compositor
Diffstat (limited to 'kernel/smp.c')
| -rw-r--r-- | kernel/smp.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/kernel/smp.c b/kernel/smp.c index cf58b88..1b06352 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -16,8 +16,6 @@ #include "vesa.h" #include "syscalls.h" -void run_smp(); - // set cpu private value void smp_set(uint32_t offset, uint32_t value) { @@ -55,17 +53,12 @@ void smp_main_generic(bool bsp) asm volatile("jmp run_smp"); } -void smp_main() -{ - smp_main_generic(false); -} - void run_smp() { apic_enable(); klog("Setup the LAPIC Timer on CPU with lapic_id=0x%x ...",apic_id()); - apic_init_timer(5);// freq x HZ + apic_init_timer(100);// freq x HZ klog("Enable Interrupts on CPU with lapic_id=0x%x ...",apic_id()); asm_smp_unlock(); @@ -79,18 +72,12 @@ void run_smp() while(1)asm("hlt"); // wait for scheduler to kick in } -// this will start all our application processors! -void smp_start_aps(acpi_information *pros) +void smp_main() { - /* - for(int i=0;i<pros->processors;i++) - { - if(pros->boot==i)continue; // skib bsp + smp_main_generic(false); +} - uint8_t dest=pros->local_apic_id[i]; - klog("starting cpu %d (destination apic id: 0x%x) ",i,dest); - apic_sipi(dest,0x7); // start on 0x7000 - } -*/ - smp_main_generic(true); +void smp_bsp() +{ + smp_main_generic(true); } |
