summaryrefslogtreecommitdiff
path: root/src/kernel/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/timer.c')
-rw-r--r--src/kernel/timer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/kernel/timer.c b/src/kernel/timer.c
index aed42ba..295abe2 100644
--- a/src/kernel/timer.c
+++ b/src/kernel/timer.c
@@ -3,7 +3,7 @@
#include <io.h>
#include <printf.h>
#include <libc.h>
-#include <kernel.h>
+#include <addr.h>
#include <cpuid.h>
#include <panic.h>
#include <int.h>
@@ -204,10 +204,8 @@ void init_timer() {
uint32_t unused, cpuid_reg;
__get_cpuid(0x80000007, &unused, &unused, &unused, &cpuid_reg);
- //goto debug_tsc;
if((cpuid_reg >> 8) & 1) {
printf("Detected invariant TSC\n");
- //.1 second to calibrate, TODO do we need to check if the register is big enough?
uint64_t hpet_ticks = (100000000000000 * (1 / (double)hpet_info.hpet_period)) + 0.5;
printf("Starting TSC calibration...\n");
uint64_t volatile start_tsc, end_tsc;
@@ -274,7 +272,7 @@ void init_timer() {
apic_div = (((apic_div & 0b100) << 1) | (apic_div * 0b1011));
}
- lapic_timer_lvt.vector = SPURRIOUS_VECTOR; //TODO CHANGE ME
+ lapic_timer_lvt.vector = SPURRIOUS_VECTOR;
lapic_timer_lvt.timer_mode = LAPIC_TIMER_MODE_PERIODIC;
lapic_timer_lvt.delivery_status = 0;
lapic_timer_lvt.mask = 1;