aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/kapi/memory.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/kapi/memory.cpp
parent886c920b8c943753a56ef4893e074c5754a1aa2d (diff)
downloadteachos-a5ca21e45e9c8ead0b5895771c0b2f3fe3baf96b.tar.xz
teachos-a5ca21e45e9c8ead0b5895771c0b2f3fe3baf96b.zip
x86_64: rework control register access
Diffstat (limited to 'arch/x86_64/src/kapi/memory.cpp')
-rw-r--r--arch/x86_64/src/kapi/memory.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86_64/src/kapi/memory.cpp b/arch/x86_64/src/kapi/memory.cpp
index aa3eb58..4766bb3 100644
--- a/arch/x86_64/src/kapi/memory.cpp
+++ b/arch/x86_64/src/kapi/memory.cpp
@@ -6,6 +6,7 @@
#include "x86_64/boot/boot.hpp"
#include "x86_64/boot/ld.hpp"
+#include "x86_64/cpu/impl/control_registers.hpp"
#include "x86_64/cpu/registers.hpp"
#include "x86_64/memory/region_allocator.hpp"
@@ -48,7 +49,7 @@ namespace teachos::memory
auto enable_cpu_protections() -> void
{
- cpu::x86_64::set_cr0_bit(cpu::x86_64::cr0_flags::WRITE_PROTECT);
+ cpu::x86_64::cr0::clear(cpu::x86_64::cr0::flags::write_protect);
// set_efer_bit(efer_flags::NXE);
}
} // namespace