1 /* 2 * Copyright 2006-2010, Ingo Weinhold <ingo_weinhold@gmx.de>. 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 #ifndef _KERNEL_GENERIC_VM_PHYSICAL_PAGE_MAPPER_H 6 #define _KERNEL_GENERIC_VM_PHYSICAL_PAGE_MAPPER_H 7 8 9 #include <boot/kernel_args.h> 10 11 12 // flags for generic_get_physical_page() 13 enum { 14 PHYSICAL_PAGE_DONT_WAIT = 0x01 15 }; 16 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 21 typedef status_t (*generic_map_iospace_chunk_func)(addr_t virtualAddress, 22 phys_addr_t physicalAddress, uint32 flags); 23 24 status_t generic_get_physical_page(phys_addr_t pa, addr_t *va, uint32 flags); 25 status_t generic_put_physical_page(addr_t va); 26 status_t generic_vm_physical_page_mapper_init(kernel_args *args, 27 generic_map_iospace_chunk_func mapIOSpaceChunk, addr_t *ioSpaceBase, 28 size_t ioSpaceSize, size_t ioSpaceChunkSize); 29 status_t generic_vm_physical_page_mapper_init_post_area(kernel_args *args); 30 status_t generic_vm_physical_page_mapper_init_post_sem(kernel_args *args); 31 32 #ifdef __cplusplus 33 } 34 #endif 35 36 37 #endif // _KERNEL_GENERIC_VM_PHYSICAL_PAGE_MAPPER_H 38