#include "arch/kernel/cpu/tlb.hpp" #include "arch/kernel/cpu/control_register.hpp" namespace teachos::arch::memory::cpu { auto tlb_flush(paging::virtual_address address) -> void { asm volatile("invlpg (%[input])" : /* no output from call */ : [input] "r"(address) : "memory"); } auto tlb_flush_all() -> void { write_control_register(cpu::control_register::CR3, read_control_register(cpu::control_register::CR3)); } } // namespace teachos::arch::memory::cpu