1 /* 2 * Copyright 2004-2007, Marcus Overhagen. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef __UTIL_H 6 #define __UTIL_H 7 8 #include <KernelExport.h> 9 10 #ifdef __cplusplus 11 extern "C" { 12 #endif 13 14 area_id alloc_mem(void **virt, phys_addr_t *phy, size_t size, uint32 protection, 15 const char *name); 16 area_id map_mem(void **virt, phys_addr_t phy, size_t size, uint32 protection, 17 const char *name); 18 19 status_t sg_memcpy(const physical_entry *sgTable, int sgCount, const void *data, size_t dataSize); 20 21 void swap_words(void *data, size_t size); 22 23 #ifdef __cplusplus 24 } 25 #endif 26 27 #endif 28