FreeNOS
|
ARM second level page table implementation. More...
#include <ARMSecondTable.h>
Public Member Functions | |
MemoryContext::Result | map (Address virt, Address phys, Memory::Access) |
Map a virtual address to a physical address. More... | |
MemoryContext::Result | unmap (Address virt) |
Remove virtual address mapping. More... | |
MemoryContext::Result | translate (Address virt, Address *phys) const |
Translate virtual address to physical address. More... | |
MemoryContext::Result | access (Address virt, Memory::Access *access) const |
Get Access flags for a virtual address. More... | |
Private Member Functions | |
u32 | flags (Memory::Access access) const |
Convert MemoryAccess to page table flags. More... | |
Private Attributes | |
u32 | m_pages [256] |
Array of second level page table entries. More... | |
ARM second level page table implementation.
Definition at line 39 of file ARMSecondTable.h.
MemoryContext::Result ARMSecondTable::access | ( | Address | virt, |
Memory::Access * | access | ||
) | const |
Get Access flags for a virtual address.
virt | Virtual address to get Access flags for. |
access | MemoryAccess object pointer. |
Definition at line 141 of file ARMSecondTable.cpp.
References Memory::Device, entry, Memory::InnerCached, MemoryContext::InvalidAddress, m_pages, Memory::OuterCached, PAGE2_AP_USER, PAGE2_APX, PAGE2_DEVICE_SHARED, PAGE2_PRESENT, PAGE2_UNCACHED, Memory::Readable, MemoryContext::Success, TABENTRY, Memory::Uncached, Memory::User, and Memory::Writable.
Referenced by ARMFirstTable::access(), flags(), and map().
|
private |
Convert MemoryAccess to page table flags.
access | Memory access flags |
Definition at line 168 of file ARMSecondTable.cpp.
References access(), Memory::Device, Memory::Executable, PAGE2_AP_SYS, PAGE2_AP_USER, PAGE2_APX, PAGE2_CACHE_WRITEBACK, PAGE2_DEVICE_SHARED, PAGE2_NOEXEC, PAGE2_UNCACHED, Memory::Uncached, Memory::User, and Memory::Writable.
Referenced by map().
MemoryContext::Result ARMSecondTable::map | ( | Address | virt, |
Address | phys, | ||
Memory::Access | access | ||
) |
Map a virtual address to a physical address.
virt | Virtual address. |
phys | Physical address. |
access | Memory access flags. |
Definition at line 107 of file ARMSecondTable.cpp.
References access(), MemoryContext::AlreadyExists, Cache::cleanData(), flags(), m_pages, PAGE2_PRESENT, PAGEMASK, MemoryContext::Success, and TABENTRY.
Referenced by ARMFirstTable::map().
MemoryContext::Result ARMSecondTable::translate | ( | Address | virt, |
Address * | phys | ||
) | const |
Translate virtual address to physical address.
virt | Virtual address to lookup as input |
phys | Physical address for output. |
Definition at line 132 of file ARMSecondTable.cpp.
References MemoryContext::InvalidAddress, m_pages, PAGE2_PRESENT, PAGEMASK, MemoryContext::Success, and TABENTRY.
Referenced by ARMFirstTable::releaseRange(), ARMFirstTable::releaseSection(), and ARMFirstTable::translate().
MemoryContext::Result ARMSecondTable::unmap | ( | Address | virt | ) |
Remove virtual address mapping.
virt | Virtual address. |
Definition at line 123 of file ARMSecondTable.cpp.
References Cache::cleanData(), m_pages, PAGE2_NONE, MemoryContext::Success, and TABENTRY.
Referenced by ARMFirstTable::releaseRange(), and ARMFirstTable::unmap().
|
private |
Array of second level page table entries.
Definition at line 99 of file ARMSecondTable.h.
Referenced by access(), map(), translate(), and unmap().