blob: 1663e80be3508f28ce82ecd344aa220affd4c62b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include "arch/memory/cpu/tlb.hpp"
#include "arch/memory/cpu/cr3.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_cr3_register(read_cr3_register()); }
} // namespace teachos::arch::memory::cpu
|