From nobody Fri Aug 23 04:52:02 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 4WqnjZ55Gtz5VH1L; Fri, 23 Aug 2024 04:52:02 +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 4WqnjZ4bN4z42yZ; Fri, 23 Aug 2024 04:52:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724388722; 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=ZfFXBmePbT7g7bTXUd0nqd1EUnlmgAmNwsGdYMlQFn4=; b=N8gylc6gSdelZyKnB3S5syc7kpq/CbiLLrwfw6l8VHyg0impuz2vCK6Je9okyq7f0869tF zS557td2LFqiOG18Wg6nqWywRIKHTm9f19XD1hcFVT3hrm93lBaNaOVsU0lLFEDoFbMOIY SRA7THBd86V9m4ozWBaq77TBN/Q+P0wh0e1DC61Q1GqERAW7KugUGpZGWa0u5dxxea/CzJ I/UuGetIYKpFaj6Vqu8McAlqKD9eeD0Tr6MtjzMwaWdtXUuv2lsqTQY+51wl9cSpoVoMMY 8Rs+59D9DXPqT0HdKCTsp0iLHdiVaGsVWHU6gKQ7WiUwzXYaVomUnllJcFqWYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724388722; a=rsa-sha256; cv=none; b=JRi2gQvzKyTOz8OTXSJyE/+e9jjWq1Asa5ywOxrNqOlWUNT16a7zLV/g6quZjbLoZyAEj3 qCIB+fMXt/LSJw62hgIx6HNy6IfAHwG8UfVALKAA/uwbRSR3j46zYrqvl37sn1qPP0Dcug ukMpaXnSulkdYFmHGeLilFoEIZI6V4/0bArSHTOCTafFR/USwkNK0EVTRYBE6AO/NU0Qpk LlgoDGRwNSFAXRRKrxrKucaFol/VIVUurCzUS1JldcMQpB8SDfQTj2j70rZxs54OLDGBPJ QSfjofgsTQtd+CC9ynfntTa4JNzEBNkxDAnVs2Fn1HEneINfbUxOMxF/FxOhZw== 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=1724388722; 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=ZfFXBmePbT7g7bTXUd0nqd1EUnlmgAmNwsGdYMlQFn4=; b=FjkJSAPp7dot1dZ6tmIB73nI9wawLfqZdZ+s6Qd7ijuwzZukLhCcmDHSyX0bHv+T0OzMVf NHQO63nLWSLXwMleP9Fh1oCv0Dc3mbgv9Mp5WhxY6HlVrHFRdJ2r7WVZ9KWv9HM0WJ3cYf r47JS1ADz4cuDlXEsSyly7kh97+TUjNjI184UHd0Bi1dFatlRjFLdtTmY0qPwfkv53Mqoq T5rgARBDG9g28sTJ3jAroeRbzxWBz07ECf7AeDUf5jwMnrZLMRvniWRlUz9OmyOL0FxY6v EzmUrOrbCReY+2IQUfa3cHOe6A4t7dRFtMdJq7c7NehNWm5zty7MxjmobV37aQ== 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 4WqnjZ3vqtzxBL; Fri, 23 Aug 2024 04:52:02 +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 47N4q2vK082614; Fri, 23 Aug 2024 04:52:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47N4q2v1082611; Fri, 23 Aug 2024 04:52:02 GMT (envelope-from git) Date: Fri, 23 Aug 2024 04:52:02 GMT Message-Id: <202408230452.47N4q2v1082611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: ef3f8aa0a049 - main - 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/main X-Git-Reftype: branch X-Git-Commit: ef3f8aa0a0492487ac7db839de078b1913f61b4c Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=ef3f8aa0a0492487ac7db839de078b1913f61b4c commit ef3f8aa0a0492487ac7db839de078b1913f61b4c Author: Oliver Fromme AuthorDate: 2024-08-23 04:46:19 +0000 Commit: Xin LI CommitDate: 2024-08-23 04:51:19 +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 --- 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 cb2ddbd86c2e..9a0428608a27 100644 --- a/sys/dev/amdsmn/amdsmn.c +++ b/sys/dev/amdsmn/amdsmn.c @@ -60,6 +60,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 { @@ -115,6 +116,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 9ff7388fd70c..ff9866c6221b 100644 --- a/sys/dev/amdtemp/amdtemp.c +++ b/sys/dev/amdtemp/amdtemp.c @@ -115,6 +115,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; @@ -141,6 +142,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 }, }; /* @@ -873,6 +875,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, "");