Hi Ithamar,
Ithamar R. Adema wrote:
I'm debugging some code where mmap() from userland gets back an invalid
address. I traced it down into dma_mmap(), specificly the following
piece of code:
/* Equivalent to: vma->vm_start = vma->vm_pgoff << PAGE_SHIFT; */
ret = remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
user_size << PAGE_SHIFT, vma->vm_page_prot);
When I get in here, vma has the following values:
vm_start: 0xa1140000
vm_end: 0xa1166000
vm_pgoff: 0x00000000
However, when I get out of dma_map() the values are:
vm_start=00000000
vm_end=a1166000
vm_pgoff=00000000
As you can see, the vm_start address has been clobbered. It seems this
is due to the 3 parameter to remap_pfn_range, where vma->vm_pgoff get
passed, whilst the documentation of remap_pfn_page suggests this should
be a physical address of kernel memory....
Is this indeed a bug or could it be a misconfiguration/definition in the
arch that's wrong?
What kernel version is this?
Regards
Greg
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: g...@snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev