Answer the question
In order to leave comments, you need to log in
Mapping device memory to userspace?
Hello.
I have an ARM device, it has a hardware block with its own memory available to the CPU.
This memory is physically separate from the system memory, along with the registers of this and other devices.
I wrote a driver that, upon an mmap call on a device file, maps portions of this native memory to the calling process using remap_pfn_range with caching enabled.
The question arose: how to reset / invalidate the CPU cache in the process of exchanging data with the device through this memory.
The DMA API is not suitable because the physical address area through which this memory is accessed is not covered by struct page structures.
I dug into the kernel and did not find a single driver that would map the device's memory to a process with caching enabled.
Do I understand correctly that this is not supported by Linux?
What functions to use if you still need to?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question