Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2024 05:17:33 GMT
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: cb8f15aeede6 - stable/13 - amdsmn(4), amdtemp(4): add support for AMD Ryzen 7 "Phoenix" processors
Message-ID:  <202408260517.47Q5HXaj035704@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by delphij:

URL: https://cgit.FreeBSD.org/src/commit/?id=cb8f15aeede63627e220c40fe4911df79f35fb69

commit cb8f15aeede63627e220c40fe4911df79f35fb69
Author:     Oliver Fromme <olli@FreeBSD.org>
AuthorDate: 2024-08-23 04:46:19 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2024-08-26 05:17:17 +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 decb2c1249ed..fbef358f4957 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 b38f92131c77..0e7f805b40fd 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 },
 };
 
 /*
@@ -875,6 +877,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, "");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408260517.47Q5HXaj035704>