Beispiel #1
0
def ppm_test2():
    pciexbase = bits.pci_read(0, 5, 0, 0x84, 4) & 0xfc000000
    bits.pcie_set_base(pciexbase)
    print 'pciexbase = 0x%x' % bits.pcie_get_base()
    for bus in (0x3f, 0x7f, 0xbf, 0xff):
        print 'bus 0x%x Interrupt Configuration Reg = 0x%x' % (
            bus, bits.pcie_read(bus, 11, 0, 0x48, 4))
Beispiel #2
0
def ppm_test1():
    pciexbase = bits.pci_read(0, 5, 0, 0x84, 4) & 0xfc000000
    bits.pcie_set_base(pciexbase)
    print 'pciexbase = 0x%x' % bits.pcie_get_base()
    for bus in (0x3f, 0x7f, 0xbf, 0xff):
        print 'bus 0x%x devhide_0 = 0x%x' % (
            bus, bits.pcie_read(bus, 11, 3, 0xb0, 4))
Beispiel #3
0
def CSR(name, uncore_bus_num, dev, fun, reg, bytes=4, highbit=63, lowbit=0):
    if bytes == 4:
        highbit = min(highbit, 31)
    elif bytes == 2:
        highbit = min(highbit, 15)
    elif bytes == 1:
        highbit = min(highbit, 7)
    value = (bits.pcie_read(uncore_bus_num, dev, fun, reg, bytes) & ((1 << (highbit + 1)) - 1)) >> lowbit
    detail = "{0} (CSR B{1:x}h:D{2}:F{3}:{4:x}h [{5:d}:{6:d}])".format(name, uncore_bus_num, dev, fun, reg, highbit, lowbit)
    detail += " = 0x{0:x}".format(value)
    return value, detail
Beispiel #4
0
def CSR(name, uncore_bus_num, dev, fun, reg, bytes=4, highbit=63, lowbit=0):
    if bytes == 4:
        highbit = min(highbit, 31)
    elif bytes == 2:
        highbit = min(highbit, 15)
    elif bytes == 1:
        highbit = min(highbit, 7)
    value = (bits.pcie_read(uncore_bus_num, dev, fun, reg, bytes) &
             ((1 << (highbit + 1)) - 1)) >> lowbit
    detail = "{0} (CSR B{1:x}h:D{2}:F{3}:{4:x}h [{5:d}:{6:d}])".format(
        name, uncore_bus_num, dev, fun, reg, highbit, lowbit)
    detail += " = 0x{0:x}".format(value)
    return value, detail
Beispiel #5
0
def ppm_test2():
    pciexbase = bits.pci_read(0, 5, 0, 0x84, 4) & 0xfc000000
    bits.pcie_set_base(pciexbase)
    print 'pciexbase = 0x%x' % bits.pcie_get_base()
    for bus in (0x3f, 0x7f, 0xbf, 0xff):
      print 'bus 0x%x Interrupt Configuration Reg = 0x%x' % (bus, bits.pcie_read(bus, 11, 0, 0x48, 4))
Beispiel #6
0
def ppm_test1():
    pciexbase = bits.pci_read(0, 5, 0, 0x84, 4) & 0xfc000000
    bits.pcie_set_base(pciexbase)
    print 'pciexbase = 0x%x' % bits.pcie_get_base()
    for bus in (0x3f, 0x7f, 0xbf, 0xff):
      print 'bus 0x%x devhide_0 = 0x%x' % (bus, bits.pcie_read(bus, 11, 3, 0xb0, 4))