From owner-freebsd-hackers Sun Jan 14 22:24:39 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from harmony.village.org (rover.village.org [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 524AC37B400 for ; Sun, 14 Jan 2001 22:24:18 -0800 (PST) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.11.1/8.11.1) with ESMTP id f0F6OCs15404; Sun, 14 Jan 2001 23:24:12 -0700 (MST) (envelope-from imp@harmony.village.org) Message-Id: <200101150624.f0F6OCs15404@harmony.village.org> To: Robert Lipe Subject: Re: bus_alloc_resource and RF_SHARABLE Cc: "Justin T. Gibbs" , freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Sun, 14 Jan 2001 00:44:53 CST." <20010114004453.D20766@rjlhome.sco.com> References: <20010114004453.D20766@rjlhome.sco.com> <200101131529.f0DFTps26367@aslan.scsiguy.com> <200101140356.f0E3uos95880@harmony.village.org> Date: Sun, 14 Jan 2001 23:24:12 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20010114004453.D20766@rjlhome.sco.com> Robert Lipe writes: : 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. We should. : 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. Warner P.S. The PUC driver is for serial and parallel pci cards that have a bazillion ways of gluing N 16550A UARTs and M PPCs with 1 or more BARs. The "multiplexing" of the BARs has to happen in the puc layer for sio and ppc attachments to work. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message