From owner-freebsd-new-bus@FreeBSD.ORG Tue Jan 1 04:45:01 2008 Return-Path: Delivered-To: freebsd-new-bus@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A84816A418 for ; Tue, 1 Jan 2008 04:45:01 +0000 (UTC) (envelope-from tiffany.snyder@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.184]) by mx1.freebsd.org (Postfix) with ESMTP id D955A13C448 for ; Tue, 1 Jan 2008 04:45:00 +0000 (UTC) (envelope-from tiffany.snyder@gmail.com) Received: by rv-out-0910.google.com with SMTP id l15so5220282rvb.43 for ; Mon, 31 Dec 2007 20:44:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=zrr4tnaOhlYVhtLORcmo2Sb+O2PPKYWOFyVKznQ1jW8=; b=I7dTwwbY4sJsW3UJwukNcjiJM+UPO2lbhT/bIuPRlKKboT1dxDRHJ/QTiyfaoavqbP4WGIf2VEoW8Ft95n5zAJhw34MqpJvkXh4+FYwcx/UH/J3pGGkWdFzvjXzvCwcgF8nrxwRNyqKH22TBMq7l11f/FKmTrLptfJjHuZyBOMY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=VQ71HFMeyiRif/9X91aYdCh73Vd8a1w8KxX28xmOcWxQzv6atlAXVrsR9Kdc06ehEaGpFq47CMCFqxu0hmbrQs3cx9jU79WvQ5CWCOaftDLbMoX42St58+BpaUD4IrDUGZic7nEJ7dZCEXn7AmuBcTDI/asIivn/VgArvruuV1M= Received: by 10.142.77.11 with SMTP id z11mr3714557wfa.23.1199162699936; Mon, 31 Dec 2007 20:44:59 -0800 (PST) Received: by 10.142.44.7 with HTTP; Mon, 31 Dec 2007 20:44:59 -0800 (PST) Message-ID: Date: Mon, 31 Dec 2007 20:44:59 -0800 From: "Tiffany Snyder" To: "John Baldwin" In-Reply-To: <200712311252.06116.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200712311252.06116.jhb@freebsd.org> Cc: freebsd-new-bus@freebsd.org Subject: Re: Newbus help X-BeenThere: freebsd-new-bus@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD's new-bus architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 04:45:01 -0000 On Dec 31, 2007 9:52 AM, John Baldwin wrote: > > On Saturday 29 December 2007 02:39:41 pm Tiffany Snyder wrote: > > Hi, > > I'm bringing up a system with FreeBSD-6.2 that has 2 Host Bridges. 1 > > host-PCI and the other is host-Hypertransport bridge. Currently only > > the host-PCI bridge gets recognized and cleanly attaches all the > > devices underneath it. The questions are; > > (1) Can you tell or point to a piece of code that adds a second host > > bridge? I assume this get added as a child of nexus > > (2) How do I go about defining bus methods for the host-HT bridge and > > automatically enabling the newbus system to probe and attach child > > devices and bridges below it? Again, pointer to example code is > > welcome. > > Are you using ACPI or a custom BIOS of some sort? Custom BIOS that only sets up the PCI host bridge. SW has to manually bootstrap the HT host bridge, attach and manage resources for all the children below it. Thanks, Tiffany Snyder From owner-freebsd-new-bus@FreeBSD.ORG Tue Jan 1 05:31:41 2008 Return-Path: Delivered-To: freebsd-new-bus@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C946E16A41A; Tue, 1 Jan 2008 05:31:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 8A66F13C45B; Tue, 1 Jan 2008 05:31:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id m015VH3L021495; Mon, 31 Dec 2007 22:31:17 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 31 Dec 2007 22:31:15 -0700 (MST) Message-Id: <20071231.223115.-262812086.imp@bsdimp.com> To: tiffany.snyder@gmail.com From: "M. Warner Losh" In-Reply-To: References: <200712311252.06116.jhb@freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-new-bus@freebsd.org Subject: Re: Newbus help X-BeenThere: freebsd-new-bus@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD's new-bus architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 05:31:41 -0000 In message: "Tiffany Snyder" writes: : On Dec 31, 2007 9:52 AM, John Baldwin wrote: : > : > On Saturday 29 December 2007 02:39:41 pm Tiffany Snyder wrote: : > > Hi, : > > I'm bringing up a system with FreeBSD-6.2 that has 2 Host Bridges. 1 : > > host-PCI and the other is host-Hypertransport bridge. Currently only : > > the host-PCI bridge gets recognized and cleanly attaches all the : > > devices underneath it. The questions are; : > > (1) Can you tell or point to a piece of code that adds a second host : > > bridge? I assume this get added as a child of nexus : > > (2) How do I go about defining bus methods for the host-HT bridge and : > > automatically enabling the newbus system to probe and attach child : > > devices and bridges below it? Again, pointer to example code is : > > welcome. : > : > Are you using ACPI or a custom BIOS of some sort? : : Custom BIOS that only sets up the PCI host bridge. SW has to manually : bootstrap the HT host bridge, attach and manage resources for all the : children below it. FreeBSD's pci bridge driver doesn't do all the things needed to do this. We'd be happy to help you add them to the driver. It is something that's been needed for a while, and blocking on another long-term feature, but something that could be done without it (although less eloquently). Warner From owner-freebsd-new-bus@FreeBSD.ORG Wed Jan 2 18:05:08 2008 Return-Path: Delivered-To: freebsd-new-bus@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D67116A418 for ; Wed, 2 Jan 2008 18:05:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id CB6AC13C468 for ; Wed, 2 Jan 2008 18:05:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8q) with ESMTP id 227032772-1834499 for multiple; Wed, 02 Jan 2008 13:03:06 -0500 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id m02I4kCk018326; Wed, 2 Jan 2008 13:04:56 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: "Tiffany Snyder" Date: Wed, 2 Jan 2008 12:36:40 -0500 User-Agent: KMail/1.9.6 References: <200712311252.06116.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801021236.40320.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 02 Jan 2008 13:04:56 -0500 (EST) X-Virus-Scanned: ClamAV 0.91.2/5343/Wed Jan 2 12:41:01 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-new-bus@freebsd.org Subject: Re: Newbus help X-BeenThere: freebsd-new-bus@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD's new-bus architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 18:05:08 -0000 On Monday 31 December 2007 11:44:59 pm Tiffany Snyder wrote: > On Dec 31, 2007 9:52 AM, John Baldwin wrote: > > > > On Saturday 29 December 2007 02:39:41 pm Tiffany Snyder wrote: > > > Hi, > > > I'm bringing up a system with FreeBSD-6.2 that has 2 Host Bridges. 1 > > > host-PCI and the other is host-Hypertransport bridge. Currently only > > > the host-PCI bridge gets recognized and cleanly attaches all the > > > devices underneath it. The questions are; > > > (1) Can you tell or point to a piece of code that adds a second host > > > bridge? I assume this get added as a child of nexus > > > (2) How do I go about defining bus methods for the host-HT bridge and > > > automatically enabling the newbus system to probe and attach child > > > devices and bridges below it? Again, pointer to example code is > > > welcome. > > > > Are you using ACPI or a custom BIOS of some sort? > > Custom BIOS that only sets up the PCI host bridge. SW has to manually > bootstrap the HT host bridge, attach and manage resources for all the > children below it. Ok. Right now that's not easy to do. I'm working on changing x86 to have a logical platform device to handle the non-ACPI and non-PC-AT cases. Probably this will show up as each platform having its own nexus(4) driver and you can then enumerate platform-specific devices like PCI host bridges in your nexus driver's attach routine. Right now what you'd have to do is create your own 'foo0' that attaches to nexus0 and overrides acpi0 and legacy0 (unfortunately that means hacking legacy0 as it only checks for acpi0 currently). -- John Baldwin