Main Page | Modules | Class List | File List | Class Members | File Members | Related Pages

mmio.c

Go to the documentation of this file.
00001 /* $Id: mmio.c,v 1.5 2003/08/29 10:13:22 ch12 Exp $ */
00002 /*****************************************************************************/
00012 /* (c) 2003 Technische Universitaet Dresden
00013  * This file is part of DROPS, which is distributed under the terms of the
00014  * GNU General Public License 2. Please see the COPYING file for details.
00015  */
00016 
00017 /* L4 */
00018 #include <l4/env/errno.h>
00019 #include <l4/sys/types.h>
00020 
00021 #include <l4/dde_linux/dde.h>
00022 
00023 /* Linux */
00024 #include <linux/mm.h>
00025 
00026 /* local */
00027 #include "__config.h"
00028 
00039 int remap_page_range(unsigned long virt_addr,
00040                      unsigned long phys_addr, unsigned long size, pgprot_t prot)
00041 {
00042   return -ENOMEM;
00043 }
00044 
00045 /* mmap() / remap_page_range() / vm_area_struct.nopage() discussion
00046 
00047    (mostly from Rubini: Linux Device Drivers)
00048 
00049    - logical addresses are not available for high memory. thus kernel functions
00050    that deal with memory are increasingly using pointers to "struct page"
00051    instead.
00052 
00053    - "struct page" includes a "void *virtual" member (low memory is always
00054    mapped high memory not)
00055 
00056      - kernel virtual address of the page or
00057 
00058      - NULL if not mapped
00059 
00060    - virt_to_page() return "struct page" associated to logical address
00061 
00062    - page_address() return virtual addres of "struct page"
00063 
00064    - kmap() return virtual address of any page (if not mapped mapping is done
00065    before return)
00066 
00067    - kunmap() frees special kmap() mappings
00068 
00069    - virtual memory areas (vma) is a higher-level mechanism to handle the way a
00070    process sees its memory
00071 
00072    - a driver that implements mmap() needs to fill a vma structure in the
00073    address space of the process mapping the device
00074 
00075    - "struct vm_area_struct"
00076 
00077    - "struct vm_operations_struct"
00078      ... open/close/unmap/protect/sync/nopage/swapout
00079 
00080    -
00081 
00082  */

Linux DDE, written by Christian Helmuth  © 2003 Technische Universitaet Dresden