Skip to main content.
Navigation:
DENX
>
Training2
>
LddMemoryMapping
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
Training2
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
Training2 Home
Changes
Index
Search
Go
List of pages in Training2
Search
%SECTION0{name=LddMemoryMapping}% Memory mapping * allows userspace direct access to device memory * benefits: * avoids buffering: can improve performace * direct access to registers can avoid many =ioctl= * only makes sense in certain circumstances: e.g. _not_ for *stream* oriented devices ---++API: mmap *file operation* <verbatim> int *mmap (struct file *filp, struct vm_area_struct *vma); </verbatim> *build page tables* <verbatim> int remap_pfn_range(struct vm_area_struct *vma, unsigned long virt_addr, unsigned long pfn, unsigned long size, pgprot_t prot); /* identical to above on most plattforms: */ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long virt_addr, unsigned long phys_addr, unsigned long size, pgprot_t prot); </verbatim>
5.3.7. =poll= and =select=
1. Denx Training Topics
5.4. Debugging Techniques
Prev
Home
Next