[Etherboot-developers] pci.c patch
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Ken Y. <ke...@bi...> - 2001-05-15 16:24:49
|
Finally I got around to looking at Steve Smith's patch for PCI-PCI
bridges. Here's the patch. Could people who are having problems with
NICs not on PCI bus 0 please try this to see if it helps?
--- etherboot-5.0.1/src/pci.c Mon Apr 2 19:00:04 2001
+++ etherboot-5.0.2/src/pci.c Wed May 16 02:19:17 2001
@@ -385,7 +385,16 @@
pcibios_read_config_byte(bus, devfn, PCI_CLASS_CODE, &class);
pcibios_read_config_byte(bus, devfn, PCI_SUBCLASS_CODE, &subclass);
if (class == 0x06 && subclass == 0x04)
+ {
buses++;
+ /* Some BIOS's seem to configure the bridge with a gap in PCI bus numbers */
+ if (hdr_type == 0x01) /* PCI-PCI Bridge 1.1 */
+ {
+ pcibios_read_config_dword(bus, devfn, PCI_BASE_ADDRESS_2, &ioaddr);
+ if (((ioaddr>>16) & 0xff) > buses)
+ buses = (ioaddr>>16) & 0xff;
+ }
+ }
#if DEBUG
printf("bus %x, function %x, vendor %x, device %x\n",
|