I have a PCIe FPGA device (single function) that has a 2GB RAM mapped via a single 64-bit PCIe BAR of length 2GB.
I would like to make this memory available as /dev/daxX.Y character device so some applications that I already have that work with these character devices can be used. I am thinking of modifying drivers/dax/device.c for my implementation. To test drivers/dax/device.c, I added memmap to my kernel command line and rebooted. I noticed I have /dev/pmem0 of the same length show up. ndctl shows this device. This is obviously of type fsdax. I then ran ndctl create-namespace -mem=devdax on this device which converted it to /dev/daxX.Y. When I ran ndctl that converted from fsdax to devdax, I noticed that the probe routine was called with the base and length as expected. So I am hoping using drivers/dax/device.c is the best way to go to expose my PCIe memory as /dev/daxX.Y. Or maybe there is another option. Thanks a lot in advance, AneeshS
