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
Created attachment 252172 [details] Debian sensor values
> 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?
Unfortunately, the official documentation is not exactly informative regarding this processor: https://www.amd.com/en/search/documentation/hub.html#sortCriteria=%40amd_release_date%20descending&f-amd_product_brand=Ryzen%20PRO&f-amd_form_factor=Laptops&f-amd_product_type=Processors&numberOfResults=48 Some listed PPRs: https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/programmer-references/55901_B1_pub_053.zip https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/programmer-references/56713-B1_3_05.zip https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/programmer-references/57019-A0-PUB_3_00.zip The Linux 'k10temp' driver somehow handles the offsets differently. I have not yet figured out how. But it seems to me that there are differences that do not correspond to 'amdtemp': https://github.com/torvalds/linux/blob/master/drivers/hwmon/k10temp.c#L467
does this do? sysctl dev.amdtemp.0.ccd0 or only sysctl dev.amdtemp.0.core0.sensor0 (also dev.cpu.[0-15].temperature)