diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2025-05-16 13:27:16 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2025-05-16 13:27:16 +0000 |
| commit | 5c314eef566df2732973e8cb35974ec49748adba (patch) | |
| tree | fff3f587c7c5c32fd30362dc92c4b07cc68603e7 /arch/x86_64/src | |
| parent | d4cc546df6eba2dd287785f1a63fbcce4a1b9bc0 (diff) | |
| download | teachos-5c314eef566df2732973e8cb35974ec49748adba.tar.xz teachos-5c314eef566df2732973e8cb35974ec49748adba.zip | |
Fix bug where level 4 to level 2 entries are not mapped user accesible.
Diffstat (limited to 'arch/x86_64/src')
| -rw-r--r-- | arch/x86_64/src/memory/paging/page_entry.cpp | 2 | ||||
| -rw-r--r-- | arch/x86_64/src/user/main.cpp | 16 |
2 files changed, 0 insertions, 18 deletions
diff --git a/arch/x86_64/src/memory/paging/page_entry.cpp b/arch/x86_64/src/memory/paging/page_entry.cpp index a5b44fa..57045ca 100644 --- a/arch/x86_64/src/memory/paging/page_entry.cpp +++ b/arch/x86_64/src/memory/paging/page_entry.cpp @@ -39,8 +39,6 @@ namespace teachos::arch::memory::paging auto entry::set_user_accessible() -> void { flags |= entry::USER_ACCESSIBLE; } - auto entry::set_global() -> void { flags |= entry::GLOBAL; } - auto entry::calculate_pointed_to_frame() const -> std::optional<allocator::physical_frame> { if (contains_flags(PRESENT)) diff --git a/arch/x86_64/src/user/main.cpp b/arch/x86_64/src/user/main.cpp index a435a41..747a8a4 100644 --- a/arch/x86_64/src/user/main.cpp +++ b/arch/x86_64/src/user/main.cpp @@ -6,10 +6,6 @@ #include <algorithm> #include <atomic> -// TODO: Disallow these imports -#include "arch/kernel/cpu/if.hpp" -#include "arch/video/vga/text.hpp" - namespace teachos::arch::user { auto main() -> void @@ -18,8 +14,6 @@ namespace teachos::arch::user context_switching::syscall::syscall(context_switching::syscall::type::WRITE, {reinterpret_cast<uint64_t>(&syscall_message)}); - // kernel::cpu::clear_interrupt_flag(); // Causes crash Kernel Code (.text) is not mapped in User mMde - int test = std::max(5, 10); (void)test; @@ -29,16 +23,6 @@ namespace teachos::arch::user auto address = memory::heap::global_heap_allocator::malloc(8U); (void)address; - // auto test = new int{20}; // Causes crash Heap is not mapped in User Mode - // (void)test; - - // if (!error) - // { - // // Causes crash vga is not mapped in User Mode - // video::vga::text::write("Successfully made a SYSCALL and returned with SYSRETQ!", - // video::vga::text::common_attributes::green_on_black); - // } - for (;;) { } |
