summaryrefslogtreecommitdiff
path: root/kern/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kern/timer.c')
-rw-r--r--kern/timer.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kern/timer.c b/kern/timer.c
index 0d623ae..387c5f9 100644
--- a/kern/timer.c
+++ b/kern/timer.c
@@ -40,9 +40,6 @@ void timer_test_handler();
void timer_init() {
/* use 10x slower frequency for APIC timer testing */
int counter = TIMER_RATE / (TIMER_FREQ / 10);
- outb(TIMER_MODE_IO_PORT, TIMER_ONE_SHOT);
- outb(TIMER_PERIOD_IO_PORT, counter & 0xFF);
- outb(TIMER_PERIOD_IO_PORT, (counter >> 8) & 0xFF);
if (heap_init(&timers) != 0) {
panic("no space to initialize timer heap");
}
@@ -70,6 +67,7 @@ void timer_init() {
}
}
+ /* 10 10x slow tests to calculate LAPIC frequency */
lapic_dt = (0xffffffff - lapic_read(LAPIC_TIMER_CUR)) / 100;
lapic_write(LAPIC_TIMER_INIT, 0);
idt[TIMER_IDT_ENTRY] = old_idt;