DMA from FPGA to RAM: Max. physical address - 4GB

Hello,

By calling ReadFile from application, the kernel calls to EvtIoRead callback in the kernel.

This callback is responsible for building the scatter gather list for the DMA initiated (in my case) by FPGA.

My PC has 16GB RAM and runs Windows 7-64.

But it seems the FPGA can “see” up to 4GB.

The buffer is allocated in the application. How can I make it contain pages with physical address < 4GB ?

Thank you,
Z.V

On Aug 2, 2015, at 11:01 AM, xxxxx@gmail.com wrote:

By calling ReadFile from application, the kernel calls to EvtIoRead callback in the kernel.

This callback is responsible for building the scatter gather list for the DMA initiated (in my case) by FPGA.

My PC has 16GB RAM and runs Windows 7-64.

But it seems the FPGA can “see” up to 4GB.

The buffer is allocated in the application. How can I make it contain pages with physical address < 4GB ?

Are you doing ANY reading on these topics before you ask questions? All of this is covered.

You cannot force user-mode allocations to happen below 4GB. Instead, you have to allocate kernel buffers below 4GB and copy the data in and out. When you create the DMA_ADAPTER abstraction (either through WDM or KMDF), if you tell it that your hardware is only capable of 32-bit addressing, then the system will do the allocations and the copies for you.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

On 02-Aug-2015 21:01, xxxxx@gmail.com wrote:

Hello,

By calling ReadFile from application, the kernel calls to EvtIoRead callback in the kernel.
This callback is responsible for building the scatter gather list for the DMA initiated (in my case) by FPGA.
My PC has 16GB RAM and runs Windows 7-64.
But it seems the FPGA can “see” up to 4GB.
The buffer is allocated in the application. How can I make it contain pages with physical address < 4GB ?

How can we know? Basically it should work with all native 64-bit address
devices and with 32-bit devices, using bounce buffers.
Get someone to arrange a code review and debug.

– pa

I’m going to ask again, Mr. Vered: Is this a University project you’re working on, or is it a real, commercial, product you’re building.

I would, ahem, respectfully request that you to do me the courtesy of answering my question this time.

Peter
OSR
@OSRDrivers

Hi Peter,

All my questions concern with real, commercial products.

Tim, Thank you for your help.

Best regards,
Z.V