Bug 280370 - amdtemp: Add support for AMD Ryzen 7 PRO 6850U
Summary: amdtemp: Add support for AMD Ryzen 7 PRO 6850U
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 15.0-CURRENT
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-19 15:40 UTC by Matthias Lanter
Modified: 2024-07-30 11:33 UTC (History)
1 user (show)

See Also:


Attachments
Test patch for family 19h model 44h (2.53 KB, text/plain)
2024-07-19 15:40 UTC, Matthias Lanter
no flags Details
Debian sensor values (934 bytes, text/plain)
2024-07-19 15:41 UTC, Matthias Lanter
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Lanter 2024-07-19 15:40:06 UTC
Created attachment 252171 [details]
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
Comment 1 Matthias Lanter 2024-07-19 15:41:10 UTC
Created attachment 252172 [details]
Debian sensor values
Comment 2 Mark Johnston freebsd_committer freebsd_triage 2024-07-26 17:49:09 UTC
> But these values do not seem correct to me, i.e. the same values are always displayed for all cores.

I think this is expected, from my reading of amdtemp_sysctl(), the value read is the same no matter which core the sysctl corresponds to.  I can't say much more than that, I'm not very familiar with this driver.

> instead of 'AMDTEMP_ZEN4_10H_CCD_TMP_BASE' should I use 'AMDTEMP_17H_CUR_TMP'?

Is there any public documentation from AMD on this?  What does Linux do there?