From ed2dd8f2ec459670f345c46d4d113fdff79b32e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Fri, 13 Sep 2024 20:47:02 +0800 Subject: [PATCH] CPU (FreeBSD): remove using of freq_levels Doesn't work at all Fix #1260 --- src/detection/cpu/cpu_bsd.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/detection/cpu/cpu_bsd.c b/src/detection/cpu/cpu_bsd.c index dec08e602..edb1583bd 100644 --- a/src/detection/cpu/cpu_bsd.c +++ b/src/detection/cpu/cpu_bsd.c @@ -41,23 +41,6 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu) ffCPUDetectSpeedByCpuid(cpu); - for (uint16_t i = 0; i < cpu->coresLogical; ++i) - { - ffStrbufClear(&buffer); - char key[32]; - snprintf(key, sizeof(key), "dev.cpu.%u.freq_levels", i); - if (ffSysctlGetString(key, &buffer) == NULL) - { - if (buffer.length == 0) continue; - - // MHz/Watts pairs like: 2501/32000 2187/27125 2000/24000 - uint32_t fmax = (uint32_t) strtoul(buffer.chars, NULL, 10); - if (cpu->frequencyMax < fmax) cpu->frequencyMax = fmax; - } - else - break; - } - cpu->frequencyBase = (uint32_t) ffSysctlGetInt("hw.clockrate", 0); cpu->temperature = FF_CPU_TEMP_UNSET;