aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/hwpmc/hwpmc_core.h
diff options
context:
space:
mode:
authorMatt Macy <mmacy@FreeBSD.org>2018-05-26 19:29:19 +0000
committerMatt Macy <mmacy@FreeBSD.org>2018-05-26 19:29:19 +0000
commit959826ca1bb0a42ddd624bf1803ae2957a3282f3 (patch)
treec994717317a845c2afb2fd2d79beb650af57fafd /sys/dev/hwpmc/hwpmc_core.h
parent5506ceb87fa19140863b4e3ee978f631ccc4cf74 (diff)
downloadsrc-959826ca1bb0a42ddd624bf1803ae2957a3282f3.tar.gz
src-959826ca1bb0a42ddd624bf1803ae2957a3282f3.zip
pmc(3)/hwpmc(4): update supported Intel processors to rely fully on the
vendor provided pmu-events tables and sundry cleanups. The vendor pmu-events tables provide counter descriptions, default sample rates, event, umask, and flag values for all the counter configuration permutations. Using this gives us: - much simpler kernel code for the MD component - helpful long and short event descriptions - simpler user code - sample rates that won't overload the system Update man page with newer sample types and remove unused sample type.
Notes
Notes: svn path=/head/; revision=334244
Diffstat (limited to 'sys/dev/hwpmc/hwpmc_core.h')
-rw-r--r--sys/dev/hwpmc/hwpmc_core.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/hwpmc/hwpmc_core.h b/sys/dev/hwpmc/hwpmc_core.h
index d264318f8c25..9045318d6363 100644
--- a/sys/dev/hwpmc/hwpmc_core.h
+++ b/sys/dev/hwpmc/hwpmc_core.h
@@ -60,7 +60,7 @@ struct pmc_md_iap_op_pmcallocate {
};
#define IAP_EVSEL(C) ((C) & 0xFF)
-#define IAP_UMASK(C) ((C) & 0xFF00)
+#define IAP_UMASK(C) (((C) & 0xFF) << 8)
#define IAP_USR (1 << 16)
#define IAP_OS (1 << 17)
#define IAP_EDGE (1 << 18)
@@ -70,6 +70,9 @@ struct pmc_md_iap_op_pmcallocate {
#define IAP_INV (1 << 23)
#define IAP_CMASK(C) (((C) & 0xFF) << 24)
+#define IAP_EVSEL_GET(C) ((C) & 0xFF)
+#define IAP_UMASK_GET(C) (((C) & 0xFF00) >> 8)
+
#define IA_OFFCORE_RSP_MASK_I7WM 0x000000F7FF
#define IA_OFFCORE_RSP_MASK_SBIB 0x3F807F8FFF