2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
5 #ifndef KERNEL_ARCH_X86_PAGING_X86_PAGING_METHOD_H
6 #define KERNEL_ARCH_X86_PAGING_X86_PAGING_METHOD_H
9 #include <SupportDefs.h>
11 #include <vm/vm_types.h>
15 struct VMPhysicalPageMapper
;
16 struct VMTranslationMap
;
19 class X86PagingMethod
{
21 virtual ~X86PagingMethod();
23 virtual status_t
Init(kernel_args
* args
,
24 VMPhysicalPageMapper
** _physicalPageMapper
)
26 virtual status_t
InitPostArea(kernel_args
* args
) = 0;
28 virtual status_t
CreateTranslationMap(bool kernel
,
29 VMTranslationMap
** _map
) = 0;
31 virtual status_t
MapEarly(kernel_args
* args
,
32 addr_t virtualAddress
,
33 phys_addr_t physicalAddress
,
35 page_num_t (*get_free_page
)(kernel_args
*))
38 virtual bool IsKernelPageAccessible(addr_t virtualAddress
,
39 uint32 protection
) = 0;
43 extern X86PagingMethod
* gX86PagingMethod
;
46 #endif // KERNEL_ARCH_X86_PAGING_X86_PAGING_METHOD_H