Author: stepan Date: 2008-05-03 16:44:59 +0200 (Sat, 03 May 2008) New Revision: 46
Modified: trunk/filo-0.5/main/pci.c trunk/filo-0.5/makerules Log: catch oddly configured pci bridges...
Modified: trunk/filo-0.5/main/pci.c =================================================================== --- trunk/filo-0.5/main/pci.c 2008-03-28 14:25:16 UTC (rev 45) +++ trunk/filo-0.5/main/pci.c 2008-05-03 14:44:59 UTC (rev 46) @@ -16,6 +16,7 @@ is_multi = 0; for (fn = 0; fn==0 || (is_multi && fn<8); fn++) { addr = PCI_ADDR(bus, devnum, fn); + // debug("PCI: %02x:%02x.%x\n", bus,devnum, fn); vid = pci_read16(addr, PCI_VENDOR_ID); if (vid==0xffff || vid==0) continue; @@ -36,8 +37,12 @@ #if !PCI_BRUTE_SCAN htype &= 0x7f; if (htype==PCI_HEADER_TYPE_BRIDGE - || htype==PCI_HEADER_TYPE_CARDBUS) + || htype==PCI_HEADER_TYPE_CARDBUS) { + if (pci_read8(addr, PCI_SECONDARY_BUS)) pci_scan_bus(pci_read8(addr, PCI_SECONDARY_BUS)); + else + debug("WARNING: %02x:%02x.%x has a secondary bus of 0\n", bus, devnum, fn); + } #endif } }
Modified: trunk/filo-0.5/makerules =================================================================== --- trunk/filo-0.5/makerules 2008-03-28 14:25:16 UTC (rev 45) +++ trunk/filo-0.5/makerules 2008-05-03 14:44:59 UTC (rev 46) @@ -7,7 +7,7 @@ CPPFLAGS = -nostdinc -imacros $(TOPDIR)/config.h -I$(TOPDIR)/include -I$(GCCINCDIR) -MD # grub part needs no-strict-aliasing! CFLAGS = -Wall -Os -fomit-frame-pointer -fno-common -ffreestanding \ - -fno-strict-aliasing -Wno-pointer-sign -Wno-unused + -fno-strict-aliasing -Wno-unused
ASFLAGS = -D__ASSEMBLY__ RANLIB = ranlib