Writing to persistent memory in PCIe

走远了吗. 提交于 2020-05-29 08:58:49

问题


I want to read and write to a persistant memory(for testing now ddr is connected) in my PCIe device (FPGA) on an Intel Linux system.

The memory is exposed in a particular bar (say bar 2). How to access this persistant memory. I looked into examples in PMDK library, but I couldn't find any.

When I looked into libpmem library I did find mapping api pmem_map_file() but there is no provision to select the bars.

Is it possible to use mmap() call? Currently I am using as shown below to access my bar using the uio driver. Do I need to make any changes to mmmap pmmem memory?

mmap(NULL, 3*1024*1024, PROT_READ | PROT_WRITE, MAP_SHARED, uio_fd0, 2* 4096); 

Can anyone suggest me some ideas about this.

来源:https://stackoverflow.com/questions/61936842/writing-to-persistent-memory-in-pcie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!