Re: [PATCH RESENT] cpufreq: amd-pstate: add quirk for Ryzen 3000 series processor
From: David Wang
Date: Thu Aug 22 2024 - 04:04:56 EST
Hi,
I just upgrade my BIOS, now the error message is gone(without quirk), I only have following warning:
[Thu Aug 22 15:12:02 2024] amd_pstate: The CPPC feature is supported but currently disabled by the BIOS.
Please enable it if your BIOS has the CPPC option.
No significant performance changes noticed yet:
Clean kernel deb package build time is about the same as before:
$ time make deb-pkg -j6
real 38m50.977s
user 217m5.970s
sys 19m55.164s
And amd-pstate seems working (more accurate than quirks?):
$ cat /sys/devices/system/cpu/cpufreq/policy0/*amd*
166
enabled
1740000
3905000
176
$ cpupower frequency-info
analyzing CPU 0:
driver: amd-pstate-epp
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: Cannot determine or is not supported.
hardware limits: 550 MHz - 3.91 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 550 MHz and 3.91 GHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 3.90 GHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: no
And thanks for all your support!!!
BTW, about the quirks, I still think the dmi-match is not enough,
CPU family model should also be checked to determine a accurate static quirk_entry.
David
At 2024-08-22 13:59:57, "Gautham R. Shenoy" <gautham.shenoy@xxxxxxx> wrote:
>Hello David,
>
>On Thu, Aug 22, 2024 at 01:43:12PM +0800, David Wang wrote:
>> Hi,
>> >
>> Thanks for the information. (I did change my BIOS's CPPC config from "auto" to "enable", but error message still.)
>> But according to another mail from gautham.shenoy@xxxxxxx, my understanding is that my CPU(AMD Ryzen 3 3100 4-Core Processor) does not have this CPPC feature, would upgrade my BIOS really help?
>> ```
>
>To clarify,
>
>There are two ways in which the OS can communicate its CPPC
>requirements with the platform firmware.
>
>1. Via the following CPPC MSRs
>
>#define MSR_AMD_CPPC_CAP1 0xc00102b0
>#define MSR_AMD_CPPC_ENABLE 0xc00102b1
>#define MSR_AMD_CPPC_CAP2 0xc00102b2
>#define MSR_AMD_CPPC_REQ 0xc00102b3
>#define MSR_AMD_CPPC_STATUS 0xc00102b4
>
>2. Via the shared memory mechanism.
>
>
>The presence of the CPPC MSRs is indicated via X86_FEATURE_CPPC (CPUID
>0x80000008.EBX[27]). If available, the amd-pstate driver prefers that
>over the shared-memory mechanism.
>
>So the the following warning are intended only for platforms that are
>known to have the MSR support, not for the platforms which don't have
>the MSR support.
>
>"The CPPC feature is supported but currently disabled by the BIOS.
>Please enable it if your BIOS has the CPPC option"
>
>Your platform has CPPC feature (evident from the fact that amd-pstate
>worked for you with the BIOS quirk patch), and the amd-pstate driver can
>work just as well using the shared-memory mechanism (2 above) as long
>as your BIOS supports CPPC v3 (which advertises the nominal frequency
>in addition to the nominal perf).
>
>The current version of the BIOS that you are running doesn't seem to
>support CPPC v3, which is why the amd-pstate driver won't work
>out-of-box. This is why Xiaojian recommended upgrading the BIOS to the
>latest version.
>
>
>>
>> Anyway, I will give BIOS upgrading a try.
>
>Please do!
>
>>
>> >If this issue is fixed in BIOS, no need to modify the upstream kernel code, right?
>>
>> I think , even when upgrading BIOS would not help, the quirk just for my system is not worth be in kernel :)......
>>
>
>Fair point. However, in case you prefer to use amd-pstate, know that
>this is one way of enabling it, if the BIOS upgrade doesn't help.
>
>>
>> Thanks
>> David
>
>--
>Thanks and Regards
>gautham.