From nobody Sun Apr 14 08:03:10 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 4VHN8Z3nr0z5G2h4; Sun, 14 Apr 2024 08:03: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 4VHN8Z2ztPz4jy7; Sun, 14 Apr 2024 08:03:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713081790; 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=O2Rhf+nW7aioPo5LGmrywrMms+qZKk7jj4jG1/OpV7E=; b=MJY7rvYfI83T1uLzkQS8mJtQjkxjuKO8xRwKldPwZNaz3R8qSpxDt2AvPa4+ua3sMiEkn4 S0Oo5QAjuT1gfS8i0qasaVCskcMykA+1V+X2Ace3PKrdWx6CVC1elCjqOL0s/WEnA7FfFl 5m5p7PgaK26FSXOh4Z4h6Tv3++QrLV9FC421SxuXOQxjNU3/NuPACFQ9t1DOsqf4Orz1CV Z41jl70Wef7v8hABrx59SxbfyWl63NyTk9nrPByqy7+oZzka/VDSmcSru0lLhz5WXxb+yR eOoOsUgPGM7zG/gxIJ45UcYnAlUTq+RmWjVnMMmcyfzdaC3ShzG0VyJsT1JCkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713081790; a=rsa-sha256; cv=none; b=ii98eyom/+z1wA+10D857wuGlQSnZ3SYcMAPfIPhF6hfQxArBKsBzA/J8turs5kItNSFel vjhlxbpKieE+6brQ27R7wwN8GbkX4dPx2KkcefnMooYT/WPVBVw1XT9nvZj6gCUYZvRHpT KCjAqqiNAV4xIz2Ovvt7GEnGUoAdM+BQ0ih9VRkWcTV9W2FQO3mXqO2UMDjE9GZVa2AlVC xPMMXFCOq6SuCZUPaEE5veOFjIwlUsxWL0BN9l3/Ec9DuVKynhKAxwy7tyQNhequZ/UvpD suAhHkLduaidr1x5kBE8m7gcwpouNClk38Xk3XUqAPc0pH/aJjPdbScG6X7Z/A== 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=1713081790; 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=O2Rhf+nW7aioPo5LGmrywrMms+qZKk7jj4jG1/OpV7E=; b=ZLDbZjwZYKLVQcyhdfOZSktjwb5Gm80/0SpkC4ccBYbQ6Q0IM/r6QmdQmk8ety+OfOMin8 6lI86He7QXPc+V0c1xrpmf8DEUrweRSglwiQh6CeINpDPpxOjenDaJgEw0S5G2J/XYmmzP CtMnDHg0T/eeZO9PvJoggKsBc9y+5MdZwKNUPvTx+y34QfyyIE1DhRIVJGXX/z058XalHu FCINYqpOXMhn8XbqWEqpSUM+DDsl/0TEKrZ8eSNkEaJJ2BWrXP7KSBmDYGhxE15u/fTyDA yJ+dRRyWo/uJwVO30d0FiWxdbs65Vm9Z8bMgz47edagGR6hYLigIt3gIEx1XxA== 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 4VHN8Z2bC3z17cf; Sun, 14 Apr 2024 08:03:10 +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 43E83ACO022130; Sun, 14 Apr 2024 08:03:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43E83AxG022127; Sun, 14 Apr 2024 08:03:10 GMT (envelope-from git) Date: Sun, 14 Apr 2024 08:03:10 GMT Message-Id: <202404140803.43E83AxG022127@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: 51c69c8682e8 - main - 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 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: 51c69c8682e8ab0e5d82ab3d6f2d16419d40bad4 Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=51c69c8682e8ab0e5d82ab3d6f2d16419d40bad4 commit 51c69c8682e8ab0e5d82ab3d6f2d16419d40bad4 Author: Xin LI AuthorDate: 2024-04-14 07:45:17 +0000 Commit: Xin LI CommitDate: 2024-04-14 07:52:08 +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 MFC after: 1 week --- 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 a676bbb6b0f2..ddb5be4c2c3c 100644 --- a/sys/dev/amdsmn/amdsmn.c +++ b/sys/dev/amdsmn/amdsmn.c @@ -58,6 +58,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; @@ -102,6 +103,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 865804bdc96e..56772432773e 100644 --- a/sys/dev/amdtemp/amdtemp.c +++ b/sys/dev/amdtemp/amdtemp.c @@ -69,7 +69,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; @@ -109,6 +113,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 { @@ -134,6 +139,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 }, }; @@ -180,6 +186,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 /* @@ -860,6 +867,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;