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

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.

Reply to
_teo_icKs_
Loading thread data ...

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

Reply to
_teo_icKs_

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.