Mapping unchached memory with UDD

Philippe Gerum rpm at
Thu Mar 14 15:32:40 CET 2019

Hi Wolfgang,

On 3/14/19 11:38 AM, Wolfgang Grandegger via Xenomai wrote:
> Hello,
> I'm writing a little UDD driver to handling interrupts and shared memory
> to communicate with a co-processor. Is it possible to setup and map a
> "mem_region" for *uncahced* memory. Will it be automatically uncached if
> it's of type UDD_MEM_PHY?

Yep. Such requests is routed to RTDM's iomem mapping helper, which does:

static int mmap_iomem_helper(struct vm_area_struct *vma, phys_addr_t pa)
	pgprot_t prot = PAGE_SHARED;
	unsigned long len;

	len = vma->vm_end - vma->vm_start;
	vma->vm_page_prot = pgprot_noncached(prot);

	return remap_pfn_range(vma, vma->vm_start, pa >> PAGE_SHIFT,
			       len, vma->vm_page_prot);


More information about the Xenomai mailing list