Beispiel #1
0
def power_opt_low_power_profile():
    # If CPUID.06H:ECX.SETBH[bit 3] is set, then the processor supports
    # performance-energy bias preference and IA32_ENERGY_PERF_BIAS (1B0H) MSR
    setbh = (bits.cpuid(bits.bsp_apicid(),6).ecx >> 3) & 1
    if not setbh:
        return
    testmsr.test_msr_consistency("Energy Performance Bias", 0x1b0, mask=0xf)
    testmsr.test_msr("Energy Performance Bias 12-15", 0x1b0, expected_value=3, shift=2, mask=3)
Beispiel #2
0
def power_opt_low_power_profile():
    # If CPUID.06H:ECX.SETBH[bit 3] is set, then the processor supports
    # performance-energy bias preference and IA32_ENERGY_PERF_BIAS (1B0H) MSR
    setbh = (bits.cpuid(bits.bsp_apicid(), 6).ecx >> 3) & 1
    if not setbh:
        return
    testmsr.test_msr_consistency("Energy Performance Bias", 0x1b0, mask=0xf)
    testmsr.test_msr("Energy Performance Bias 12-15",
                     0x1b0,
                     expected_value=3,
                     shift=2,
                     mask=3)
Beispiel #3
0
def test_pm_generic_profile():
    testmsr.test_msr_consistency("Max non-turbo ratio must be consistent",
                                 0xce,
                                 mask=0xff00)
    testpci.test_pci("Bus master disable",
                     0,
                     31,
                     0,
                     0xa9,
                     bytes=1,
                     shift=2,
                     mask=1,
                     expected_value=1)
    testmsr.test_msr("C1 Auto Demotion Enable",
                     0xe2,
                     shift=26,
                     mask=1,
                     expected_value=1)
    testmsr.test_msr("C3 Auto Demotion Enable",
                     0xe2,
                     shift=25,
                     mask=1,
                     expected_value=1)
    testmsr.test_msr("IO MWAIT Redirection Enable",
                     0xe2,
                     shift=10,
                     mask=1,
                     expected_value=1)
    testmsr.test_msr("C1E Enable", 0x1fc, shift=1, mask=1, expected_value=1)
    testmsr.test_msr("EIST Enable", 0x1a0, shift=16, mask=1, expected_value=1)
    testmsr.test_msr("Turbo Enable", 0x1a0, shift=38, mask=1, expected_value=0)
    testmsr.test_msr("EIST Hardware Coordination Enable",
                     0x1aa,
                     mask=1,
                     expected_value=0)
    testmsr.test_msr_consistency("IO Capture C-state Range Consistent",
                                 0xe4,
                                 shift=16,
                                 mask=7)
    io_capture_range, io_capture_range_str = testmsr.MSR(
        "IO Capture C-state Range", bits.bsp_apicid(), 0xe4, 18, 16)
    testsuite.test("IO Capture C-state Range <= 2", io_capture_range <= 2)
    testsuite.print_detail(io_capture_range_str)
Beispiel #4
0
def cmd_test_msr(args):
    if args.cpu is not None:
        args.cpu = bits.cpus()[args.cpu]
    return testmsr.test_msr(**vars(args))
Beispiel #5
0
def test_pm_generic_profile():
    testmsr.test_msr_consistency("Max non-turbo ratio must be consistent", 0xce, mask=0xff00)
    testpci.test_pci("Bus master disable", 0, 31, 0, 0xa9, bytes=1, shift=2, mask=1, expected_value=1)
    testmsr.test_msr("C1 Auto Undemotion Enable", 0xe2, shift=28, mask=1, expected_value=1)
    testmsr.test_msr("C3 Auto Undemotion Enable", 0xe2, shift=27, mask=1, expected_value=1)
    testmsr.test_msr("C1 Auto Demotion Enable", 0xe2, shift=26, mask=1, expected_value=1)
    testmsr.test_msr("C3 Auto Demotion Enable", 0xe2, shift=25, mask=1, expected_value=1)
    testmsr.test_msr("IO MWAIT Redirection Enable", 0xe2, shift=10, mask=1, expected_value=1)
    testmsr.test_msr("C1E Enable", 0x1fc, shift=1, mask=1, expected_value=1)
    testmsr.test_msr("EIST Enable", 0x1a0, shift=16, mask=1, expected_value=1)
    testmsr.test_msr("Turbo Enable", 0x1a0, shift=38, mask=1, expected_value=0)
    testmsr.test_msr("EIST Hardware Coordination Enable", 0x1aa, mask=1, expected_value=0)
    testmsr.test_msr_consistency("IO Capture C-state Range Consistent", 0xe4, shift=16, mask=7)
    io_capture_range, io_capture_range_str = testmsr.MSR("IO Capture C-state Range", bits.bsp_apicid(), 0xe4, 18, 16)
    testsuite.test("IO Capture C-state Range <= 2", io_capture_range <= 2)
    testsuite.print_detail(io_capture_range_str)