Bug 238310

Summary: PMC: Add Baytrail cpuid to pmc
Product: Base System Reporter: Masse Nicolas <nicolas.masse>
Component: kernAssignee: Konstantin Belousov <kib>
Status: Closed FIXED    
Severity: Affects Some People CC: br, cem, kib
Priority: --- Keywords: easy, feature, needs-qa, patch
Version: 11.2-RELEASEFlags: koobs: mfc-stable12?
koobs: mfc-stable11?
Hardware: Any   
OS: Any   
Attachments:
Description Flags
add baytrail id none

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

Log:
  hwpmc_intel: List all Silvermont ids.

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

Changes:
  head/sys/dev/hwpmc/hwpmc_intel.c
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

Log:
  MFC r348544:
  hwpmc_intel: List all Silvermont ids.

  PR:	238310

Changes:
_U  stable/11/
  stable/11/sys/dev/hwpmc/hwpmc_intel.c