From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 15 07:19:25 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC85D1065672; Wed, 15 Jul 2009 07:19:25 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from www61.your-server.de (www61.your-server.de [213.133.104.61]) by mx1.freebsd.org (Postfix) with ESMTP id 87BBB8FC17; Wed, 15 Jul 2009 07:19:25 +0000 (UTC) (envelope-from nkoch@demig.de) Received: from [217.7.243.216] (helo=firewall.demig.intra) by www61.your-server.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1MQylv-0000Tx-MN; Wed, 15 Jul 2009 09:19:23 +0200 Received: from [192.168.148.72] (ws-pr-3.demig.intra [192.168.148.72]) by firewall.demig.intra (8.14.3/8.14.0) with ESMTP id n6F7IfCF032965; Wed, 15 Jul 2009 09:18:41 +0200 (CEST) (envelope-from nkoch@demig.de) Message-ID: <4A5D82D1.8030608@demig.de> Date: Wed, 15 Jul 2009 07:18:41 +0000 From: Norbert Koch Organization: demig Prozessautomatisierung GmbH User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: John Baldwin References: <4A5B3F1B.3040207@demig.de> <200907140849.51702.jhb@freebsd.org> <4A5CA4AA.6050307@demig.de> <200907141151.29971.jhb@freebsd.org> In-Reply-To: <200907141151.29971.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 192.168.148.235 X-Authenticated-Sender: webmaster@demig.de X-Virus-Scanned: Clear (ClamAV 0.95.1/9569/Wed Jul 15 07:55:56 2009) Cc: freebsd-hackers@freebsd.org Subject: Re: bus device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 07:19:26 -0000 > No. First of all, the PCI bus driver will only allocate resources for direct > children. It simply passes requests up the tree for grandchildren (this is > how ISA devices behind a PCI-ISA bridge request resources). In this case, > you will want to allocate resources for your BAR and your interrupt using > bus_alloc_resource() during your attach routine. You can then either share > the resources directly with your children by returning your resource values > in your own bus_alloc_resource() method (see ppc(4) for an example of this) > or subdivide your resource to make new resources (the easiest way to do this > is probably to create a rman from your resource and then use > rman_reserve_resource() to sub-allocate chunks of that to your children). > For the interrupt resource you can just return your own resource pointer > directly in your bus_alloc_resource() routine. > > Ok, that makes things a bit clearer. Thank you for your help!