Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Nov 2019 13:22:37 +0100
From:      Jan Bramkamp <crest@rlwinm.de>
To:        freebsd-stable@freebsd.org
Subject:   Re: No amdtemp sysctls, AMD Ryzen 5 3600X
Message-ID:  <fbbc871c-8b08-45ce-9767-61b60eadc134@rlwinm.de>
In-Reply-To: <d139902267973d16d0935b88e1f86dcf@ijs.si>
References:  <9368f66ee33b733f4d6a9c69dc8a2537@ijs.si> <157133a0-dd31-d498-c214-d75ccb21a125@FreeBSD.org> <d139902267973d16d0935b88e1f86dcf@ijs.si>

next in thread | previous in thread | raw e-mail | index | archive | help
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-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fbbc871c-8b08-45ce-9767-61b60eadc134>