HomeFreeBSD

hwpstate_amd(4): attach(): More diagnostic on CPPC enable

Description

hwpstate_amd(4): attach(): More diagnostic on CPPC enable

When the 'debug.hwpstate_verbose' tunable/sysctl knob is set, dump the
initial content of the CPPC_CAPABILITY_1 and CPPC_REQUEST registers.

If, after enabling CPPC, reading/writing some MSR fails during the attach
sequence, print a diagnostic. However, once CPPC is enabled, we cannot
go back (disabling it is impossible), so we'll attach even if fiddling
with other MSRs failed.

While here, move diagnostic printing on attach out of the callback that
is executed on (potentially) another CPU and with interrupts disabled,
putting it into the attach routine itself.

While here, fix format for printing the CPU ID.

PR: 292615
Reviewed by: aokblast (older version)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55006

Details

Provenance
olceAuthored on Jan 29 2026, 5:37 PM
Reviewer
aokblast
Differential Revision
D55006: hwpstate_amd(4): attach(): More diagnostic on CPPC enable
Parents
rG8aac1e9b028e: hwpstate_amd(4): Register dump: Fine-grained error reporting
Branches
Unknown
Tags
Unknown