git: 77404ee1e99d - main - x86: add AMD RAPL MSR definitions to specialreg.h
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 28 Jul 2026 15:01:25 UTC
The branch main has been updated by mhorne:
URL: https://cgit.FreeBSD.org/src/commit/?id=77404ee1e99d502345a1f9356b05c09abfbde831
commit 77404ee1e99d502345a1f9356b05c09abfbde831
Author: Andre Silva <andasilv@amd.com>
AuthorDate: 2026-07-28 14:48:37 +0000
Commit: Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2026-07-28 14:53:33 +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
---
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 f5ca0b8415bb..f201725920bd 100644
--- a/sys/x86/include/specialreg.h
+++ b/sys/x86/include/specialreg.h
@@ -1272,6 +1272,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_AMD_CPUID01 0xc0011004 /* CPUID 01 %ecx override */
#define MSR_EXTFEATURES 0xc0011005 /* Extended CPUID Features override */