aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/memory/mmu.cpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-11-21 14:53:37 +0100
committerFelix Morgner <felix.morgner@ost.ch>2025-11-21 14:53:37 +0100
commita5ca21e45e9c8ead0b5895771c0b2f3fe3baf96b (patch)
treed8cdd8f24d18d46b62a567c1f4fe9be490a54d7e /arch/x86_64/src/memory/mmu.cpp
parent886c920b8c943753a56ef4893e074c5754a1aa2d (diff)
downloadteachos-a5ca21e45e9c8ead0b5895771c0b2f3fe3baf96b.tar.xz
teachos-a5ca21e45e9c8ead0b5895771c0b2f3fe3baf96b.zip
x86_64: rework control register access
Diffstat (limited to 'arch/x86_64/src/memory/mmu.cpp')
-rw-r--r--arch/x86_64/src/memory/mmu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/src/memory/mmu.cpp b/arch/x86_64/src/memory/mmu.cpp
index e573b4e..8ec8a2e 100644
--- a/arch/x86_64/src/memory/mmu.cpp
+++ b/arch/x86_64/src/memory/mmu.cpp
@@ -13,7 +13,7 @@ namespace teachos::memory::x86_64
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);
+ auto paging_root = cpu::cr3::read();
+ cpu::cr3::write(paging_root);
}
} // namespace teachos::memory::x86_64