From dade7343ba7bb54532cb9170ebac0fbd5ca4c57e Mon Sep 17 00:00:00 2001 From: Yuming Jiang Date: Tue, 3 Feb 2026 11:31:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(driver/tsc):=20=E4=BF=AE=E5=A4=8D=20pmtimer?= =?UTF-8?q?=20=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF=20(#1762)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mingjiangyu1 --- kernel/src/arch/x86_64/driver/tsc.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/src/arch/x86_64/driver/tsc.rs b/kernel/src/arch/x86_64/driver/tsc.rs index 7c1db6eef..1c6f68aa9 100644 --- a/kernel/src/arch/x86_64/driver/tsc.rs +++ b/kernel/src/arch/x86_64/driver/tsc.rs @@ -69,7 +69,7 @@ impl TSCManager { todo!("detect TSC and CPU frequency by cpuid or msr or pit"); } else { // 使用pit来测量TSC和CPU总线的频率 - Self::set_cpu_khz(Self::calibrate_cpu_by_pit_hpet_ptimer()?); + Self::set_cpu_khz(Self::calibrate_cpu_by_pit_hpet_pmtimer()?); } // 认为非0的TSC频率是可靠的,并且使用它来检查CPU总线的频率 @@ -103,8 +103,8 @@ impl TSCManager { /// 测量CPU总线的频率 /// - /// 使用pit、hpet、ptimer来测量CPU总线的频率 - fn calibrate_cpu_by_pit_hpet_ptimer() -> Result { + /// 使用pit、hpet、pmtimer来测量CPU总线的频率 + fn calibrate_cpu_by_pit_hpet_pmtimer() -> Result { let hpet = is_hpet_enabled(); log_for_hpet(hpet);