Probing for devices

M. Warner Losh imp at bsdimp.com
Fri Jul 25 06:28:42 PDT 2003


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


More information about the freebsd-hackers mailing list