Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jan 2001 00:44:53 -0600
From:      Robert Lipe <robertlipe@usa.net>
To:        Warner Losh <imp@harmony.village.org>
Cc:        "Justin T. Gibbs" <gibbs@scsiguy.com>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: bus_alloc_resource and RF_SHARABLE
Message-ID:  <20010114004453.D20766@rjlhome.sco.com>
In-Reply-To: <200101140356.f0E3uos95880@harmony.village.org>; from imp@harmony.village.org on Sat, Jan 13, 2001 at 08:56:50PM -0700
References:  <200101131529.f0DFTps26367@aslan.scsiguy.com> <200101140356.f0E3uos95880@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010114004453.D20766>