]> mj.ucw.cz Git - pciutils.git/commitdiff
Added decoding of HT MSI capability.
authorMartin Mares <mj@ucw.cz>
Tue, 14 Aug 2007 12:29:02 +0000 (14:29 +0200)
committerMartin Mares <mj@ucw.cz>
Tue, 14 Aug 2007 12:29:02 +0000 (14:29 +0200)
ChangeLog
lspci.c
tests/cap-MSI-mapping [new file with mode: 0644]

index ca07312fc5b6808d1bdf5bfeb54eb62da70b34f6..72176f4bb6fa38434884b8f120fb29be9ea43401 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-08-14  Martin Mares  <mj@ucw.cz>
+
+       * lspci.c (show_ht): Added decoding of Hypertransport MSI mapping capability,
+       based on a patch by Jason Gunthorpe.
+
+       * tests/cap-MSI-mapping: Added a test case. I plan to add test cases
+       (which are dumps of config space) for all new features.
+
 2007-06-20  Martin Mares  <mj@ucw.cz>
 
        * Released as 2.2.6.
diff --git a/lspci.c b/lspci.c
index 192ef57ef5b74e6b1619c3ef3975f0d6e42bfd5b..db5a8bdcf0672ba35ac0de5acf04b8b81afedd86 100644 (file)
--- a/lspci.c
+++ b/lspci.c
@@ -941,7 +941,18 @@ show_ht(struct device *d, int where, int cmd)
       printf("HyperTransport: Address Mapping\n");
       break;
     case PCI_HT_CMD_TYP_MSIM:
-      printf("HyperTransport: MSI Mapping\n");
+      printf("HyperTransport: MSI Mapping Enable%c Fixed%c\n",
+            FLAG(cmd, PCI_HT_MSIM_CMD_EN),
+            FLAG(cmd, PCI_HT_MSIM_CMD_FIXD));
+      if (verbose >= 2 && !(cmd & PCI_HT_MSIM_CMD_FIXD))
+       {
+         u32 offl, offh;
+         if (!config_fetch(d, where + PCI_HT_MSIM_ADDR_LO, 8))
+           break;
+         offl = get_conf_long(d, where + PCI_HT_MSIM_ADDR_LO);
+         offh = get_conf_long(d, where + PCI_HT_MSIM_ADDR_HI);
+         printf("\t\tMapping Address Base: %016llx\n", ((unsigned long long)offh << 32) | (offl & ~0xfffff));
+       }
       break;
     case PCI_HT_CMD_TYP_DR:
       printf("HyperTransport: DirectRoute\n");
diff --git a/tests/cap-MSI-mapping b/tests/cap-MSI-mapping
new file mode 100644 (file)
index 0000000..30bd01d
--- /dev/null
@@ -0,0 +1,17 @@
+0a:01.0 PCI bridge: Broadcom HT2100 PCI-Express Bridge (rev a2) (prog-if 01 [Subtractive decode])
+00: 66 11 40 01 47 00 10 00 a2 01 04 06 40 00 01 00
+10: 00 00 00 00 00 00 00 00 0a 0b 0b 00 51 51 00 20
+20: 60 ff 60 ff f1 ff 01 00 ff ff ff ff 00 00 00 00
+30: 00 00 00 00 a0 00 00 00 00 00 00 00 00 01 01 00
+40: 00 00 00 00 01 00 01 00 01 00 00 00 00 00 01 00
+50: 08 00 a1 00 20 00 11 11 40 00 11 77 40 05 75 00
+60: 02 00 75 00 00 00 00 00 00 00 00 00 0c 05 03 03
+70: 00 00 00 00 00 00 00 00 0d 50 00 00 00 00 00 00
+80: 05 78 82 00 00 00 00 00 00 00 00 00 00 00 00 00
+90: 00 00 00 00 00 00 00 00 01 80 03 c8 08 00 00 00
+a0: 08 b0 01 a8 00 00 e0 fe 0f 00 00 00 00 00 00 00
+b0: 10 98 41 00 02 80 00 00 10 08 00 00 01 6d 1a 01
+c0: 08 00 81 20 00 00 08 00 c0 03 48 01 00 00 00 00
+d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+f0: 01 00 08 01 00 00 00 00 00 00 00 00 00 00 00 03