tech-misc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Regarding PCIe peek/poke in NetBSD



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: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index