Forum Discussion
How to get physical address in Windows
I need to test PCIe DMA suported by Stratix4GX HardIP. In order to perform DMA transactions from PCIe card to System Memory, I need to request Windows to allocate some memory. In additioin, I need to pass the PHYSICAL address to DMA logic so it can generate cycles to system memory. I am using C programming language and not sure how to do that in Windows XP.
4 Replies
- Altera_Forum
Honored Contributor
Access to physical addresses is reserved to Windows kernel drivers. The Microsoft device driver kit (DDK) has all necessary informations and tools to achieve it.
- Altera_Forum
Honored Contributor
WinDriver has a function "WD_DMALock"
- Altera_Forum
Honored Contributor
Jungo WinDriver has the wizard utility, I am curious if that can be utilized to request a block of physical memory. Though I do not have the windriver wizard utility installed yet. I do see the WinDriver under Jungo in device manager.
I will see how I can utilize the WdDma_Lock function - Altera_Forum
Honored Contributor
Remember that you will either need to have allocated memory that is physically continuous, or allow for physical address discontinuities at page boundaries (assume a 4k page if you don't know the page size).