git: c56963b0fa67 - stable/15 - x86: add AMD RAPL MSR definitions to specialreg.h
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 30 Oct 2026 14:28:38 UTC
The branch stable/15 has been updated by mhorne:
URL: https://cgit.FreeBSD.org/src/commit/?id=c56963b0fa67035b2bdf3096284ce3248c7ee65b
commit c56963b0fa67035b2bdf3096284ce3248c7ee65b
Author: Andre Silva <andasilv@amd.com>
AuthorDate: 2026-07-28 14:48:37 +0000
Commit: Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2026-10-30 14:28:10 +0000
x86: add AMD RAPL MSR definitions to specialreg.h
specialreg.h is the tree's MSR registry and already carries the Intel
RAPL group. Add the AMD RAPL package/core energy and unit MSRs here so
the hwpmc RAPL class can reference them without a private driver copy.
Use the names Linux's msr-index.h gives these registers.
Reviewed by: mhorne, adrian, Ali Mashtizadeh <ali@mashtizadeh.com>
MFC after: 3 days
Sponsored by: AMD
Differential Revision: https://reviews.freebsd.org/D58027
(cherry picked from commit 77404ee1e99d502345a1f9356b05c09abfbde831)
---
sys/x86/include/specialreg.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h
index f32faec25e45..35bdf6a2e32f 100644
--- a/sys/x86/include/specialreg.h
+++ b/sys/x86/include/specialreg.h
@@ -1284,6 +1284,9 @@
#define MSR_SMM_MASK 0xc0010113 /* SMM TSEG address mask */
#define MSR_VM_CR 0xc0010114 /* SVM: feature control */
#define MSR_VM_HSAVE_PA 0xc0010117 /* SVM: host save area address */
+#define MSR_AMD_RAPL_POWER_UNIT 0xc0010299 /* RAPL unit shifts */
+#define MSR_AMD_CORE_ENERGY_STATUS 0xc001029a /* RAPL per-core energy */
+#define MSR_AMD_PKG_ENERGY_STATUS 0xc001029b /* RAPL package energy */
#define MSR_AMD_CPUID07 0xc0011002 /* CPUID 07 %ebx override */
#define MSR_EXTFEATURES 0xc0011005 /* Extended CPUID Features override */
#define MSR_LS_CFG 0xc0011020