Kernel: Add invalidate() to MMU

This commit is contained in:
Bananymous
2023-05-28 18:05:30 +03:00
parent 83eb3dc0cb
commit c19f4c019a
2 changed files with 7 additions and 0 deletions

View File

@@ -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;