>From 5c4d5afafd6b3b032fa81250e9a32ccb89ed5739 Mon Sep 17 00:00:00 2001 Message-Id: <5c4d5afafd6b3b032fa81250e9a32ccb89ed5739.1333510239.git.kevin@koconnor.net> In-Reply-To: References: From: Kevin O'Connor Date: Sun, 1 Apr 2012 15:21:24 -0400 Subject: [PATCH 6/7] pciinit: bridges can have two regions too To: seabios@seabios.org Original patch by: Gerd Hoffmann Signed-off-by: Kevin O'Connor --- src/pciinit.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pciinit.c b/src/pciinit.c index 6ef1be8..7d3f076 100644 --- a/src/pciinit.c +++ b/src/pciinit.c @@ -370,13 +370,14 @@ static int pci_bios_check_devices(struct pci_bus *busses) // Calculate resources needed for regular (non-bus) devices. struct pci_device *pci; foreachpci(pci) { + int num_regions = PCI_NUM_REGIONS; if (pci->class == PCI_CLASS_BRIDGE_PCI) { busses[pci->secondary_bus].bus_dev = pci; - continue; + num_regions = 2; } struct pci_bus *bus = &busses[pci_bdf_to_bus(pci->bdf)]; int i; - for (i = 0; i < PCI_NUM_REGIONS; i++) { + for (i = 0; i < num_regions; i++) { u32 val, size; pci_bios_get_bar(pci, i, &val, &size); if (val == 0) -- 1.7.6.5