The branch main has been updated by mhorne:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=03c69dd90122c4ffa91a749f668a2ac8fa6843a2

commit 03c69dd90122c4ffa91a749f668a2ac8fa6843a2
Author:     Anaelle Cazuc <[email protected]>
AuthorDate: 2026-05-28 16:28:32 +0000
Commit:     Mitchell Horne <[email protected]>
CommitDate: 2026-05-31 17:50:20 +0000

    pmc: add sapphire rapids model
    
    This commit adds the sapphire rapids CPU model to hwpmc_intel.c,
    allowing hwpmc to be used on this CPU family.
    
    Reviewed by:    mhorne
    MFC after:      3 days
    Sponsored by:   Stormshield
    Differential Revision:  https://reviews.freebsd.org/D57263
---
 sys/dev/hwpmc/hwpmc_intel.c | 4 ++++
 sys/sys/pmc.h               | 1 +
 2 files changed, 5 insertions(+)

diff --git a/sys/dev/hwpmc/hwpmc_intel.c b/sys/dev/hwpmc/hwpmc_intel.c
index 942cadfae4cf..4c8d0cd2e2bd 100644
--- a/sys/dev/hwpmc/hwpmc_intel.c
+++ b/sys/dev/hwpmc/hwpmc_intel.c
@@ -266,6 +266,10 @@ pmc_intel_initialize(void)
                        cputype = PMC_CPU_INTEL_EMERALD_RAPIDS;
                        nclasses = 3;
                        break;
+               case 0x8F:
+                       cputype = PMC_CPU_INTEL_SAPPHIRE_RAPIDS;
+                       nclasses = 3;
+                       break;
                }
                break;
        }
diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h
index 21dbf48e976b..cf0382f66af3 100644
--- a/sys/sys/pmc.h
+++ b/sys/sys/pmc.h
@@ -111,6 +111,7 @@ extern char pmc_cpuid[PMC_CPUID_LEN];
     __PMC_CPU(INTEL_ALDERLAKEN,                0xA1,   "Intel AlderlakeN")     
        \
     __PMC_CPU(INTEL_GRANITE_RAPIDS,    0xA2,   "Intel Granite Rapids")         
\
     __PMC_CPU(INTEL_METEOR_LAKE,       0xA3,   "Intel Meteorlake")             
\
+    __PMC_CPU(INTEL_SAPPHIRE_RAPIDS,   0xA4,   "Intel Sapphire Rapids")        
\
     __PMC_CPU(PPC_7450,                        0x300,  "PowerPC MPC7450")      
        \
     __PMC_CPU(PPC_E500,                        0x340,  "PowerPC e500 Core")    
        \
     __PMC_CPU(PPC_970,                 0x380,  "IBM PowerPC 970")              
\

Reply via email to