Skip to content

Commit

Permalink
CPU (FreeBSD): remove using of freq_levels
Browse files Browse the repository at this point in the history
Doesn't work at all

Fix #1260
  • Loading branch information
CarterLi committed Sep 13, 2024
1 parent 9faa382 commit ed2dd8f
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/detection/cpu/cpu_bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ed2dd8f

Please sign in to comment.