X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=payloads%2Fcoreinfo%2Fpci_module.c;h=6af3a74156ba1d04351a874f3dea268c7099f1b9;hb=23b6c8f7caa09ed714bce9b6572b6067ae0498c6;hp=c3400ae0a99ecee5f72e1b579332d8af92d9d767;hpb=28dff395efb03e7db0863dd3e378cea8eee1ce94;p=coreboot.git diff --git a/payloads/coreinfo/pci_module.c b/payloads/coreinfo/pci_module.c index c3400ae0a..6af3a7415 100644 --- a/payloads/coreinfo/pci_module.c +++ b/payloads/coreinfo/pci_module.c @@ -29,7 +29,8 @@ struct pci_devices { unsigned int id; }; -static struct pci_devices devices[64]; +#define MAX_PCI_DEVICES 64 +static struct pci_devices devices[MAX_PCI_DEVICES]; static int devices_index; /* Number of entries to show in the list */ @@ -178,7 +179,7 @@ static void pci_scan_bus(int bus) unsigned int val; unsigned char hdr; - for (slot = 0; slot < 0x1f; slot++) { + for (slot = 0; slot < 0x20; slot++) { for (func = 0; func < 8; func++) { pcidev_t dev = PCI_DEV(bus, slot, func); @@ -190,10 +191,10 @@ static void pci_scan_bus(int bus) continue; /* FIXME: Remove this arbitrary limitation. */ - if (devices_index >= 64) + if (devices_index >= MAX_PCI_DEVICES) return; - devices[devices_index].device = + devices[devices_index].device = PCI_DEV(bus, slot, func); devices[devices_index++].id = val;