From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 25 06:28:42 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB6C137B401 for ; Fri, 25 Jul 2003 06:28:42 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AF0E43FAF for ; Fri, 25 Jul 2003 06:28:26 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9/8.12.3) with ESMTP id h6PDSOFL074279; Fri, 25 Jul 2003 07:28:24 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 25 Jul 2003 07:27:21 -0600 (MDT) Message-Id: <20030725.072721.13038396.imp@bsdimp.com> To: tlambert2@mindspring.com From: "M. Warner Losh" In-Reply-To: <3F20D014.C421667@mindspring.com> References: <200307242017.29676.glastech@iinet.net.au> <3F20D014.C421667@mindspring.com> X-Mailer: Mew version 2.1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: glastech@iinet.net.au Subject: Re: Probing for devices X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2003 13:28:42 -0000 Geoff Glasson wrote: > I'm trying to port the Linux i810 Direct Rendering Interface ( DRI ) kernel > module to FreeBSD. I have reached the point where the thing compiles, and I > can load it as a kernel module, but it can't find the graphics device. > > Through a process of elimination I have come to the conclusion that once the > AGP kernel module probes and attaches to the i810 graphics device, nothing > else can attach to it. When I read the section on PCI devices it implied ( > to me at least ) that multiple kernel modules should be able to attach to the > same device. I have tried to get it to work without any success. You can't. One device cannot serve two master. The closest you can get is to create a bus device that then other drivers can attach to. The bus device can arbitrate access to the actual hardware. The second closest is if a chip has multiple functions, each of the functions can have their own driver. This is fairly fundamental to most operating systems. Warner