Bug #3335
openamd* kernel drivers are not properly detecting Zen3 cores
0%
Description
Hello.
New changes brough some support to newer gen AMD processors. Alas mine is not properly detected:
amdsmn: works
amdsmn0: <AMD Family 19h System Management Network> on hostb0
amdtemp: fails probing
amdtemp0: <AMD CPU On-Die Thermal Sensors> on hostb0
amdtemp0: sc_ccd_offset = 00000154
amdtemp0: probe ccd sensors 19h 50
amdtemp0: probe ccd0 error 0 val=00000000
amdtemp0: probe ccd1 error 0 val=00000000
amdtemp0: probe ccd2 error 0 val=00000000
amdtemp0: probe ccd3 error 0 val=00000000
amdtemp0: probe ccd4 error 0 val=00000000
amdtemp0: probe ccd5 error 0 val=00000000
amdtemp0: probe ccd6 error 0 val=00000000
amdtemp0: probe ccd7 error 0 val=00000000
amdsbwd: fails probing
amdsbwd0: <AMD FCH Rev 41h+ Watchdog Timer> at iomem 0xfed80b00-0xfed80b03,0xfed80b04-0xfed80b07 on isa0
amdsbwd0: watchdog hardware is disabled
device_probe_and_attach: amdsbwd0 attach returned 6
sio0: can't drain, serial port might not exist, disabling
sio1: can't drain, serial port might not exist, disabling
amdsbwd1: <AMD FCH Rev 41h+ Watchdog Timer> at iomem 0xfed80b00-0xfed80b03,0xfed80b04-0xfed80b07 on isa1
amdsbwd1: watchdog hardware is disabled
device_probe_and_attach: amdsbwd1 attach returned 6
My cpu is: AMD Ryzen 5 PRO 5650GE
Thanks in advance!
Updated by daftaupe almost 2 years ago
@arcade@b1t.name can you point which commit are you running ?
Updated by dillon almost 2 years ago
Hmm. From what I can tell the ccd offset it reports (0x154) is the same one Linux is using, but it is possible that it wouldn't work under Linux either. I don't have a 5600G or 5650GE series cpu available to me at the moment to suss it out.
But if you want to take a shot at it you can try changing the CCD offset in the codebase and recompile the kernel. This particular module is built into the kernel so the kernel has to be recompiled rather than just the module.
The module is /usr/src/sys/dev/powermng/amdtemp/amdtemp.c and the offset is calculated on line 525 (your cpu is recognized as family 0x19, model 0x50). It currently uses a ccd offset of 0x154. You could try 0x300 and 0x308 and see if either of those works, and report your results. If you can get it working I can adjust the code specifically for that family and model.
-Matt
Updated by arcade@b1t.name almost 2 years ago
Hm, no luck. But thank you for pointers!
Jan 10 11:33:13 probe2 kernel: amdsmn0: <AMD Family 19h System Management Network> on hostb0
Jan 10 11:33:13 probe2 kernel: amdtemp0: <AMD CPU On-Die Thermal Sensors> on hostb0
Jan 10 11:33:13 probe2 kernel: amdtemp0: sc_ccd_offset = 00000308
Jan 10 11:33:13 probe2 kernel: amdtemp0: probe ccd sensors 19h 50
Jan 10 11:33:13 probe2 kernel: amdtemp0: probe ccd0 error 0 val=00000000
Jan 10 11:33:13 probe2 kernel: amdtemp0: probe ccd1 error 0 val=00000000
Jan 10 11:33:13 probe2 kernel: amdtemp0: probe ccd2 error 0 val=0000000e
Jan 10 11:33:13 probe2 kernel: amdtemp0: probe ccd3 error 0 val=00000000
Jan 10 11:33:13 probe2 kernel: amdtemp0: probe ccd4 error 0 val=00000003
Jan 10 11:33:13 probe2 kernel: amdtemp0: probe ccd5 error 0 val=00000000
Jan 10 11:33:13 probe2 kernel: amdtemp0: probe ccd6 error 0 val=901f001a
Jan 10 11:33:13 probe2 kernel: amdtemp0: probe ccd7 error 0 val=00050003
Jan 10 11:33:39 probe2 kernel: amdtemp0: detached
Jan 10 11:33:39 probe2 kernel: amdsmn0: detached
Jan 10 11:38:50 probe2 kernel: amdsmn0: <AMD Family 19h System Management Network> on hostb0
Jan 10 11:38:50 probe2 kernel: amdtemp0: <AMD CPU On-Die Thermal Sensors> on hostb0
Jan 10 11:38:50 probe2 kernel: amdtemp0: sc_ccd_offset = 00000300
Jan 10 11:38:50 probe2 kernel: amdtemp0: probe ccd sensors 19h 50
Jan 10 11:38:50 probe2 kernel: amdtemp0: probe ccd0 error 0 val=00000000
Jan 10 11:38:50 probe2 kernel: amdtemp0: probe ccd1 error 0 val=00000000
Jan 10 11:38:50 probe2 kernel: amdtemp0: probe ccd2 error 0 val=00000000
Jan 10 11:38:50 probe2 kernel: amdtemp0: probe ccd3 error 0 val=00000000
Jan 10 11:38:50 probe2 kernel: amdtemp0: probe ccd4 error 0 val=0000000e
Jan 10 11:38:50 probe2 kernel: amdtemp0: probe ccd5 error 0 val=00000000
Jan 10 11:38:50 probe2 kernel: amdtemp0: probe ccd6 error 0 val=00000003
Jan 10 11:38:50 probe2 kernel: amdtemp0: probe ccd7 error 0 val=00000000