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#include <vm/vm_types.h> 12 13 14struct kernel_args; 15struct VMPhysicalPageMapper; 16struct VMTranslationMap; 17 18 19class ARMPagingMethod { 20public: 21 virtual ~ARMPagingMethod(); 22 23 virtual status_t Init(kernel_args* args, 24 VMPhysicalPageMapper** _physicalPageMapper) 25 = 0; 26 virtual status_t InitPostArea(kernel_args* args) = 0; 27 28 virtual status_t CreateTranslationMap(bool kernel, 29 VMTranslationMap** _map) = 0; 30 31 virtual status_t MapEarly(kernel_args* args, 32 addr_t virtualAddress, 33 phys_addr_t physicalAddress, 34 uint8 attributes, 35 page_num_t (*get_free_page)(kernel_args*)) 36 = 0; 37 38 virtual bool IsKernelPageAccessible(addr_t virtualAddress, 39 uint32 protection) = 0; 40}; 41 42 43extern ARMPagingMethod* gARMPagingMethod; 44 45 46#endif // KERNEL_ARCH_ARM_PAGING_ARM_PAGING_METHOD_H 47