summaryrefslogtreecommitdiff
path: root/kernel/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/smp.c')
-rw-r--r--kernel/smp.c27
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);
}