From owner-freebsd-hackers Sat Sep 8 23:52:25 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 060FC37B408 for ; Sat, 8 Sep 2001 23:52:23 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f896qL601446; Sun, 9 Sep 2001 00:52:22 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.11.3/8.11.4) with ESMTP id f896qLt02726; Sun, 9 Sep 2001 00:52:21 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200109090652.f896qLt02726@harmony.village.org> To: Bsdguru@aol.com Subject: Re: PCI probe reordering? Cc: hackers@FreeBSD.ORG In-reply-to: Your message of "Sat, 08 Sep 2001 21:49:48 EDT." <146.146a821.28cc24bc@aol.com> References: <146.146a821.28cc24bc@aol.com> Date: Sun, 09 Sep 2001 00:52:21 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <146.146a821.28cc24bc@aol.com> Bsdguru@aol.com writes: : I've encountered a MB that seems to probe devices in a less than desirable : order. There is an onboard fxp controller, but it scans the slots first, so : that the onboard controller is fxp1 if there is another intel card in the : box, for example. : : I want to make the onboard controller fxp0 (since most MBs probe that way and : it makes sense). Where would I have to hack to get Freebsd to probe slots in : reverse order? I truly believe that it would be easier to hack the pci bus code to support wired hints than it would be to hack the probe order and still have things work afterwards. The outline of the hack: hints.fxp.0.at="pci1:10:0" would be how you'd tell the system about it. Then, in the device probe/attachment routine, check to see if the "at" hint, if it exists, matches the bus:device:function you are about to probe. If so, go ahead with the probe/attach. Otherwise bump the child number and go to the "Then" part of this paragraph. This may be a little difficult, because I think that the probing the children is actually pushed down into the bus code... Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message