From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 22:55:36 2010 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 487A01065672 for ; Mon, 5 Jul 2010 22:55:36 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (unknown [IPv6:2001:44b8:7c07:5581:36b8:7bff:fee0:1a08]) by mx1.freebsd.org (Postfix) with ESMTP id 968EA8FC1F for ; Mon, 5 Jul 2010 22:55:35 +0000 (UTC) Received: from ur.dons.net.au (ppp121-45-156-127.lns6.adl6.internode.on.net [121.45.156.127]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id o65MtHC9076300 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 6 Jul 2010 08:25:23 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: Date: Tue, 6 Jul 2010 08:25:17 +0930 Content-Transfer-Encoding: quoted-printable Message-Id: <824CFAF1-A965-4848-A13D-48DA3724EBD1@gsoft.com.au> References: <02DA6157-87CE-47E5-91D0-ED014FB88AD0@gsoft.com.au> To: Christopher Bowman X-Mailer: Apple Mail (2.1081) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org Subject: Re: PCI Express and drivers 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: Mon, 05 Jul 2010 22:55:36 -0000 On 06/07/2010, at 5:32, Christopher Bowman wrote: > If I could, let me ask another question. My device could potential = have up to 6 BARs, that would be mapped into user space. Should I = simply bundle them together in my driver into one contiguous space or = should I make the user perform multiple mmap calls? If I go the = multiple mmap route, how do I match a mmap call to a particular BAR? Do = I use the size of the allocation? Yes, I think you just key off the requested address in the mmap() call. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C