forked from Bananymous/banan-os
Kernel: Add invalidate() to MMU
This commit is contained in:
parent
83eb3dc0cb
commit
c19f4c019a
|
@ -149,6 +149,12 @@ namespace Kernel
|
||||||
s_current = this;
|
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)
|
void MMU::identity_map_page(paddr_t address, flags_t flags)
|
||||||
{
|
{
|
||||||
address &= PAGE_MASK;
|
address &= PAGE_MASK;
|
||||||
|
|
|
@ -43,6 +43,7 @@ namespace Kernel
|
||||||
vaddr_t get_free_page() const;
|
vaddr_t get_free_page() const;
|
||||||
vaddr_t get_free_contiguous_pages(size_t page_count) const;
|
vaddr_t get_free_contiguous_pages(size_t page_count) const;
|
||||||
|
|
||||||
|
void invalidate(vaddr_t);
|
||||||
void load();
|
void load();
|
||||||
|
|
||||||
void lock() const { m_lock.lock(); }
|
void lock() const { m_lock.lock(); }
|
||||||
|
|
Loading…
Reference in New Issue