Kernel: Add invalidate() to MMU
This commit is contained in:
parent
187bb046aa
commit
3e93dae53c
|
@ -149,6 +149,12 @@ namespace Kernel
|
|||
s_current = this;
|
||||
}
|
||||
|
||||
void MMU::invalidate(vaddr_t vaddr)
|
||||
{
|
||||
ASSERT(this == s_current);
|
||||
asm volatile("invlpg (%0)" :: "r"(vaddr) : "memory");
|
||||
}
|
||||
|
||||
void MMU::identity_map_page(paddr_t address, flags_t flags)
|
||||
{
|
||||
address &= PAGE_MASK;
|
||||
|
|
|
@ -43,6 +43,7 @@ namespace Kernel
|
|||
vaddr_t get_free_page() const;
|
||||
vaddr_t get_free_contiguous_pages(size_t page_count) const;
|
||||
|
||||
void invalidate(vaddr_t);
|
||||
void load();
|
||||
|
||||
void lock() const { m_lock.lock(); }
|
||||
|
|
Loading…
Reference in New Issue