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_PAE_X86_VM_TRANSLATION_MAP_PAE_H 6 #define KERNEL_ARCH_X86_PAGING_PAE_X86_VM_TRANSLATION_MAP_PAE_H 7 8 9 #include "paging/X86VMTranslationMap.h" 10 11 12 #if B_HAIKU_PHYSICAL_BITS == 64 13 14 15 struct X86PagingStructuresPAE; 16 17 18 struct X86VMTranslationMapPAE final : X86VMTranslationMap { 19 X86VMTranslationMapPAE(); 20 virtual ~X86VMTranslationMapPAE(); 21 22 status_t Init(bool kernel); 23 24 virtual size_t MaxPagesNeededToMap(addr_t start, 25 addr_t end) const; 26 27 virtual status_t Map(addr_t virtualAddress, 28 phys_addr_t physicalAddress, 29 uint32 attributes, uint32 memoryType, 30 vm_page_reservation* reservation); 31 virtual status_t Unmap(addr_t start, addr_t end); 32 33 virtual status_t DebugMarkRangePresent(addr_t start, addr_t end, 34 bool markPresent); 35 36 virtual status_t UnmapPage(VMArea* area, addr_t address, 37 bool updatePageQueue); 38 virtual void UnmapPages(VMArea* area, addr_t base, 39 size_t size, bool updatePageQueue); 40 virtual void UnmapArea(VMArea* area, 41 bool deletingAddressSpace, 42 bool ignoreTopCachePageFlags); 43 44 virtual status_t Query(addr_t virtualAddress, 45 phys_addr_t* _physicalAddress, 46 uint32* _flags); 47 virtual status_t QueryInterrupt(addr_t virtualAddress, 48 phys_addr_t* _physicalAddress, 49 uint32* _flags); 50 51 virtual status_t Protect(addr_t base, addr_t top, 52 uint32 attributes, uint32 memoryType); 53 54 virtual status_t ClearFlags(addr_t virtualAddress, 55 uint32 flags); 56 57 virtual bool ClearAccessedAndModified( 58 VMArea* area, addr_t address, 59 bool unmapIfUnaccessed, 60 bool& _modified); 61 62 virtual void DebugPrintMappingInfo(addr_t virtualAddress); 63 virtual bool DebugGetReverseMappingInfo( 64 phys_addr_t physicalAddress, 65 ReverseMappingInfoCallback& callback); 66 67 virtual X86PagingStructures* PagingStructures() const; 68 inline X86PagingStructuresPAE* PagingStructuresPAE() const 69 { return fPagingStructures; } 70 71 private: 72 X86PagingStructuresPAE* fPagingStructures; 73 }; 74 75 76 #endif // B_HAIKU_PHYSICAL_BITS == 64 77 78 79 #endif // KERNEL_ARCH_X86_PAGING_PAE_X86_VM_TRANSLATION_MAP_PAE_H 80