Add ATF tests for hwpmc(4). Vendor-neutral tests go in tests/sys/pmc;
tests that depend on AMD hardware interfaces go in tests/sys/pmc/amd,
which is only built on amd64.
tests/sys/pmc:
pmc_pidtrack_test process-mode PMCs follow their PID: a live
self-read counts the process' own work, an idle
process sharing the CPU with a busy one does not
pick up its work, and the count survives a
context switch
pmc_callchain_ur_test pmcstat -U collects user callchains through the
PMC_UR ring; regression test for the KASSERTs
fixed in rGaf3929c5152b and rG66118c3f1011
pmc_cli_test pmc(8): missing log, list-events, record/info
round trip with the "instructions" alias
pmcstat_tsc_test (amd64) tsc_freq in the initlog record, TSC
column of pmcstat -R, tsc in pmc filter -j,
pmcstat -G callgraph
pmc_rapl_test (amd64) RAPL class: 64-bit counters, system
mode only, PKG and CORES energy increase under
loadtests/sys/pmc/amd:
pmu_detect_test K8 class with 48-bit counters, at least six core
counters, TSC class alongside it
pmu_event_test pmu-events lookup and EventSelect/UnitMask/OS/USR
encoding checked against the amdzen1..amdzen6
tables; ex_ret_instr counts a known loop
pmu_event_neg_test raw PMCALLOCATE rejects an otherwise valid config
word with HOST, GUEST, HOST|GUEST, reserved bit
44 or PRECISERETIRE without PMC_CAP_PRECISE
(pmc_exterr_test covers an all-ones config word)
pmu_mux_test Zen 4: six core counters can be held at once, a
seventh is refused, a released one is reusable
rapl_domains_test AMD RAPL has at most PKG and CORES rows and no
DRAM domain
pmc_frontend_test pmc(8) frontend study on IBS fetch samples
amd_pmc_test_common.h CPUID-based Zen generation detection and helpersTests for PMC grouping and for IBS decoding depend on changes that are
not in main and will be posted together with those changes.
Sponsored by: Advanced Micro Devices, Inc.
Signed-off-by: Osvaldo Janeri Filho <ojanerif@amd.com>