From 6da213d840f07a2921091a6d2fab7efa5ec5cdfa Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sun, 29 Sep 2024 08:03:04 -0400 Subject: enter user mode --- memory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'memory.cpp') diff --git a/memory.cpp b/memory.cpp index 59e2bbe..710701d 100644 --- a/memory.cpp +++ b/memory.cpp @@ -8,7 +8,7 @@ struct PageDirectory static constexpr std::uint32_t NotPresent = 0x2; PageDirectory(): value(NotPresent) {} - PageDirectory(void *addr): value(reinterpret_cast(addr) | 3) {} + PageDirectory(void *addr): value(reinterpret_cast(addr) | 7) {} std::uint32_t value; }; @@ -39,7 +39,7 @@ void memory_initialize() std::uint32_t addr = 0; for (auto& p : pageTable) { - p = addr | 3; // supervisor, r/w, present + p = addr | 7; // supervisor, r/w, present addr += 0x1000; } -- cgit v1.2.3