Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12374

How Can I Use a PCI Device's Memory as System Memory

$
0
0

In Linux, say I have a PCI device that has a large amount of on-board idle memory, and the driver for it is able to effectively communicate with that memory region in a load/store manner. There is a visible memory mapping region when the BAR is properly set, so that if a user program invokes mmap using that BAR address as an input, it can communicate correctly as if it were normal system memory.

My question is, how can I tell the kernel memory manager that this particular BAR space is just normal system memory, such that calls to malloc will also know that it can use this region?

Note: This is kind of the opposite use case for what most people would typically do when they allocate system memory to say a graphics device. I am trying to use a graphics device memory as system RAM whenever possible.


Viewing all articles
Browse latest Browse all 12374

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>