diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-11-10 11:45:26 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-11-10 11:45:26 +0000 |
| commit | 45e7b24f19b3c4557f98996a44d8857d750ca5b3 (patch) | |
| tree | d51c14f091120b30d4354f6e0ab4aeef1b94bc7f /arch/x86_64/src/memory/cpu/tlb.cpp | |
| parent | 0a72135f4a43727b6ee8c9b6e3bbd24b395da638 (diff) | |
| download | kernel-45e7b24f19b3c4557f98996a44d8857d750ca5b3.tar.xz kernel-45e7b24f19b3c4557f98996a44d8857d750ca5b3.zip | |
Adjust comments and constant
Diffstat (limited to 'arch/x86_64/src/memory/cpu/tlb.cpp')
| -rw-r--r-- | arch/x86_64/src/memory/cpu/tlb.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86_64/src/memory/cpu/tlb.cpp b/arch/x86_64/src/memory/cpu/tlb.cpp index 1663e80..591d9fc 100644 --- a/arch/x86_64/src/memory/cpu/tlb.cpp +++ b/arch/x86_64/src/memory/cpu/tlb.cpp @@ -1,6 +1,6 @@ #include "arch/memory/cpu/tlb.hpp" -#include "arch/memory/cpu/cr3.hpp" +#include "arch/memory/cpu/control_register.hpp" namespace teachos::arch::memory::cpu { @@ -9,5 +9,8 @@ namespace teachos::arch::memory::cpu asm volatile("invlpg (%[input])" : /* no output from call */ : [input] "r"(address) : "memory"); } - auto tlb_flush_all() -> void { write_cr3_register(read_cr3_register()); } + auto tlb_flush_all() -> void + { + write_control_register(cpu::control_register::CR3, read_control_register(cpu::control_register::CR3)); + } } // namespace teachos::arch::memory::cpu |
