mmap implementation... (problem with remapping!!)

Mar 24, 2006 1 Replies

Hello,



I have a problem about implementation of mmap for remapping a specific I/O Region.


- mmap kernel routine: if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) return -EINVAL; off = vma->vm_pgoff vm_end - vma->vm_start + off) > len) return -EINVAL; off += start; vma->vm_pgoff = off >> PAGE_SHIFT; /* This is an IO map - tell maydump to skip this VMA */ vma->vm_flags |= VM_IO; /* for PPC arch */ pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE|_PAGE_GUARDED; if (io_remap_page_range(vma->vm_start, off, vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN;



return 0;


In user space I read always 0xFFFFFFFF in these registers after remapping. I think that I made a mistake in this routine but I don't find it. My scope is to remap some registers in userspace on a PPC embedded architecture. I don't have experience about this.



Please, could you help me?



teo_icKs.


Excuse me at all group!. This post is O.T. here.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required