btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / system / kernel / arch / x86 / paging / X86PagingMethod.h
blobe80c4c7a142713b55fbc93308571f762db35c66d
1 /*
2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
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>
14 struct kernel_args;
15 struct VMPhysicalPageMapper;
16 struct VMTranslationMap;
19 class X86PagingMethod {
20 public:
21 virtual ~X86PagingMethod();
23 virtual status_t Init(kernel_args* args,
24 VMPhysicalPageMapper** _physicalPageMapper)
25 = 0;
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,
34 uint8 attributes,
35 page_num_t (*get_free_page)(kernel_args*))
36 = 0;
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