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