From nobody Mon Aug 26 05:16:03 2024 X-Original-To: dev-commits-src-all@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 4Wsf5w0rFjz5VFBN; Mon, 26 Aug 2024 05:16:04 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wsf5w0J02z56P8; Mon, 26 Aug 2024 05:16:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724649364; 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=3TIDybSH8Qc/pktVSjn2PvLKhyUVQi9L4vojNUqtddg=; b=n90FrkmCY6WMEuRekTb6BoFpUssnHyuHTp9J0Wju+t/PA8t9lmJk2GRJ7Ib/jQYzK2pRlO eK8i2APgUv1IOEHoEPVOf0p2IrUqPc2bSSKaAO0yOApKI8fdPb2kkM34gXo9CIm82812gh iPYhPE5tA+wEf6uBMZ870ywosgQsc1N/xtpWOInFiqUuLG4KmBwI2mvE7uLtShdot0+mWh OpRzmFJfYAztxVML7YnCIRTekGV5fJelWlc4HkjB1vjnf5Ea/jqeckSIjKMK8o1tUGa8VJ wAw33zPT+It7CGJYDS3kSoc+AD4PCCxi/TzdEPdNNK2KI4505XSDTVtiLeEeQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724649364; a=rsa-sha256; cv=none; b=ZOHTpH2mrWxNlOPJ5F8lvjY0d6wszKjEzzpXGp1xD3b2MdHN3P1PQ3N4GzNKTf4BxC9dlf BHX261gmW7+4IhhZxAzFCeS5XlJizSys0dj7AGKnn+v5Px64WmTFuNhHra3c8ToCvVPRUW YcSv80GHERvU7dp5BemrERPOESuNIto6drzUTQCMNDetJ/v7l9S2qKT/IDftDn5UtYB75D 1Kt0NYM9BbQt3Rc9SlZsOxFivA7+xULE8lLODHdHv+I1CoFQBd04kzT8AznzKsXXyg6h3V fftzyOGhB6O/eksJ0WZS/h2MJBmSRS+6wU145jphjf791hd3eUnWa9GpRX1Vbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724649364; 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=3TIDybSH8Qc/pktVSjn2PvLKhyUVQi9L4vojNUqtddg=; b=dzvoghCpv45Nauc/PXQoLvtnCKbkGY9jU8GJx5KwQoxWO5ODU0geQbG+QVxG5/IisrCYx1 UwknPCHRpsU5T9CBteg6jMDRCMYbIVdxHP+x7t6P0jIFV0dqgExMkZgZDJXzjAPq0/FrHH 6LIQcYgI4kOxUquReYHxSU9Fw1vZTmyvrPy4JyC1lJy0cBxkCJIuGAql0daw272BBRwdu8 BTZ3aFirMH+n4CryFFTFnHZ6xFC8t55TLtrtU1JcXbq+po2vgQ9yYT9NEWKz/tjqEpO37b 8UXvZkKb6jJtrrSRB7+GncRU2Vk6n+KzLiXkRUR3PrSmGcDpyE0Qew2jmYXU9w== 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 4Wsf5v70dpztXw; Mon, 26 Aug 2024 05:16:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47Q5G37O035346; Mon, 26 Aug 2024 05:16:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47Q5G32f035343; Mon, 26 Aug 2024 05:16:03 GMT (envelope-from git) Date: Mon, 26 Aug 2024 05:16:03 GMT Message-Id: <202408260516.47Q5G32f035343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: c7d5163a1335 - stable/14 - amdsmn(4), amdtemp(4): add support for AMD Ryzen 7 "Phoenix" processors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c7d5163a1335a1ff41bee28a6d49c87cdbd36411 Auto-Submitted: auto-generated The branch stable/14 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=c7d5163a1335a1ff41bee28a6d49c87cdbd36411 commit c7d5163a1335a1ff41bee28a6d49c87cdbd36411 Author: Oliver Fromme AuthorDate: 2024-08-23 04:46:19 +0000 Commit: Xin LI CommitDate: 2024-08-26 05:15:43 +0000 amdsmn(4), amdtemp(4): add support for AMD Ryzen 7 "Phoenix" processors Adds support for AMD Ryzen 7 "Phoenix" processors (family 0x19, model 0x70-0x7f) to the amdsmn(4) and amdtemp(4) drivers. This enables temperature readings of these CPUs via sysctl. The sensors function identically to those for the "Raphael" processors (model 0x60-0x6f); only the PCI device ID differs. PR: kern/280942 Relnotes: yes MFC after: 3 days (cherry picked from commit ef3f8aa0a0492487ac7db839de078b1913f61b4c) --- sys/dev/amdsmn/amdsmn.c | 7 +++++++ sys/dev/amdtemp/amdtemp.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/sys/dev/amdsmn/amdsmn.c b/sys/dev/amdsmn/amdsmn.c index 5af8d9aca7bd..a0a7b9db60f8 100644 --- a/sys/dev/amdsmn/amdsmn.c +++ b/sys/dev/amdsmn/amdsmn.c @@ -61,6 +61,7 @@ #define PCI_DEVICE_ID_AMD_17H_M60H_ROOT 0x1630 #define PCI_DEVICE_ID_AMD_19H_M10H_ROOT 0x14a4 #define PCI_DEVICE_ID_AMD_19H_M60H_ROOT 0x14d8 +#define PCI_DEVICE_ID_AMD_19H_M70H_ROOT 0x14e8 struct pciid; struct amdsmn_softc { @@ -116,6 +117,12 @@ static const struct pciid { .amdsmn_addr_reg = F17H_SMN_ADDR_REG, .amdsmn_data_reg = F17H_SMN_DATA_REG, }, + { + .amdsmn_vendorid = CPU_VENDOR_AMD, + .amdsmn_deviceid = PCI_DEVICE_ID_AMD_19H_M70H_ROOT, + .amdsmn_addr_reg = F17H_SMN_ADDR_REG, + .amdsmn_data_reg = F17H_SMN_DATA_REG, + }, }; /* diff --git a/sys/dev/amdtemp/amdtemp.c b/sys/dev/amdtemp/amdtemp.c index 73a4ba86bb84..583ff80cac69 100644 --- a/sys/dev/amdtemp/amdtemp.c +++ b/sys/dev/amdtemp/amdtemp.c @@ -116,6 +116,7 @@ struct amdtemp_softc { #define DEVICEID_AMD_HOSTB17H_M60H_ROOT 0x1630 #define DEVICEID_AMD_HOSTB19H_M10H_ROOT 0x14a4 #define DEVICEID_AMD_HOSTB19H_M60H_ROOT 0x14d8 +#define DEVICEID_AMD_HOSTB19H_M70H_ROOT 0x14e8 static const struct amdtemp_product { uint16_t amdtemp_vendorid; @@ -142,6 +143,7 @@ static const struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M60H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M10H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M60H_ROOT, false }, + { VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M70H_ROOT, false }, }; /* @@ -874,6 +876,7 @@ amdtemp_probe_ccd_sensors19h(device_t dev, uint32_t model) _Static_assert((int)NUM_CCDS >= 12, ""); break; case 0x60 ... 0x6f: /* Zen4 Ryzen "Raphael" */ + case 0x70 ... 0x7f: /* Zen4 Ryzen "Phoenix" */ sc->sc_temp_base = AMDTEMP_ZEN4_CCD_TMP_BASE; maxreg = 8; _Static_assert((int)NUM_CCDS >= 8, "");