remap_pfn_range() can only map less than 2MB?
static int remap_mmap(struct file *filp, struct vm_area_struct *vma)
{
if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN;
vma->vm_ops = &remap_vm_ops;
return 0;
}
I program a char device driver, and allocate 32M memery in the kernel space. Now I want to map the space to the user space, so I write the upper program. In the end, however, I can only mmap the first 2MB memery, and the space between 2M and 32M is invalid although the program say there is no error. Can anyone help me? Thanks.
|