Example #1
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)
Example #2
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)
Example #3
0
def cmd_test_pci(args):
    return testpci.test_pci(args.text, args.bus, args.dev, args.fn, args.reg, args.expected_value, bytes=args.bytes, mask=args.mask, shift=args.shift)