From nobody Sun Apr 21 03:19:19 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 4VMYWq4Gm7z5HHs6; Sun, 21 Apr 2024 03:19:19 +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 4VMYWq3jzLz4FnQ; Sun, 21 Apr 2024 03:19:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713669559; 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=ehZ3Ti7dLa9OEAvtgqIy4mLwGBvoo1hFyxn9pHVWQ/w=; b=LkoJ3qWEF1THQ2ydcVPrUgbf47zwBnvAwtahbk/aZ9jCP3aN78q7vN2tT5uKH6jWkNT1RV lRSlW+rF1DkS/0qGUTNB0MWh3W2gq9w4bEyg+XEf5JiuZ7CprH61BCl8VUUpI5Eqf1tfF/ UvOzao3293D9Sp4jiCYBmfFCAl+W8fYag12z68PRFp+hMtvw5YrjGT1Y6IkMhBLXKbQivO 4ilXTFaUKstRbp+QeA24dh7TQp4RypBIRuJnBo39hi3rWN6xJldfx6LC5lJa04Uno1UhtW /MaVh+2iQVbOHH32OuT92MG1BxzbdhgeoYpC9e3l5f2p0zMnvZpbipfEZiEbUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713669559; a=rsa-sha256; cv=none; b=pg+2ZXK10SbTaUO82gfSlqs4Dg97/MkVpCoQ68tb8lSeRTg0Kcs6JG9xxTbBo8+6QPf2LL r0VeH7mZNVqaw/J5lMc4jcAl9f61FDMoIY/Ow1i2r6CfUqFvoJfyiMWQNAsR3AhW/IseqD reOJ7aI2+rg4JKhrfRXBNaiZ9LXWupJyEjPyJNL6hR6ayiXBhSPefMo8liYtIOiLLuXdyV tPcrBSUdc09kRoO0qBmrcrbg+UMi+hNcJr/iLGvLr/dWmJDBnsovl9Dql7A/dvlU7hodmq fJS1YFZKlvI+tBxSnwoeEK5TIswbfymAkVxiz7ooPX7vD13uDRomBaWbuvVJ6g== 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=1713669559; 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=ehZ3Ti7dLa9OEAvtgqIy4mLwGBvoo1hFyxn9pHVWQ/w=; b=fJq8sgZNt9WdsEXBR67P1mHIghhIJZ+1YcFqI/tIiot1tWdkFBSDpig5nXlO5eNUqcunvJ /JxL0wDOebvNp4/Mfwy1aiVyRThypCPhWG+wVH52DyTeIUOdJ5kAgiGROBGz35CZPp1JW+ FCPvrR91BfpU6YTAYifEHlBQ540rE8b/wK8sPAC8zNv3QXjEtED9zBvPo2G+1w/TY/Zf4C gkWZXLURXzfmPjq/LHM4rc/DRBesO8pzjbbulH0AG2dqWHIrCeLOXib8NTdi24Sl/fJIMt 7jEj6UiG3oojUbKDxIvlBV33nzenXWURsK93lSxvnDDAbf3pXEp/ZQ5Z1PdI0Q== 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 4VMYWq31rgz13dl; Sun, 21 Apr 2024 03:19:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43L3JJof016616; Sun, 21 Apr 2024 03:19:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43L3JJpn016612; Sun, 21 Apr 2024 03:19:19 GMT (envelope-from git) Date: Sun, 21 Apr 2024 03:19:19 GMT Message-Id: <202404210319.43L3JJpn016612@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: c5179c2b8a5e - stable/13 - amdsmn(4), amdtemp(4): add support for AMD Family 19h Models 10h-1Fh. 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/13 X-Git-Reftype: branch X-Git-Commit: c5179c2b8a5e5b826f6626634b9b53dd257d6499 Auto-Submitted: auto-generated The branch stable/13 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=c5179c2b8a5e5b826f6626634b9b53dd257d6499 commit c5179c2b8a5e5b826f6626634b9b53dd257d6499 Author: Xin LI AuthorDate: 2024-04-14 07:45:17 +0000 Commit: Xin LI CommitDate: 2024-04-21 03:19:01 +0000 amdsmn(4), amdtemp(4): add support for AMD Family 19h Models 10h-1Fh. Tested on AMD Threadripper 7960X. PR: kern/278311 Tested by: jbo (cherry picked from commit 51c69c8682e8ab0e5d82ab3d6f2d16419d40bad4) --- sys/dev/amdsmn/amdsmn.c | 7 +++++++ sys/dev/amdtemp/amdtemp.c | 14 +++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/sys/dev/amdsmn/amdsmn.c b/sys/dev/amdsmn/amdsmn.c index 7737a3c3fa4c..decb2c1249ed 100644 --- a/sys/dev/amdsmn/amdsmn.c +++ b/sys/dev/amdsmn/amdsmn.c @@ -59,6 +59,7 @@ #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0 #define PCI_DEVICE_ID_AMD_17H_M30H_ROOT 0x1480 /* Also M70H, F19H M00H/M20H */ #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 struct pciid; @@ -103,6 +104,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_M10H_ROOT, + .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_M60H_ROOT, diff --git a/sys/dev/amdtemp/amdtemp.c b/sys/dev/amdtemp/amdtemp.c index 2fdecead6c0f..b38f92131c77 100644 --- a/sys/dev/amdtemp/amdtemp.c +++ b/sys/dev/amdtemp/amdtemp.c @@ -70,7 +70,11 @@ typedef enum { CCD6, CCD7, CCD8, - CCD_MAX = CCD8, + CCD9, + CCD10, + CCD11, + CCD12, + CCD_MAX = CCD12, NUM_CCDS = CCD_MAX - CCD_BASE + 1, } amdsensor_t; @@ -110,6 +114,7 @@ struct amdtemp_softc { #define DEVICEID_AMD_HOSTB17H_M10H_ROOT 0x15d0 #define DEVICEID_AMD_HOSTB17H_M30H_ROOT 0x1480 /* Also M70H, F19H M00H/M20H */ #define DEVICEID_AMD_HOSTB17H_M60H_ROOT 0x1630 +#define DEVICEID_AMD_HOSTB19H_M10H_ROOT 0x14a4 #define DEVICEID_AMD_HOSTB19H_M60H_ROOT 0x14d8 static const struct amdtemp_product { @@ -135,6 +140,7 @@ static const struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M10H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M30H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M60H_ROOT, false }, + { VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M10H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M60H_ROOT, false }, }; @@ -181,6 +187,7 @@ static const struct amdtemp_product { #define AMDTEMP_17H_CCD_TMP_BASE 0x59954 #define AMDTEMP_17H_CCD_TMP_VALID (1u << 11) +#define AMDTEMP_ZEN4_10H_CCD_TMP_BASE 0x59b00 #define AMDTEMP_ZEN4_CCD_TMP_BASE 0x59b08 /* @@ -862,6 +869,11 @@ amdtemp_probe_ccd_sensors19h(device_t dev, uint32_t model) maxreg = 8; _Static_assert((int)NUM_CCDS >= 8, ""); break; + case 0x10 ... 0x1f: + sc->sc_temp_base = AMDTEMP_ZEN4_10H_CCD_TMP_BASE; + maxreg = 12; + _Static_assert((int)NUM_CCDS >= 12, ""); + break; case 0x60 ... 0x6f: /* Zen4 Ryzen "Raphael" */ sc->sc_temp_base = AMDTEMP_ZEN4_CCD_TMP_BASE; maxreg = 8;