On Mon, 12 Apr 1999, Doug Rabson wrote: > On Mon, 12 Apr 1999, Warner Losh wrote: > > > In message <19990412175644.7de5f1...@spinner.netplex.com.au> Peter Wemm > > writes: > > : to being able to use their drivers with less hassles. (There will be > > : enough fun due to differences in bus_space and bus_dma, but that's > > : another issue) > > > > I know that many people would like to see bus_space and bus_dma > > reimported from NetBSD. As far as I know, there is no compelling > > reason to have them be different. > > I don't think there are many differences with bus_space. I don't know > about bus_dma though.
bus_dma is somewhat different. Justin and Jason have done minor celebrity deathmatches over this topic :-)... neither bus_dma nor bus_space are perhaps entirely sufficient in any case. bus_dma doesn't quite carry enough information along with it to correctly know whether the memory object being mapped is another device or memory. It currently can be inferred from the uses of pmap_extract, but information such as hierarchical constraints (address and access size limitations) has no context here. This is also a limitation for NetBSD's bus_dma limitation. There may be pieces missing from bus_space or another interface needs to be there. There's a notion of DMA synchronization to ensure coherent shared views of objects between CPUs and devices, but there isn't a notion of endian-ness and layout to write such objects- this leads devices to have to special case on a per-bus/per-architecture basis. Both of the above restrictions don't cause problems for simple machines like workstation Alphas or i386 boxes (well, it does if you wanted to do, e.g., PCI<>PCI transactions), but cause tremendous heartburn for snything more complex machines. -matt To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-current" in the body of the message