Bug 238310 - PMC: Add Baytrail cpuid to pmc
Summary: PMC: Add Baytrail cpuid to pmc
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.2-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Konstantin Belousov
Keywords: easy, feature, needs-qa, patch
Depends on:
Reported: 2019-06-03 13:28 UTC by Masse Nicolas
Modified: 2019-07-26 10:22 UTC (History)
3 users (show)

See Also:
koobs: mfc-stable12?
koobs: mfc-stable11?

add baytrail id (431 bytes, patch)
2019-06-03 13:28 UTC, Masse Nicolas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Masse Nicolas 2019-06-03 13:28:52 UTC
Created attachment 204804 [details]
add baytrail id

When trying to use pmc on a baytrail cpu, the dmesg contains the following message:
pmc: Unknown Intel CPU.

Since Baytrail cpu seems to be based on the Silvermont micro-architecture, I just add the necessary id to make it recognized as such. Then, the message became:
hwpmc: SOFT/16/64/0x67<INT,USR,SYS,REA,WRI> TSC/1/64/0x20<REA> IAP/2/40/0x3ff<INT,USR,SYS,EDG,THR,REA,WRI,INV,QUA,PRC> IAF/3/40/0x67<INT,USR,SYS,REA,WRI>

Using pmcstat to get the values of differents counters seems to work as expected.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-06-03 13:39:40 UTC
Thank you for the report and patch Masse
Comment 2 Konstantin Belousov freebsd_committer 2019-06-03 14:51:45 UTC
I will handle this later today.  I suspect that there are more ids that can be added, at least according to SDM.
Comment 3 commit-hook freebsd_committer 2019-06-03 16:21:26 UTC
A commit references this bug:

Author: kib
Date: Mon Jun  3 16:21:09 UTC 2019
New revision: 348544
URL: https://svnweb.freebsd.org/changeset/base/348544

  hwpmc_intel: List all Silvermont ids.

  PR:	238310
  Based on submission by:	Masse Nicolas <nicolas.masse@stormshield.eu>
  MFC after:	1 week

Comment 4 commit-hook freebsd_committer 2019-07-26 10:22:21 UTC
A commit references this bug:

Author: kib
Date: Fri Jul 26 10:21:55 UTC 2019
New revision: 350353
URL: https://svnweb.freebsd.org/changeset/base/350353

  MFC r348544:
  hwpmc_intel: List all Silvermont ids.

  PR:	238310

_U  stable/11/