[Bug 280370] amdtemp: Add support for AMD Ryzen 7 PRO 6850U

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 19 Jul 2024 15:40:06 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280370

            Bug ID: 280370
           Summary: amdtemp: Add support for AMD Ryzen 7 PRO 6850U
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: freebsd@lanter-it.ch

Created attachment 252171
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=252171&action=edit
Test patch for family 19h model 44h

The current amdtemp module does not recognize my mainboard. The module is
loaded, but no values returned by sysctl:

sysctl -a | grep temperature
hw.acpi.thermal.tz0.temperature: 47.1C

I have therefore tried to adapt 'sys/dev/amdsmn/amdsmn.c' and
'sys/dev/amdtemp/amdtemp.c'. 
Now the mainboard is recognized and some temperature values are displayed for
the individual cpu's (threads). But these values do not seem correct to me,
i.e. the same values are always displayed for all cores. 
However, this temperature correlates quite well with
'hw.acpi.thermal.tz0.temperature', but compared to the output of sensors
(Debian 12.6 live) and HWInfo64 (Windows PE), the values appear to me to be
approx. 5°C too high. 

I am also confused by the fact that HWInfo64 displays different temperatures
for each core, not for CPUs/threads.

Therefore two questions:
1. is the address used correct?
2. instead of 'AMDTEMP_ZEN4_10H_CCD_TMP_BASE' should I use
   'AMDTEMP_17H_CUR_TMP'?

HW probe of my Lenovo T14 Gen 3 AMD:
https://bsd-hardware.info/?probe=0a2c02f944

Thank you in advance

-- 
You are receiving this mail because:
You are the assignee for the bug.