From 99ef9166ae84ee72c4b9d47d6af90e2cc20881a3 Mon Sep 17 00:00:00 2001 From: "Justin C. Miller" Date: Mon, 18 Jan 2021 18:25:44 -0800 Subject: [PATCH] [kernel] Lower APIC calibration timer Now that the spinwait bug is fixed, the raised time for APIC calibration can be put back to a lower value. It was previously raised thinking more time would get a more accurate result -- but accuracy was not the issue. --- src/kernel/apic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/apic.cpp b/src/kernel/apic.cpp index e62a591..7515d1c 100644 --- a/src/kernel/apic.cpp +++ b/src/kernel/apic.cpp @@ -68,7 +68,7 @@ lapic::calibrate_timer() set_divisor(1); apic_write(m_base, lapic_timer_init, initial); - uint64_t us = 200000; + uint64_t us = 20000; clock::get().spinwait(us); uint32_t remaining = apic_read(m_base, lapic_timer_cur);