From owner-freebsd-hackers Sun Jan 14 22:32:26 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from aslan.scsiguy.com (aslan.scsiguy.com [63.229.232.106]) by hub.freebsd.org (Postfix) with ESMTP id 5413337B400 for ; Sun, 14 Jan 2001 22:32:09 -0800 (PST) Received: from scsiguy.com (localhost [127.0.0.1]) by aslan.scsiguy.com (8.11.0/8.9.3) with ESMTP id f0F6Vxs49670; Sun, 14 Jan 2001 23:32:00 -0700 (MST) (envelope-from gibbs@scsiguy.com) Message-Id: <200101150632.f0F6Vxs49670@aslan.scsiguy.com> To: Warner Losh Cc: Robert Lipe , freebsd-hackers@FreeBSD.ORG Subject: Re: bus_alloc_resource and RF_SHARABLE In-Reply-To: Your message of "Sun, 14 Jan 2001 23:24:12 MST." <200101150624.f0F6OCs15404@harmony.village.org> Date: Sun, 14 Jan 2001 23:31:59 -0700 From: "Justin T. Gibbs" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >: Just so I'm completely clear on this though, the intent is that multiple >: bus_alloc_resource calls for a single BAR within a single driver is >: explictly prohibited, right? So if I want to map ONLY the first byte >: and the last byte of, say, a 16MB PCI BAR, I have to map the whole >: thing, use the same resource handle for everything, and give up any >: potential address space/vm protection afforded by having the middle >: unmapped, right? > >Right now BARs can be only mapped once. If you have a physical device >that is serviced by a bunch of sub-devices, you'll need to cope by >providing that functionality in a "bridge" driver. I'm working on >this for my NetBSD puc driver port. Actually, the problem is not that you can only "bus_allocate" a BAR once, but rather that we map that area into KVA auto-magically. We should instead allow the user to perform their own mapping(s) into KVA. You don't need a bridge driver to get this effect. -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message