Subject: Success! (Re: eisa device ADP7880 not configured)
To: None <port-i386@NetBSD.ORG>
From: John Kohl <jtk@kolvir.arlington-heights.ma.us>
List: port-i386
Date: 05/02/1997 09:14:40
>>>>> "JT" == Jason Thorpe <thorpej@nas.nasa.gov> writes:

JT> What kind of system is it, exactly?  What configuration mode does the
JT> kernel display for the pci bus?

It's a Dell 4-way 200MHz PPro system (the box says: PowerEdge 6100/200).
AMI system bios, appears to be 2 2-processor boards. It uses PCI
configuration mode 1.

JT> options		PCI_CONF_MODE=x

No dice, it just blows more chunks than it did before.

However, the following hack to mainbus.c coupled with a config line
	pci1 at mainbus0 bus 1
did get it to probe the AHC devices (2 controllers) and detect the disk
drives.  So, it does seem to have a second primary PCI bus.

Alas, adding this hack in on other systems with PCI-PCI bridges (e.g. my
laptop in its docing station) seems to falsely detect the configured
bridge as another primary PCI bridge, so this code is by no means
perfect.

Can someone suggest a more correct way to probe multiple primary PCI buses?

Index: mainbus.c
===================================================================
RCS file: /u3/cvsroot/src/sys/arch/i386/i386/mainbus.c,v
retrieving revision 1.1.1.12
diff -c -r1.1.1.12 mainbus.c
*** mainbus.c	1997/04/12 13:13:57	1.1.1.12
--- mainbus.c	1997/05/02 11:20:21
***************
*** 160,165 ****
--- 160,174 ----
  		mba.mba_pba.pba_flags = PCI_FLAGS_IO_ENABLED |
  		    PCI_FLAGS_MEM_ENABLED;
  		config_found(self, &mba.mba_pba, mainbus_print);
+ #if 1
+ 		mba.mba_pba.pba_busname = "pci";
+ 		mba.mba_pba.pba_iot = I386_BUS_SPACE_IO;
+ 		mba.mba_pba.pba_memt = I386_BUS_SPACE_MEM;
+ 		mba.mba_pba.pba_bus = 1; /* XXX ? */
+ 		mba.mba_pba.pba_flags = PCI_FLAGS_IO_ENABLED |
+ 		    PCI_FLAGS_MEM_ENABLED;
+ 		config_found(self, &mba.mba_pba, mainbus_print);
+ #endif
  	}
  #endif