Re: No amdtemp sysctls, AMD Ryzen 5 3600X

2019-11-28 Thread Jan Bramkamp

Here is the patch to add support for 3rd gen Ryzen to amdtemp:

Index: sys/dev/amdsmn/amdsmn.c
===
--- sys/dev/amdsmn/amdsmn.c    (revision 355171)
+++ 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 355171)
+++ 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 },
 };

 /*

On 15.11.19 15:07, Mark Martinec wrote:

On 15/11/2019 3:27 am, Mark Martinec wrote:

Running 12.1-RELEASE-p1 on AMD Ryzen 5 3600X cpu,
but I don't see any temperatures reported in sysctl,
even though amdtemp.ko and amdsmn.ko are loaded
and they don't produce any complaints on loading.


2019-11-15 03:01, Kubilay Kocak wrote:

Resolver of original Ryzen 2 temperature support:
  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218264
"In Progress" issue for Ryzen 5 support with patch:
  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239607


I have applied the patch from Bug 239607 and it works now!
Perfect, thanks!


Was committed to head (CURRENT), apparently merged to stable/12
(cant find the MFC commit).
I've updated/retriaged the issue, and asked about a merge to
stable/11, but at this point it looks like it missed the 12.1-RELEASE
window


It's unfortunate that it missed the 12.1-RELEASE.
Thanks for a quick response!

  Mark
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: No amdtemp sysctls, AMD Ryzen 5 3600X

2019-11-15 Thread Mark Martinec

On 15/11/2019 3:27 am, Mark Martinec wrote:

Running 12.1-RELEASE-p1 on AMD Ryzen 5 3600X cpu,
but I don't see any temperatures reported in sysctl,
even though amdtemp.ko and amdsmn.ko are loaded
and they don't produce any complaints on loading.


2019-11-15 03:01, Kubilay Kocak wrote:

Resolver of original Ryzen 2 temperature support:
  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218264
"In Progress" issue for Ryzen 5 support with patch:
  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239607


I have applied the patch from Bug 239607 and it works now!
Perfect, thanks!


Was committed to head (CURRENT), apparently merged to stable/12
(cant find the MFC commit).
I've updated/retriaged the issue, and asked about a merge to
stable/11, but at this point it looks like it missed the 12.1-RELEASE
window


It's unfortunate that it missed the 12.1-RELEASE.
Thanks for a quick response!

  Mark
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: No amdtemp sysctls, AMD Ryzen 5 3600X

2019-11-14 Thread Kubilay Kocak

On 15/11/2019 3:27 am, Mark Martinec wrote:

Running 12.1-RELEASE-p1 on AMD Ryzen 5 3600X cpu,
but I don't see any temperatures reported in sysctl,
even though amdtemp.ko and amdsmn.ko are loaded
and they don't produce any complaints on loading.

   $ kldstat | fgrep amd
   27    1 0x82f3 1458 amdtemp.ko
   28    1 0x82f32000  808 amdsmn.ko

   $ sysctl -a | grep -i tempe
   $

   $ sysctl dev.amdtemp
   sysctl: unknown oid 'dev.amdtemp'
   $

Nov 13 12:07:27 xxx kernel: CPU: AMD Ryzen 5 3600X 6-Core Processor 
(4100.09-MHz K8-class CPU)
Nov 13 12:07:27 xxx kernel:   Origin="AuthenticAMD"  Id=0x870f10 
Family=0x17  Model=0x71  Stepping=0



Motherboard is an ASUS with X570 chipset, latest BIOS.
No obvious errors are reported during booting.

Any additional information that I can provide?
Any suggestions?

   Mark


Resolver of original Ryzen 2 temperature support:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218264

"In Progress" issue for Ryzen 5 support with patch:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239607

Was committed to head (CURRENT), apparently merged to stable/12 (cant 
find the MFC commit).


I've updated/retriaged the issue, and asked about a merge to stable/11, 
but at this point it looks like it missed the 12.1-RELEASE window

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"