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

internal.h

Go to the documentation of this file.
00001 /* $Id: internal.h,v 1.6 2004/02/18 22:34:12 reuther Exp $ */
00002 /*****************************************************************************/
00011 /* (c) 2003 Technische Universitaet Dresden
00012  * This file is part of DROPS, which is distributed under the terms of the
00013  * GNU General Public License 2. Please see the COPYING file for details.
00014  */
00015 
00020 #ifndef __DDE_LINUX_LIB_INCLUDE_INTERNAL_H_
00021 #define __DDE_LINUX_LIB_INCLUDE_INTERNAL_H_
00022 
00023 #include <l4/util/macros.h>
00024 #include <linux/vmalloc.h>
00025 #include "__config.h"
00026 
00027 /* Address Conversion Helpers */
00028 void address_add_region(l4_addr_t, l4_addr_t, l4_size_t);
00029 void address_remove_region(l4_addr_t, l4_size_t);
00030 
00031 /* Region Handling Helpers */
00032 
00034 struct dde_region
00035 {
00036   l4_addr_t va;            
00037   l4_addr_t pa;            
00038   l4_size_t size;          
00039   struct dde_region *next; 
00040 };
00041 
00053 static inline void dde_add_region(struct dde_region **head,
00054                                   l4_addr_t va, l4_addr_t pa, l4_size_t size)
00055 {
00056   struct dde_region *p = vmalloc(sizeof(struct dde_region));
00057 
00058   p->va = va;
00059   p->pa = pa;
00060   p->size = size;
00061   p->next = *head;
00062 
00063   *head = p;
00064 
00065   LOGd(DEBUG_MSG, "new dde_region [0x%08x, 0x%08x, %d]", va, pa, size);
00066 }
00067 
00083 static inline void dde_remove_region(struct dde_region **head,
00084                                      l4_addr_t va, l4_addr_t pa, l4_size_t size)
00085 {
00086 #if 1
00087   LOGdL(DEBUG_MSG, "not implemented yet");
00088 #else
00089   struct dde_region *p = *head;
00090 
00091   LOGd(DEBUG_MSG, "remove conv_region [0x%08x, %d]", va, size);
00092 #endif
00093 }
00094 
00095 #endif /* !_LIBDDE_INTERNAL_H */

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