Page MenuHomeFreeBSD

x86: add AMD RAPL MSR and feature-bit definitions
AbandonedPublic

Authored by afscoelho_gmail.com on Jun 23 2026, 2:36 AM.
Tags
None
Referenced Files
F166767883: D57759.diff
Sun, Aug 16, 9:21 AM
Unknown Object (File)
Fri, Aug 14, 3:41 PM
Unknown Object (File)
Wed, Aug 12, 7:15 PM
Unknown Object (File)
Tue, Aug 11, 12:13 PM
Unknown Object (File)
Sun, Aug 9, 3:14 PM
Unknown Object (File)
Sat, Aug 8, 5:20 PM
Unknown Object (File)
Sat, Aug 8, 3:52 PM
Unknown Object (File)
Sat, Aug 8, 10:48 AM
Subscribers

Details

Summary

Define AMDPM_RAPL bit (CPUID 8000_0007 EDX) and three AMD RAPL MSRs:
RAPL_POWER_UNIT (unit shifts), CORE_ENERGY_STATUS (per-core energy),
PKG_ENERGY_STATUS (package energy). Used by AMD RAPL driver added next.

Sponsored by: Advanced Micro Devices (AMD)
MFC after: 2 weeks
Signed-off-by: Andre Silva <andasilv@amd.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74129
Build 71012: arc lint + arc unit

Event Timeline

Correct stack onto D55603 and add Co-authored-by trailer for ShengYi Hung.

This revision is now accepted and ready to land.Jun 25 2026, 4:43 PM

Abandoning: superseded by D58027, which adds the identical three AMD RAPL MSR definitions to specialreg.h and has already landed. The AMDPM_RAPL feature bit from this change is unnecessary in the merged design, which detects RAPL via runtime rdmsr_safe() probing rather than a CPUID feature bit.