If I understand you correctly, you are trying to dma from a buffer
located on pci device x to a buffer located on pci device y. For each
pci device buffer (x,y) you have a non-paged virtual address obtained
through the normal mechanisms (MmMapIoSpace,) for which you can build an
MDL indicating that the virtual address range in question is non-paged.
MmBuildMdlForNonPagedPool comes to mind. This should avoid any probing
of the data buffer.
And no, what you are trying to do is not, as far as I know, supported
officially in NT.
[On x86 systems you could of course simply use the original physical
address range of device y directly when programming device x to transfer
data from/to device y.]
===========================
Mark Roddy
Consultant, Microsoft DDK MVP
Hollis Technology Solutions
xxxxx@hollistech.com
www.hollistech.com
603-321-1032
-----Original Message-----
From: xxxxx@aja.com
To: “NT Developers Interest List”
Date: Tue, 13 Aug 2002 23:26:59 -0400
Subject: [ntdev] METHOD_OUT_DIRECT: unwanted byte-access caused by
probe-and-lock?
> I have a customer who is trying to use our board’s DMA engine to
> transfer data from our board to his board. I have implemented an IOCTL
> using METHOD_OUT_DIRECT. When the IOCTL is called, the OS probes his
> board’s memory to make sure it is writable. However, the OS seems to
> use
> a byte-access to perform this probe. His board cannot handle
> byte-accesses, and he gets memory corruption.
> At least, it seems like this is what is going on.
> Is there a way to tell the OS that the target memory for this
> operation
> is 32-bit-aligned?
> (Something in the back of my head seems to remember
> FILE_FLAGS_NO_BUFFERING as being associated with 32-bit alignment. I
> could tell him to try adding that flag to his CreateFile call. But
> that
> just sounds crazy.)
> Any ideas? I can always change the method to METHOD_IN_DIRECT, to
> prevent the probe, but I would like to do it the rightr way, if there
> is a
> right way!
> -Dave Taylor
> AJA Video Systems
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@hollistech.com
> To unsubscribe send a blank email to %%email.unsub%%