Module Name: src Committed By: martin Date: Wed Oct 9 13:27:52 UTC 2024
Modified Files: src/sys/arch/x86/pci [netbsd-10]: amdzentemp.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #940): sys/arch/x86/pci/amdzentemp.c: revision 1.21 amdzentemp(4): Add support for CPU family 0x1a model 0x40...0x4f (Zen 5) To generate a diff of this commit: cvs rdiff -u -r1.16.2.2 -r1.16.2.3 src/sys/arch/x86/pci/amdzentemp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/pci/amdzentemp.c diff -u src/sys/arch/x86/pci/amdzentemp.c:1.16.2.2 src/sys/arch/x86/pci/amdzentemp.c:1.16.2.3 --- src/sys/arch/x86/pci/amdzentemp.c:1.16.2.2 Tue Aug 22 16:07:34 2023 +++ src/sys/arch/x86/pci/amdzentemp.c Wed Oct 9 13:27:51 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: amdzentemp.c,v 1.16.2.2 2023/08/22 16:07:34 martin Exp $ */ +/* $NetBSD: amdzentemp.c,v 1.16.2.3 2024/10/09 13:27:51 martin Exp $ */ /* $OpenBSD: kate.c,v 1.2 2008/03/27 04:52:03 cnst Exp $ */ /* @@ -53,7 +53,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: amdzentemp.c,v 1.16.2.2 2023/08/22 16:07:34 martin Exp $ "); +__KERNEL_RCSID(0, "$NetBSD: amdzentemp.c,v 1.16.2.3 2024/10/09 13:27:51 martin Exp $ "); #include <sys/param.h> #include <sys/bus.h> @@ -208,6 +208,7 @@ amdzentemp_attach(device_t parent, devic break; case 0x17: case 0x19: + case 0x1a: sc->sc_sme->sme_refresh = amdzentemp_family17_refresh; break; default: @@ -429,6 +430,25 @@ amdzentemp_probe_ccd_sensors19h(struct a } static int +amdzentemp_probe_ccd_sensors1ah(struct amdzentemp_softc *sc, int model) +{ + int maxreg; + + switch (model) { + case 0x40 ... 0x4f: /* Zen5 */ + sc->sc_ccd_offset = 0x300; + maxreg = 8; + break; + default: + aprint_error_dev(sc->sc_dev, + "Unrecognized Family 19h Model: %02xh\n", model); + return 0; + } + + return maxreg; +} + +static int amdzentemp_probe_ccd_sensors(struct amdzentemp_softc *sc, int family, int model) { int nccd; @@ -440,6 +460,9 @@ amdzentemp_probe_ccd_sensors(struct amdz case 0x19: nccd = amdzentemp_probe_ccd_sensors19h(sc, model); break; + case 0x1a: + nccd = amdzentemp_probe_ccd_sensors1ah(sc, model); + break; default: return 0; }