This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to get virtual to physical address

On Keystone2 SoC, Our DDR3 of size 2GB is getting mapped in linux as 880000000 - 8FFFFFFFF - System RAM.

When I allocate 1 MB Buffer using kmalloc , I get the address as 0xebc0_0000,

When I convert virtual address 0xebc0_0000  into into physical address, it is giving 0x2bc0_0000.

I want to receive data from my PCIe FPGA Device into this Buffer 0x2bc0_0000 so I need to tell the FPGA that DDR address for receiving data is 0x2bc0_0000.

But it's not working.  I feel my actual physical address 0x2bc0_0000 is not correct that's I am not getting data at this address.

Can you please tell me if my physical address is correct or not ? If not what is the correct way of calculating the phy address which can be used by FPGA to write data.

Thanking you in advance.

Vijay