Beispiel #1
0
def handoff_to_os():
    """Perform USB handoff to OS (i.e. disable USB devices)"""
    print """
WARNING: This test asks the BIOS to stop handling USB, so if you use a
USB keyboard, you will probably lose the ability to interact with BITS
after this test completes.

You can view the results, and then reboot.

Press escape to quit, or any other key to continue."""
    c = bits.get_key()
    if c == bits.KEY_ESC:
        print 'Test aborted!'
        return False

    ret = False
    for dev in pci.devices_by_classcode(CLASSC_EHCI):
        if ehci_handoff_to_os(**dev):
            ret = True
    return ret
Beispiel #2
0
def handoff_to_os():
    """Perform USB handoff to OS (i.e. disable USB devices)"""
    print """
WARNING: This test asks the BIOS to stop handling USB, so if you use a
USB keyboard, you will probably lose the ability to interact with BITS
after this test completes.

You can view the results, and then reboot.

Press escape to quit, or any other key to continue."""
    k = bits.input.get_key()
    if k.key == bits.input.KEY_ESC:
        print 'Test aborted!'
        return False

    ret = False
    for dev in pci.devices_by_classcode(CLASSC_EHCI):
        if ehci_handoff_to_os(**dev):
            ret = True
    return ret
Beispiel #3
0
def find_hc():
    for name, classc in ("UHCI", CLASSC_UHCI), ("OHCI", CLASSC_OHCI), (
            "EHCI", CLASSC_EHCI), ("XHCI", CLASSC_XHCI):
        for dev in pci.devices_by_classcode(classc):
            print "{name} device found at {bus:#x}:{dev:#x}.{fun:#x}".format(
                name=name, **dev)
Beispiel #4
0
def find_hc():
    for name, classc in ("UHCI", CLASSC_UHCI), ("OHCI", CLASSC_OHCI), ("EHCI", CLASSC_EHCI), ("XHCI", CLASSC_XHCI):
        for dev in pci.devices_by_classcode(classc):
            print "{name} device found at {bus:#x}:{dev:#x}.{fun:#x}".format(name=name, **dev)