1 /* 2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef KERNEL_ARCH_M68K_PAGING_040_M68K_VM_TRANSLATION_MAP_040_H 6 #define KERNEL_ARCH_M68K_PAGING_040_M68K_VM_TRANSLATION_MAP_040_H 7 8 9 #include "paging/M68KVMTranslationMap.h" 10 11 struct M68KPagingStructures040; 12 13 14 struct M68KVMTranslationMap040 : M68KVMTranslationMap { 15 M68KVMTranslationMap040(); 16 virtual ~M68KVMTranslationMap040(); 17 18 status_t Init(bool kernel); 19 20 virtual size_t MaxPagesNeededToMap(addr_t start, 21 addr_t end) const; 22 23 virtual status_t Map(addr_t virtualAddress, 24 phys_addr_t physicalAddress, 25 uint32 attributes, uint32 memoryType, 26 vm_page_reservation* reservation); 27 virtual status_t Unmap(addr_t start, addr_t end); 28 29 virtual status_t UnmapPage(VMArea* area, addr_t address, 30 bool updatePageQueue); 31 virtual void UnmapPages(VMArea* area, addr_t base, 32 size_t size, bool updatePageQueue); 33 virtual void UnmapArea(VMArea* area, 34 bool deletingAddressSpace, 35 bool ignoreTopCachePageFlags); 36 37 virtual status_t Query(addr_t virtualAddress, 38 phys_addr_t* _physicalAddress, 39 uint32* _flags); 40 virtual status_t QueryInterrupt(addr_t virtualAddress, 41 phys_addr_t* _physicalAddress, 42 uint32* _flags); 43 44 virtual status_t Protect(addr_t base, addr_t top, 45 uint32 attributes, uint32 memoryType); 46 47 virtual status_t ClearFlags(addr_t virtualAddress, 48 uint32 flags); 49 50 virtual bool ClearAccessedAndModified( 51 VMArea* area, addr_t address, 52 bool unmapIfUnaccessed, 53 bool& _modified); 54 55 virtual M68KPagingStructures* PagingStructures() const; 56 inline M68KPagingStructures040* PagingStructures040() const 57 { return fPagingStructures; } 58 59 void* MapperGetPageTableAt( 60 phys_addr_t physicalAddress, 61 bool indirect=false); 62 63 private: 64 M68KPagingStructures040* fPagingStructures; 65 }; 66 67 68 #endif // KERNEL_ARCH_M68K_PAGING_040_M68K_VM_TRANSLATION_MAP_040_H 69