1/* 2** Copyright 2002-2010, The Haiku Team. All rights reserved. 3** Distributed under the terms of the Haiku License. 4** 5** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. 6** Distributed under the terms of the NewOS License. 7*/ 8#ifndef KERNEL_ARCH_VM_TRANSLATION_MAP_H 9#define KERNEL_ARCH_VM_TRANSLATION_MAP_H 10 11 12#include <vm/VMTranslationMap.h> 13 14 15#ifdef __cplusplus 16extern "C" { 17#endif 18 19status_t arch_vm_translation_map_create_map(bool kernel, 20 VMTranslationMap** _map); 21 22status_t arch_vm_translation_map_init(struct kernel_args *args, 23 VMPhysicalPageMapper** _physicalPageMapper); 24status_t arch_vm_translation_map_init_post_area(struct kernel_args *args); 25status_t arch_vm_translation_map_init_post_sem(struct kernel_args *args); 26 27// Quick function to map a page in regardless of map context. Used in VM 28// initialization before most vm data structures exist. 29status_t arch_vm_translation_map_early_map(struct kernel_args *args, addr_t va, 30 phys_addr_t pa, uint8 attributes, 31 phys_addr_t (*get_free_page)(struct kernel_args *)); 32 33bool arch_vm_translation_map_is_kernel_page_accessible(addr_t virtualAddress, 34 uint32 protection); 35 36#ifdef __cplusplus 37} 38#endif 39 40#include <arch_vm_translation_map.h> 41 42#endif /* KERNEL_ARCH_VM_TRANSLATION_MAP_H */ 43 44