#include "x86_64/memory/mmu.hpp" #include "x86_64/cpu/registers.hpp" namespace teachos::memory::x86_64 { namespace cpu = cpu::x86_64; auto tlb_flush(linear_address address) -> void { asm volatile("invlpg (%[input])" : /* no output from call */ : [input] "r"(address) : "memory"); } auto tlb_flush_all() -> void { auto current_value = cpu::read_control_register(cpu::control_register::cr3); cpu::write_control_register(cpu::control_register::cr3, current_value); } } // namespace teachos::memory::x86_64