On Thu, May 3, 2018 at 8:54 PM, Mouse <[email protected]> wrote:

> >      There is also the idea of having a module specify the device(s)
> > it handles by vendor:product
>
> Isn't that rather restrictive in what buses it permits supporting?
>
> Indeed, PCI (and close relatives, like PCIe) and USB are the only
> things I can name offhand that even _have_ vendor:product.  (Of course,
> I'm sure there are lots of buses out there I've never heard of, or
> don't know enough about.)
>

FreeBSD's modules have metadata. Some of this metadata can describe "plug
and play" tables the drivers use to match devices. FreeBSD's newbus has a
method to get the textual representation of this "plug and play" data.
Combined, I wrote devmatch to sort through the unattached devices matching
their plug and play data to modules to get a list of modules to load. I'll
be presenting a talk on this at BSDcan next month...

Warner

Reply via email to