FreeBSD Bugzilla – Attachment 256636 Details for
Bug 284010
amdsmn(4), amdtemp(4): add support for Zen 5
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
zen5 support patch
zen5.patch (text/plain), 2.70 KB, created by
Simon Wells
on 2025-01-12 03:47:05 UTC
(
hide
)
Description:
zen5 support patch
Filename:
MIME Type:
Creator:
Simon Wells
Created:
2025-01-12 03:47:05 UTC
Size:
2.70 KB
patch
obsolete
>commit b09861bdce705a73a190399266d96d39d2acd6cd >Author: Simon Wells <swel024@gmail.com> >Date: Sun Jan 12 16:33:21 2025 +1300 > > amdsmn(4), amdtemp(4): add support for Zen 5 > > Zen 5 support, tested on Ryzen 7 9700X > >diff --git a/sys/dev/amdsmn/amdsmn.c b/sys/dev/amdsmn/amdsmn.c >index 9f5c55b1abd6..1fc93a68fbf3 100644 >--- a/sys/dev/amdsmn/amdsmn.c >+++ b/sys/dev/amdsmn/amdsmn.c >@@ -60,7 +60,7 @@ > #define PCI_DEVICE_ID_AMD_17H_M60H_ROOT 0x1630 /* Also F19H M50H */ > #define PCI_DEVICE_ID_AMD_19H_M10H_ROOT 0x14a4 > #define PCI_DEVICE_ID_AMD_19H_M40H_ROOT 0x14b5 >-#define PCI_DEVICE_ID_AMD_19H_M60H_ROOT 0x14d8 >+#define PCI_DEVICE_ID_AMD_19H_M60H_ROOT 0x14d8 /* Also F1AH M40H */ > #define PCI_DEVICE_ID_AMD_19H_M70H_ROOT 0x14e8 > > struct pciid; >@@ -211,6 +211,7 @@ amdsmn_probe(device_t dev) > case 0x15: > case 0x17: > case 0x19: >+ case 0x1a: > break; > default: > return (ENXIO); >diff --git a/sys/dev/amdtemp/amdtemp.c b/sys/dev/amdtemp/amdtemp.c >index 0c423e0b2502..19ec3c8e2032 100644 >--- a/sys/dev/amdtemp/amdtemp.c >+++ b/sys/dev/amdtemp/amdtemp.c >@@ -115,7 +115,7 @@ struct amdtemp_softc { > #define DEVICEID_AMD_HOSTB17H_M60H_ROOT 0x1630 /* Also F19H M50H */ > #define DEVICEID_AMD_HOSTB19H_M10H_ROOT 0x14a4 > #define DEVICEID_AMD_HOSTB19H_M40H_ROOT 0x14b5 >-#define DEVICEID_AMD_HOSTB19H_M60H_ROOT 0x14d8 >+#define DEVICEID_AMD_HOSTB19H_M60H_ROOT 0x14d8 /* Also F1AH M40H */ > #define DEVICEID_AMD_HOSTB19H_M70H_ROOT 0x14e8 > > static const struct amdtemp_product { >@@ -317,6 +317,7 @@ amdtemp_probe(device_t dev) > case 0x16: > case 0x17: > case 0x19: >+ case 0x1a: > break; > default: > return (ENXIO); >@@ -476,6 +477,7 @@ amdtemp_attach(device_t dev) > break; > case 0x17: > case 0x19: >+ case 0x1a: > sc->sc_ntemps = 1; > sc->sc_gettemp = amdtemp_gettemp17h; > needsmn = true; >@@ -539,6 +541,8 @@ amdtemp_attach(device_t dev) > amdtemp_probe_ccd_sensors17h(dev, model); > else if (family == 0x19) > amdtemp_probe_ccd_sensors19h(dev, model); >+ else if (family == 0x1a) >+ amdtemp_probe_ccd_sensors1ah(dev, model); > else if (sc->sc_ntemps > 1) { > SYSCTL_ADD_PROC(sysctlctx, > SYSCTL_CHILDREN(sysctlnode), >@@ -892,3 +896,24 @@ amdtemp_probe_ccd_sensors19h(device_t dev, uint32_t model) > > amdtemp_probe_ccd_sensors(dev, maxreg); > } >+ >+static void >+amdtemp_probe_ccd_sensors1ah(device_t dev, uint32_t model) >+{ >+ struct amdtemp_softc *sc = device_get_softc(dev); >+ uint32_t maxreg; >+ >+ switch (model) { >+ case 0x40 ... 0x4f: /* Zen5 Ryzen "Granite Ridge" */ >+ sc->sc_temp_base = AMDTEMP_ZEN4_CCD_TMP_BASE; >+ maxreg = 8; >+ _Static_assert((int)NUM_CCDS >= 8, ""); >+ break; >+ default: >+ device_printf(dev, >+ "Unrecognized Family 1ah Model: %02xh\n", model); >+ return; >+ } >+ >+ amdtemp_probe_ccd_sensors(dev, maxreg); >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 284010
: 256636