<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="tests.xsl" type="text/xsl"?>

<TEST>
<NAME>CPU FREQ</NAME>

<DESCRIPTION>

For each processor in the system, this test steps through the
various frequency states (P-states) that the BIOS advertises
for the processor. For each processor/frequency combination,
a quick performance value is measured. The test then validates that:
    1) Each processor has the same number of frequency states
    2) Higher advertised frequencies have a higher performance
    3) No duplicate frequency values are reported by the BIOS
    4) Is BIOS wrongly doing Sw_All P-state coordination across cores
    5) Is BIOS wrongly doing Sw_Any P-state coordination across cores
</DESCRIPTION>

<FAIL>
<MSG>Not all processors support the same number of P states</MSG>
<DETAILS>
All CPUs should support the same number of P states, this fails.
</DETAILS>
</FAIL>

<FAIL>
<MSG>Duplicate frequency reported</MSG>
<DETAILS>
Expected increasing frequency numbers, instead found a duplicate.
</DETAILS>
</FAIL>

<FAIL>
<MSG>Supposedly higher frequency is slower on CPU %x!</MSG>
<DETAILS>
A CPU with a higher frequency is showing to be slower when compared to a CPU with a lower frequency.
</DETAILS>
</FAIL>

<FAIL>
<MSG>Firmware not implementing hardware coordination cleanly. Firmware using SW_ALL instead?</MSG>
<DETAILS>BIOS wrongly doing Sw_ALL P-State coordination across cpus.  We change frequency on all CPUs to the lowest value, then change frequency on one particular CPU to the highest.  If BIOS is doing Sw_All, the last high freq request will not work and you will get this failure.
</DETAILS>
</FAIL>

<FAIL>
<MSG>Firmware not implementing hardware coordination cleanly. Firmware using SW_ANY instead?</MSG>
<DETAILS>BIOS wrongly doing Sw_ANY P-State coordination across cpus.  We change frequency on all CPUs to the lowest value, then change frequency on one particular CPU to the highest. Next, we change the frequency of all the cpus back to the lowset.  If BIOS is doing Sw_ANY the core in question will also have a low frequency value instead of staying high, and you will get this failure.
</DETAILS>
</FAIL>

<FAIL>
<MSG>Processors are set to SW_ANY</MSG>
<DETAILS>
BIOS wrongly doing Sw_Any P-state coordination across cores.  We change the frequency on one particular CPU to the highest value, then change frequency on all the CPUs to the lowest value.  If BIOS is doing Sw_Any, this will cause the core in question to now also get the low speed.
</DETAILS>
</FAIL>

<WARN>
<MSG>Frequency scaling not supported</MSG>
<DETAILS>
Could not access /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor or /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies.
</DETAILS>
</WARN>

<WARN>
<MSG>Frequency %x not achievable; _PSS limit of %y in effect?</MSG>
<DETAILS>
Cannot reach the frequency of %x perhaps because of the limit set in /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq?
</DETAILS>
</WARN>

<INFO>
<MSG>
%x CPU frequency steps supported
</MSG>
<DETAILS>
Details the frequency and speed supported for each CPU.
</DETAILS>
</INFO>

<PASS>
<MSG>P-state coordination done by Harware</MSG>
<DETAILS>
We change the frequency on one particular CPU to the highest value, then change frequency on all the CPUs to the lowest value.  If BIOS is doing Sw_Any, this will cause the core in question to now also get the low speed, and it fails.  But if P-state cooredination is correctly done by the hardware, then we get this pass message.
</DETAILS>
</PASS>

</TEST>
