From nobody Fri Nov 26 00:26:09 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4E4A018A50AA; Fri, 26 Nov 2021 00:26:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J0bBn6zLDz4gK3; Fri, 26 Nov 2021 00:26:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF6CF270A8; Fri, 26 Nov 2021 00:26:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AQ0Q9VY082808; Fri, 26 Nov 2021 00:26:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AQ0Q96M082807; Fri, 26 Nov 2021 00:26:09 GMT (envelope-from git) Date: Fri, 26 Nov 2021 00:26:09 GMT Message-Id: <202111260026.1AQ0Q96M082807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 913c07a04998 - main - hwpmc: Add IDs for Intel Comet/Ice/Tiger/Rocketlake CPUs. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 913c07a04998b8cd11dc428f5d00fae7dd392244 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637886370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=39Padcu3EeLrEO0IOiODfBvWxHAQ+jCdn7CTTzq2MRM=; b=yqU+fRN6KFOWBW9bZh8+dLC+NcfYRi3D/+hjc3eCOaYY84Em/N39iDSUr4XHQxJctQyuBb WG+HZS8CSzNtiAbSw6PaOz0TepKJ59lNoLSh4yUgU5iAlgvV03gfn6B7w4dqXahUiXSgw3 gOo0xJSmdGL640ZB0WhIMftrydJes98qfT9J+Sg9tsNPyG8S2C4bZ5xK7EuT1BzBomSeGL 5NEZALjpSopIPuFJJfhgzn/uPk1U958E07GT2dKsj0zgRYx+2kR7gmfPtfCeyYl05deega dlnApKdMBCVYfhx1qcigbuw8FqJ5TgJDugky8n9uFkx0hf84sut3Z6D5sEKJug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637886370; a=rsa-sha256; cv=none; b=DIBEMYR2bJ9eQYtJ2Hs0GUF9LluTdZ/kZqHDDtS4GGM3ROiUfV9dk3b4SoxCCFF20xAgxO DBmeLioBr3xRRP1biAWXkJjUR9H00B0XloC1ODyl/QAic8K4L5+aciIRYAZx+kl7GuxZ/l y7TZJ680ymg8A0f8Pdm9PktJ4dBvUtvmOzX4/B4cJMdx84Icyv34YOB4eupN76FdZ2rCrB b+gB/sCBJL++wasktvlNX1cQx02EzoDQgAZv4D31L/Ic4rHLlQPJ7DnzTw4quheVQeCeUO vd/9oHisKsUGpOLhkgY6qbhw92xla4W8j/UoChK6NolP0wBPMLdsCASjSPKM5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=913c07a04998b8cd11dc428f5d00fae7dd392244 commit 913c07a04998b8cd11dc428f5d00fae7dd392244 Author: Alexander Motin AuthorDate: 2021-11-26 00:17:58 +0000 Commit: Alexander Motin CommitDate: 2021-11-26 00:26:04 +0000 hwpmc: Add IDs for Intel Comet/Ice/Tiger/Rocketlake CPUs. MFC after: 1 month --- sys/dev/hwpmc/hwpmc_core.c | 4 +++- sys/dev/hwpmc/hwpmc_intel.c | 23 +++++++++++++++++++++++ sys/sys/pmc.h | 2 ++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index 84967e8a6248..fadbbfae27d7 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -761,6 +761,8 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm, break; case PMC_CPU_INTEL_SKYLAKE: case PMC_CPU_INTEL_SKYLAKE_XEON: + case PMC_CPU_INTEL_ICELAKE: + case PMC_CPU_INTEL_ICELAKE_XEON: case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_BROADWELL_XEON: case PMC_CPU_INTEL_SANDYBRIDGE: @@ -1263,7 +1265,7 @@ pmc_core_initialize(struct pmc_mdep *md, int maxcpu, int version_override) PMCDBG3(MDP,INI,1,"core-init cputype=%d ncpu=%d ipa-version=%d", core_cputype, maxcpu, ipa_version); - if (ipa_version < 1 || ipa_version > 4 || + if (ipa_version < 1 || ipa_version > 5 || (core_cputype != PMC_CPU_INTEL_CORE && ipa_version == 1)) { /* Unknown PMC architecture. */ printf("hwpc_core: unknown PMC architecture: %d\n", diff --git a/sys/dev/hwpmc/hwpmc_intel.c b/sys/dev/hwpmc/hwpmc_intel.c index 6cc6ae3b50d6..2d8377e1a838 100644 --- a/sys/dev/hwpmc/hwpmc_intel.c +++ b/sys/dev/hwpmc/hwpmc_intel.c @@ -169,6 +169,9 @@ pmc_intel_initialize(void) /* Kabylake */ case 0x8E: /* Per Intel document 325462-063US July 2017. */ case 0x9E: /* Per Intel document 325462-063US July 2017. */ + /* Cometlake */ + case 0xA5: + case 0xA6: cputype = PMC_CPU_INTEL_SKYLAKE; nclasses = 3; break; @@ -176,6 +179,22 @@ pmc_intel_initialize(void) cputype = PMC_CPU_INTEL_SKYLAKE_XEON; nclasses = 3; break; + /* Icelake */ + case 0x7D: + case 0x7E: + /* Tigerlake */ + case 0x8C: + case 0x8D: + /* Rocketlake */ + case 0xA7: + cputype = PMC_CPU_INTEL_ICELAKE; + nclasses = 3; + break; + case 0x6A: + case 0x6C: + cputype = PMC_CPU_INTEL_ICELAKE_XEON; + nclasses = 3; + break; case 0x3D: case 0x47: cputype = PMC_CPU_INTEL_BROADWELL; @@ -242,6 +261,8 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_BROADWELL_XEON: case PMC_CPU_INTEL_SKYLAKE_XEON: case PMC_CPU_INTEL_SKYLAKE: + case PMC_CPU_INTEL_ICELAKE: + case PMC_CPU_INTEL_ICELAKE_XEON: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: @@ -325,6 +346,8 @@ pmc_intel_finalize(struct pmc_mdep *md) case PMC_CPU_INTEL_BROADWELL_XEON: case PMC_CPU_INTEL_SKYLAKE_XEON: case PMC_CPU_INTEL_SKYLAKE: + case PMC_CPU_INTEL_ICELAKE: + case PMC_CPU_INTEL_ICELAKE_XEON: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h index 7491a43023f3..b54bc8d8e9f0 100644 --- a/sys/sys/pmc.h +++ b/sys/sys/pmc.h @@ -111,6 +111,8 @@ extern char pmc_cpuid[PMC_CPUID_LEN]; __PMC_CPU(INTEL_SKYLAKE, 0x98, "Intel Skylake") \ __PMC_CPU(INTEL_SKYLAKE_XEON, 0x99, "Intel Skylake Xeon") \ __PMC_CPU(INTEL_ATOM_GOLDMONT, 0x9A, "Intel Atom Goldmont") \ + __PMC_CPU(INTEL_ICELAKE, 0x9B, "Intel Icelake") \ + __PMC_CPU(INTEL_ICELAKE_XEON, 0x9C, "Intel Icelake Xeon") \ __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K") \ __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \