> > A large (and increasing) number of drivers have access to physical DMA.
> > As a result, letting the user bring their own drivers is exactly
> > equivalent to letting them install their own OS.
> Obviously user-provided drivers cannot be allowed to do that directly (but
> they may do it through calls to the framework). However, for user-provided
> drivers I was thinking about devices that the users brings with him. There it
> would be the bus driver (usb, firewire) which does the DMA calls, and the
> actual driver just talks to the bus driver.
> An exception is (I think) pcmcia, which is so "directly" wired to the machine
> that it would do the DMA itself. For this, user drivers will be slower than
> system drivers due to the indirection. But I still like it to be possible for
> the user to use his own drivers. :-)
That's not feasible. Cardbus is basically PCI (with some mods for
hotplugging). The hardware registers controlling the DMA are chip
specific, which means only the driver knows how to program them. The
only thing a framework can provide is support for pinning and DMAable
memory (taking into account physical addressing limitations).
Programming the actual hardware is too specific to be included in a
generic framework. An IOMMU would probably be useable to prevent
arbitrary memory accesses using DMA, but is not available on all
L & L
goa is a state of mind
L4-hurd mailing list