xref: /haiku/src/system/kernel/arch/arm/paging/32bit/ARMVMTranslationMap32Bit.h (revision 220d04022750f40f8bac8f01fa551211e28d04f2)
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_32_BIT_ARM_VM_TRANSLATION_MAP_32_BIT_H
6 #define KERNEL_ARCH_ARM_PAGING_32_BIT_ARM_VM_TRANSLATION_MAP_32_BIT_H
7 
8 
9 #include "paging/ARMVMTranslationMap.h"
10 
11 
12 struct ARMPagingStructures32Bit;
13 
14 
15 struct ARMVMTranslationMap32Bit : ARMVMTranslationMap {
16 								ARMVMTranslationMap32Bit();
17 	virtual						~ARMVMTranslationMap32Bit();
18 
19 			status_t			Init(bool kernel);
20 
21 	virtual	size_t				MaxPagesNeededToMap(addr_t start,
22 									addr_t end) const;
23 
24 	virtual	status_t			Map(addr_t virtualAddress,
25 									phys_addr_t physicalAddress,
26 									uint32 attributes, uint32 memoryType,
27 									vm_page_reservation* reservation);
28 	virtual	status_t			Unmap(addr_t start, addr_t end);
29 
30 	virtual	status_t			UnmapPage(VMArea* area, addr_t address,
31 									bool updatePageQueue);
32 	virtual	void				UnmapPages(VMArea* area, addr_t base,
33 									size_t size, bool updatePageQueue);
34 	virtual	void				UnmapArea(VMArea* area,
35 									bool deletingAddressSpace,
36 									bool ignoreTopCachePageFlags);
37 
38 	virtual	status_t			Query(addr_t virtualAddress,
39 									phys_addr_t* _physicalAddress,
40 									uint32* _flags);
41 	virtual	status_t			QueryInterrupt(addr_t virtualAddress,
42 									phys_addr_t* _physicalAddress,
43 									uint32* _flags);
44 
45 	virtual	status_t			Protect(addr_t base, addr_t top,
46 									uint32 attributes, uint32 memoryType);
47 
48 	virtual	status_t			ClearFlags(addr_t virtualAddress,
49 									uint32 flags);
50 
51 	virtual	bool				ClearAccessedAndModified(
52 									VMArea* area, addr_t address,
53 									bool unmapIfUnaccessed,
54 									bool& _modified);
55 
56 	virtual	ARMPagingStructures* PagingStructures() const;
57 	inline	ARMPagingStructures32Bit* PagingStructures32Bit() const
58 									{ return fPagingStructures; }
59 
60 private:
61 			ARMPagingStructures32Bit* fPagingStructures;
62 };
63 
64 
65 #endif	// KERNEL_ARCH_ARM_PAGING_32_BIT_ARM_VM_TRANSLATION_MAP_32_BIT_H
66