Re: Getting same physical address for 2 different user addresses.

Tech-Archive recommends: Fix windows errors by optimizing your registry



saravan <ulskumar@xxxxxxxxx> wrote:

Here we are developing one WDF PCI Expresss Diagnostics Driver.

As per customer requirement we have to allocate buffer in the
appllication for scatter-gather DMA transfer and we have to find out
the physical address of the same buffer in WDF Driver.

We are finding out the physical address using the following method,

IoAllocateMdl => MmProbeAndLockPages => MmMapLockedPagesSpecifyCache
=> MmGetPhysicalAddress

Currently we are allocating two different buffers ie., one for Read
DMA and other for Write DMA.

Here our issue is we are getting the same physical address for two
different user mode buffers.

Can you anyone please explain the reason for this?

My guess, based on this extremely sketchy description, is that you are
passing the address to the kernel using a METHOD_BUFFERED ioctl, so what
you are actually getting is the physical address of the I/O manager's COPY
buffer.
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.



Relevant Pages

  • Re: Passing buffer to a driver
    ... buffer I just allocated and passed to it by XXX_OemIoControl. ... allocate buffer on the stack I don't have this problem. ... on embedded pointers (your buffer is an embedded pointer because is ...
    (microsoft.public.windowsce.platbuilder)
  • Getting same physical address for 2 different user addresses.
    ... Here we are developing one WDF PCI Expresss Diagnostics Driver. ... As per customer requirement we have to allocate buffer in the ... DMA and other for Write DMA. ...
    (microsoft.public.development.device.drivers)
  • Re: How to improve the speed of file by file copy from a ntfs partition?
    ... I know in user mode can use ... But here in kernel mode how to allocate buffer of big size.which ...
    (microsoft.public.development.device.drivers)
  • Re: memory problem
    ... but perhaps your stack doesn't allow you to have ... Perhaps you can allocate buffer with the ... > is there a way around this where i could search direct from the drive ...
    (comp.lang.cpp)