Summary: | [amdtemp] does not recognize AMD Ryzen Threadripper 3970X (Zen 2) | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Michael Lackner <blackvenom> | ||||||
Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||||
Status: | Closed DUPLICATE | ||||||||
Severity: | Affects Some People | CC: | blackvenom, cem, crest, emaste | ||||||
Priority: | --- | Keywords: | patch | ||||||
Version: | 12.1-RELEASE | ||||||||
Hardware: | amd64 | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
Michael Lackner
2020-01-17 08:54:41 UTC
Created attachment 210815 [details]
output of "# pciconf -lv"
Created attachment 210816 [details]
Output of "# devinfo -v"
The driver support for Zen 2 hasn't been MFCed from 13-CURRENT. This is the patch I use to add support for the Ryzen 3600X in home server to amdtemp: Index: sys/dev/amdsmn/amdsmn.c =================================================================== --- sys/dev/amdsmn/amdsmn.c (revision 356412) +++ sys/dev/amdsmn/amdsmn.c (working copy) @@ -59,6 +59,7 @@ #define PCI_DEVICE_ID_AMD_15H_M60H_ROOT 0x1576 #define PCI_DEVICE_ID_AMD_17H_ROOT 0x1450 #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0 +#define PCI_DEVICE_ID_AMD_17H_M30H_ROOT 0x1480 struct pciid; struct amdsmn_softc { @@ -90,6 +91,12 @@ .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_17H_M30H_ROOT, + .amdsmn_addr_reg = F17H_SMN_ADDR_REG, + .amdsmn_data_reg = F17H_SMN_DATA_REG, + }, }; /* Index: sys/dev/amdtemp/amdtemp.c =================================================================== --- sys/dev/amdtemp/amdtemp.c (revision 356412) +++ sys/dev/amdtemp/amdtemp.c (working copy) @@ -96,6 +96,7 @@ #define DEVICEID_AMD_MISC16_M30H 0x1583 #define DEVICEID_AMD_HOSTB17H_ROOT 0x1450 #define DEVICEID_AMD_HOSTB17H_M10H_ROOT 0x15d0 +#define DEVICEID_AMD_HOSTB17H_M30H_ROOT 0x1480 static const struct amdtemp_product { uint16_t amdtemp_vendorid; @@ -118,6 +119,7 @@ { VENDORID_AMD, DEVICEID_AMD_MISC16_M30H, true }, { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M10H_ROOT, false }, + { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M30H_ROOT, false }, }; /* The driver support for Zen 2 hasn't been MFCed from 13-CURRENT. This is the patch I use to add support for the Ryzen 3600X in home server to amdtemp: Index: sys/dev/amdsmn/amdsmn.c =================================================================== --- sys/dev/amdsmn/amdsmn.c (revision 356412) +++ sys/dev/amdsmn/amdsmn.c (working copy) @@ -59,6 +59,7 @@ #define PCI_DEVICE_ID_AMD_15H_M60H_ROOT 0x1576 #define PCI_DEVICE_ID_AMD_17H_ROOT 0x1450 #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0 +#define PCI_DEVICE_ID_AMD_17H_M30H_ROOT 0x1480 struct pciid; struct amdsmn_softc { @@ -90,6 +91,12 @@ .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_17H_M30H_ROOT, + .amdsmn_addr_reg = F17H_SMN_ADDR_REG, + .amdsmn_data_reg = F17H_SMN_DATA_REG, + }, }; /* Index: sys/dev/amdtemp/amdtemp.c =================================================================== --- sys/dev/amdtemp/amdtemp.c (revision 356412) +++ sys/dev/amdtemp/amdtemp.c (working copy) @@ -96,6 +96,7 @@ #define DEVICEID_AMD_MISC16_M30H 0x1583 #define DEVICEID_AMD_HOSTB17H_ROOT 0x1450 #define DEVICEID_AMD_HOSTB17H_M10H_ROOT 0x15d0 +#define DEVICEID_AMD_HOSTB17H_M30H_ROOT 0x1480 static const struct amdtemp_product { uint16_t amdtemp_vendorid; @@ -118,6 +119,7 @@ { VENDORID_AMD, DEVICEID_AMD_MISC16_M30H, true }, { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M10H_ROOT, false }, + { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M30H_ROOT, false }, }; /* Cc: latest committer to amdsmn.c in 13-CURRENT. Alright, this was a user mistake! I compiled the correctly patched source code, and installed the modules in /boot/modules/. It seems modules in /boot/kernel/ are loaded first though, and I still had the old version in there. So I loaded the old version. I corrected that and can now confirm that this works for Zen 2 Threadrippers as well, e.g.: $ sysctl dev.cpu.62.temperature dev.cpu.62.temperature: 84.6C Is this still not merged to stable/12 and stable/11 though? (In reply to Ed Maste from comment #7) Correct, AFAIK. Actually, Mav MFC'd them to 12/11. Maybe just not in 12.1. *** This bug has been marked as a duplicate of bug 239607 *** |