X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=util%2Finteltool%2Fpcie.c;h=ea238354254042611b588bee446c9ab662e41088;hb=HEAD;hp=10b79e48660d7e430858ceb106847b85bf17727a;hpb=23d98c768f0c0d53a71f77dd5f0ee83f01d66e16;p=coreboot.git diff --git a/util/inteltool/pcie.c b/util/inteltool/pcie.c index 10b79e486..ea2383542 100644 --- a/util/inteltool/pcie.c +++ b/util/inteltool/pcie.c @@ -19,6 +19,7 @@ #include #include +#include #include "inteltool.h" /* @@ -35,6 +36,7 @@ int print_epbar(struct pci_dev *nb) switch (nb->device_id) { case PCI_DEVICE_ID_INTEL_82915: case PCI_DEVICE_ID_INTEL_82945GM: + case PCI_DEVICE_ID_INTEL_82945GSE: case PCI_DEVICE_ID_INTEL_82945P: case PCI_DEVICE_ID_INTEL_82975X: epbar_phys = pci_read_long(nb, 0x40) & 0xfffffffe; @@ -44,6 +46,8 @@ int print_epbar(struct pci_dev *nb) case PCI_DEVICE_ID_INTEL_82Q35: case PCI_DEVICE_ID_INTEL_82G33: case PCI_DEVICE_ID_INTEL_82Q33: + case PCI_DEVICE_ID_INTEL_X44: + case PCI_DEVICE_ID_INTEL_32X0: case PCI_DEVICE_ID_INTEL_GS45: case PCI_DEVICE_ID_INTEL_ATOM_DXXX: case PCI_DEVICE_ID_INTEL_ATOM_NXXX: @@ -54,7 +58,8 @@ int print_epbar(struct pci_dev *nb) case PCI_DEVICE_ID_INTEL_82810DC: case PCI_DEVICE_ID_INTEL_82810E_MC: case PCI_DEVICE_ID_INTEL_82830M: - printf("This northbrigde does not have EPBAR.\n"); + case PCI_DEVICE_ID_INTEL_82865: + printf("This northbridge does not have EPBAR.\n"); return 1; default: printf("Error: Dumping EPBAR on this northbridge is not (yet) supported.\n"); @@ -68,7 +73,7 @@ int print_epbar(struct pci_dev *nb) exit(1); } - printf("EPBAR = 0x%08llx (MEM)\n\n", epbar_phys); + printf("EPBAR = 0x%08" PRIx64 " (MEM)\n\n", epbar_phys); for (i = 0; i < size; i += 4) { if (*(uint32_t *)(epbar + i)) printf("0x%04x: 0x%08x\n", i, *(uint32_t *)(epbar+i)); @@ -92,26 +97,33 @@ int print_dmibar(struct pci_dev *nb) switch (nb->device_id) { case PCI_DEVICE_ID_INTEL_82915: case PCI_DEVICE_ID_INTEL_82945GM: + case PCI_DEVICE_ID_INTEL_82945GSE: case PCI_DEVICE_ID_INTEL_82945P: case PCI_DEVICE_ID_INTEL_82975X: dmibar_phys = pci_read_long(nb, 0x4c) & 0xfffffffe; break; - case PCI_DEVICE_ID_INTEL_PM965: + case PCI_DEVICE_ID_INTEL_PM965: case PCI_DEVICE_ID_INTEL_Q965: - case PCI_DEVICE_ID_INTEL_82Q35: - case PCI_DEVICE_ID_INTEL_82G33: - case PCI_DEVICE_ID_INTEL_82Q33: + case PCI_DEVICE_ID_INTEL_82Q35: + case PCI_DEVICE_ID_INTEL_82G33: + case PCI_DEVICE_ID_INTEL_82Q33: + case PCI_DEVICE_ID_INTEL_X44: + case PCI_DEVICE_ID_INTEL_32X0: case PCI_DEVICE_ID_INTEL_GS45: case PCI_DEVICE_ID_INTEL_ATOM_DXXX: case PCI_DEVICE_ID_INTEL_ATOM_NXXX: - dmibar_phys = pci_read_long(nb, 0x68) & 0xfffffffe; - dmibar_phys |= ((uint64_t)pci_read_long(nb, 0x6c)) << 32; - break; + dmibar_phys = pci_read_long(nb, 0x68) & 0xfffffffe; + dmibar_phys |= ((uint64_t)pci_read_long(nb, 0x6c)) << 32; + break; case PCI_DEVICE_ID_INTEL_82810: case PCI_DEVICE_ID_INTEL_82810DC: case PCI_DEVICE_ID_INTEL_82810E_MC: - printf("This northbrigde does not have DMIBAR.\n"); + case PCI_DEVICE_ID_INTEL_82865: + printf("This northbridge does not have DMIBAR.\n"); return 1; + case PCI_DEVICE_ID_INTEL_X58: + dmibar_phys = pci_read_long(nb, 0x50) & 0xfffff000; + break; default: printf("Error: Dumping DMIBAR on this northbridge is not (yet) supported.\n"); return 1; @@ -124,7 +136,7 @@ int print_dmibar(struct pci_dev *nb) exit(1); } - printf("DMIBAR = 0x%08llx (MEM)\n\n", dmibar_phys); + printf("DMIBAR = 0x%08" PRIx64 " (MEM)\n\n", dmibar_phys); for (i = 0; i < size; i += 4) { if (*(uint32_t *)(dmibar + i)) printf("0x%04x: 0x%08x\n", i, *(uint32_t *)(dmibar+i)); @@ -150,6 +162,7 @@ int print_pciexbar(struct pci_dev *nb) switch (nb->device_id) { case PCI_DEVICE_ID_INTEL_82915: case PCI_DEVICE_ID_INTEL_82945GM: + case PCI_DEVICE_ID_INTEL_82945GSE: case PCI_DEVICE_ID_INTEL_82945P: case PCI_DEVICE_ID_INTEL_82975X: pciexbar_reg = pci_read_long(nb, 0x48); @@ -159,6 +172,8 @@ int print_pciexbar(struct pci_dev *nb) case PCI_DEVICE_ID_INTEL_82Q35: case PCI_DEVICE_ID_INTEL_82G33: case PCI_DEVICE_ID_INTEL_82Q33: + case PCI_DEVICE_ID_INTEL_X44: + case PCI_DEVICE_ID_INTEL_32X0: case PCI_DEVICE_ID_INTEL_GS45: case PCI_DEVICE_ID_INTEL_ATOM_DXXX: case PCI_DEVICE_ID_INTEL_ATOM_NXXX: @@ -168,7 +183,8 @@ int print_pciexbar(struct pci_dev *nb) case PCI_DEVICE_ID_INTEL_82810: case PCI_DEVICE_ID_INTEL_82810DC: case PCI_DEVICE_ID_INTEL_82810E_MC: - printf("Error: This northbrigde does not have PCIEXBAR.\n"); + case PCI_DEVICE_ID_INTEL_82865: + printf("Error: This northbridge does not have PCIEXBAR.\n"); return 1; default: printf("Error: Dumping PCIEXBAR on this northbridge is not (yet) supported.\n"); @@ -198,7 +214,7 @@ int print_pciexbar(struct pci_dev *nb) return 1; } - printf("PCIEXBAR: 0x%08llx\n", pciexbar_phys); + printf("PCIEXBAR: 0x%08" PRIx64 "\n", pciexbar_phys); pciexbar = map_physical(pciexbar_phys, (max_busses * 1024 * 1024)); @@ -239,5 +255,3 @@ int print_pciexbar(struct pci_dev *nb) return 0; } - -