From ec87174f30fc1a703ef3bb0fbc0791a22f6d6428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sun, 20 Apr 2025 11:43:39 +0800 Subject: [PATCH] CPU (NetBSD): add one more method to detect CPU frequency --- src/detection/cpu/cpu_nbsd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/detection/cpu/cpu_nbsd.c b/src/detection/cpu/cpu_nbsd.c index 78ec347b2..0486e213c 100644 --- a/src/detection/cpu/cpu_nbsd.c +++ b/src/detection/cpu/cpu_nbsd.c @@ -67,6 +67,7 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu) uint32_t freq = (uint32_t) ffSysctlGetInt("machdep.cpu.frequency.target", 0); if (freq == 0) freq = (uint32_t) (ffSysctlGetInt64("hw.cpu0.clock_frequency", 0) / 1000000); + if (freq == 0) freq = (uint32_t) ffSysctlGetInt("machdep.dmi.processor-frequency", 0); if (freq > cpu->frequencyBase) cpu->frequencyBase = freq; cpu->temperature = FF_CPU_TEMP_UNSET;