19#ifndef __LIBARCH_ARM64_PAGING_H
20#define __LIBARCH_ARM64_PAGING_H
31#define MEM_ATTR_NORMAL 0xff
32#define MEM_ATTR_DEV 0x04
33#define MEM_ATTR_NC 0x44
34#define MAIR_FIELD(val, idx) ((val)<<((idx)<<3))
150 const bool tablesOnly =
false);
ARM64 first level page table.
ARM64 virtual memory implementation.
Address m_kernelBaseAddr
Kernel base address.
virtual Result lookup(Address virt, Address *phys) const
Translate virtual address to physical address.
ARM64FirstTable * m_firstTable
Pointer to the first level page table.
virtual ~ARM64Paging()
Destructor.
Address m_firstTableAddr
Physical address of the first level page table.
virtual Result unmap(Address virt)
Unmap a virtual address.
virtual Result releaseSection(const Memory::Range &range, const bool tablesOnly=false)
Release memory sections.
MemoryContext::Result allocPageTable(Allocator::Range &phys, Allocator::Range &virt)
void setupPageTable(MemoryMap *map, Address firstTableAddress, Address kernelBaseAddress)
Installs default mappings on 1st level page table.
virtual Result activate(bool initializeMMU=false)
Activate the MemoryContext.
virtual Result releaseRange(Memory::Range *range)
Release range of memory.
virtual Result map(Address virt, Address phys, Memory::Access access)
Map a physical page to a virtual address.
virtual Result access(Address virt, Memory::Access *access) const
Get Access flags for a virtual address.
virtual Result initialize()
Initialize the MemoryContext.
Result enableMMU()
Enable the MMU.
Virtual memory abstract interface.
Describes virtual memory map layout.
Allocator which separates kernel mapped memory at virtual and physical addresses.
unsigned long Address
A memory address.
Access
Memory access flags.
Describes a range of memory.