1 /* 2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef KERNEL_ARCH_ARM_PAGING_ARM_PAGING_METHOD_H 6 #define KERNEL_ARCH_ARM_PAGING_ARM_PAGING_METHOD_H 7 8 9 #include <SupportDefs.h> 10 11 12 struct kernel_args; 13 struct VMPhysicalPageMapper; 14 struct VMTranslationMap; 15 16 17 class ARMPagingMethod { 18 public: 19 virtual ~ARMPagingMethod(); 20 21 virtual status_t Init(kernel_args* args, 22 VMPhysicalPageMapper** _physicalPageMapper) 23 = 0; 24 virtual status_t InitPostArea(kernel_args* args) = 0; 25 26 virtual status_t CreateTranslationMap(bool kernel, 27 VMTranslationMap** _map) = 0; 28 29 virtual status_t MapEarly(kernel_args* args, 30 addr_t virtualAddress, 31 phys_addr_t physicalAddress, 32 uint8 attributes, 33 phys_addr_t (*get_free_page)(kernel_args*)) 34 = 0; 35 36 virtual bool IsKernelPageAccessible(addr_t virtualAddress, 37 uint32 protection) = 0; 38 }; 39 40 41 extern ARMPagingMethod* gARMPagingMethod; 42 43 44 #endif // KERNEL_ARCH_ARM_PAGING_ARM_PAGING_METHOD_H 45