xref: /haiku/src/system/kernel/arch/x86/paging/x86_physical_page_mapper.h (revision 5e96d7d537fbec23bad4ae9b4c8e7b02e769f0c6)
1 /*
2  * Copyright 2008-2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef KERNEL_ARCH_X86_PAGING_X86_PHYSICAL_PAGE_MAPPER_H
6 #define KERNEL_ARCH_X86_PAGING_X86_PHYSICAL_PAGE_MAPPER_H
7 
8 
9 #include <vm/VMTranslationMap.h>
10 
11 
12 struct kernel_args;
13 
14 
15 class TranslationMapPhysicalPageMapper {
16 public:
17 	virtual						~TranslationMapPhysicalPageMapper();
18 
19 	virtual	void				Delete() = 0;
20 
21 	virtual	void*				GetPageTableAt(phys_addr_t physicalAddress) = 0;
22 		// Must be invoked with thread pinned to current CPU.
23 };
24 
25 
26 class X86PhysicalPageMapper : public VMPhysicalPageMapper {
27 public:
28 	virtual						~X86PhysicalPageMapper();
29 
30 	virtual	status_t			CreateTranslationMapPhysicalPageMapper(
31 									TranslationMapPhysicalPageMapper** _mapper)
32 										= 0;
33 
34 	virtual	void*				InterruptGetPageTableAt(
35 									phys_addr_t physicalAddress) = 0;
36 };
37 
38 
39 #endif	// KERNEL_ARCH_X86_PAGING_X86_PHYSICAL_PAGE_MAPPER_H
40