1 /* 2 * Copyright (c) 2026 Advanced Micro Devices, Inc. 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 * 6 * AMD/Intel MPERF and APERF MSRs counters exposed as an hwpmc(4) PMC class. 7 */ 8 9 #ifdef _KERNEL 10 11 /* 12 * A row per MSR: MPERF and APERF. 13 */ 14 15 #define PERF_NPMCS 2 16 #define PERF_MPERF 0 17 #define PERF_APERF 1 18 19 extern int tsc_perf_stat; 20 extern u_int cpu_power_ecx; 21 22 /* 23 * Prototypes. 24 */ 25 26 int pmc_perf_initialize(struct pmc_mdep *_md, int maxcpu, int classindex); 27 void pmc_perf_finalize(struct pmc_mdep *_md); 28 #endif /* _KERNEL */ 29