From owner-freebsd-hackers Sat Jan 13 22:40:29 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rjlhome.sco.com (unknown [207.65.180.181]) by hub.freebsd.org (Postfix) with ESMTP id 63CDC37B400 for ; Sat, 13 Jan 2001 22:40:11 -0800 (PST) Received: by rjlhome.sco.com (8.9.3/SCO5) id AAA22126; Sun, 14 Jan 2001 00:44:53 -0600 (CST) Date: Sun, 14 Jan 2001 00:44:53 -0600 From: Robert Lipe To: Warner Losh Cc: "Justin T. Gibbs" , freebsd-hackers@FreeBSD.ORG Subject: Re: bus_alloc_resource and RF_SHARABLE Message-ID: <20010114004453.D20766@rjlhome.sco.com> References: <200101131529.f0DFTps26367@aslan.scsiguy.com> <200101140356.f0E3uos95880@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <200101140356.f0E3uos95880@harmony.village.org>; from imp@harmony.village.org on Sat, Jan 13, 2001 at 08:56:50PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > In message <200101131529.f0DFTps26367@aslan.scsiguy.com> "Justin T. Gibbs" writes: > : > : RF_SHARABLE requests to share a resource with another device, not > : within the same device. Further, RF_SHARABLE only applies to > : IRQs, not BARs. Warner Losh wrote: > Actaully, the underlying RF_SHARABLE is for any region of resource > that can be multiplexed between different devices. However, in > practice, only IRQs can be shared. And even then the device drive > would only be working around bugs in the bridge drivers that don't > enable sharing. I can't say I gather that from the man page from bus_alloc_resource at all. The restriction of RF_SHAREABLE applying only to IRQs and the exclusive nature of this call (one per BAR) would be helpful to call out in the doc. 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? I can get around this for my needs, but I wanted to be sure that I wasn't just misunderstanding the rules. Thanx for the prompt replies. RJL To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message