Re: Regarding PCIe peek/poke in NetBSD
David Laight <[email protected]> Wed, 5 Jan 2011 17:33:15 +0000
| Newsgroups | gmane.os.netbsd.devel.general |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jan 05, 2011 at 03:18:12PM +0530, Gnanasekar Loganathan wrote: > The only way is the correspoding device driver should give an ioctl > command to do read/write in their address space. The device driver could use a pread()/pwrite() request in order to do the required transfer (taking an offset into the devices PCIe window). This saves a few data copies and much faffing. It also lets the driver use any available PCIe dma master engine to speed up the transfer. Single word PCIe transfers can be a slow way of copying buffers! The DMA engine can issue a single PCIe transaction for (IIRC) 128 bytes, for some slaves [1] these will complete almost as quickly as a single cycle. David [1] I've seen 200+us for a 32bit read from a ppc into an fpga. This is ISA bus speed :-( -- David Laight: [email protected]