HomeFreeBSD

hwpstate_amd(4): Sane defaults for min/max perf on insane capabilities

Description

hwpstate_amd(4): Sane defaults for min/max perf on insane capabilities

If the CPPC_CAPABILITY_1 register stays at its reset value (0) even
after enabling CPPC, as observed in the field (see the referenced PR
below), use sane min/max performance limits as hinted by the ACPI spec,
i.e., all 0s for the minimum value and all 1s for the maximum one.

While here, let's cope upfront with some more insane situations, where
the minimum value would be greater than the maximum one, but also if
they would be equal which does not seem to make sense at all in the CPPC
frame (and, anyway, in this case, the actual minimum and maximum values
we program should have no effect at all). That last case actually also
covers the one exposed in the previous paragraph.

PR: 292615
Reviewed by: aokblast
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55007

Details

Provenance
olceAuthored on Jan 29 2026, 9:14 PM
Reviewer
aokblast
Differential Revision
D55007: hwpstate_amd(4): Sane defaults for min/max perf on insane capabilities
Parents
rGbd58239d3653: hwpstate_amd(4): attach(): More diagnostic on CPPC enable
Branches
Unknown
Tags
Unknown