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