aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/memory/cpu/tlb.cpp
blob: bac46b7e5418048ead294b24ee8fca1c16a4fd3e (plain)
1
2
3
4
5
6
7
8
#include "arch/memory/cpu/tlb.hpp"

namespace teachos::arch::memory::cpu
{
  auto tlb_flush(paging::virtual_address address) -> void { asm volatile("invlpg (%0)" ::"r"(address) : "memory"); }

  auto tlb_flush_all() -> void { tlb_flush(PAGE_TABLE_LEVEL_4_ADDRESS); }
}  // namespace teachos::arch::memory::cpu