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 DebugMarkRangePresent(addr_t start, addr_t end, 31 bool markPresent); 32 33 virtual status_t UnmapPage(VMArea* area, addr_t address, 34 bool updatePageQueue); 35 virtual void UnmapPages(VMArea* area, addr_t base, 36 size_t size, bool updatePageQueue); 37 virtual void UnmapArea(VMArea* area, 38 bool deletingAddressSpace, 39 bool ignoreTopCachePageFlags); 40 41 virtual status_t Query(addr_t virtualAddress, 42 phys_addr_t* _physicalAddress, 43 uint32* _flags); 44 virtual status_t QueryInterrupt(addr_t virtualAddress, 45 phys_addr_t* _physicalAddress, 46 uint32* _flags); 47 48 virtual status_t Protect(addr_t base, addr_t top, 49 uint32 attributes, uint32 memoryType); 50 51 virtual status_t ClearFlags(addr_t virtualAddress, 52 uint32 flags); 53 54 virtual bool ClearAccessedAndModified( 55 VMArea* area, addr_t address, 56 bool unmapIfUnaccessed, 57 bool& _modified); 58 59 virtual ARMPagingStructures* PagingStructures() const; 60 inline ARMPagingStructures32Bit* PagingStructures32Bit() const 61 { return fPagingStructures; } 62 63 private: 64 ARMPagingStructures32Bit* fPagingStructures; 65 }; 66 67 68 #endif // KERNEL_ARCH_ARM_PAGING_32_BIT_ARM_VM_TRANSLATION_MAP_32_BIT_H 69