aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86_64/include/arch/memory/paging/active_page_table.hpp7
-rw-r--r--arch/x86_64/src/kernel/main.cpp2
2 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86_64/include/arch/memory/paging/active_page_table.hpp b/arch/x86_64/include/arch/memory/paging/active_page_table.hpp
index c7d835a..c5b972b 100644
--- a/arch/x86_64/include/arch/memory/paging/active_page_table.hpp
+++ b/arch/x86_64/include/arch/memory/paging/active_page_table.hpp
@@ -166,8 +166,11 @@ namespace teachos::arch::memory::paging
}
// TODO: Flushing only specifc page does not work and cause temporary_page.map_table_frame to return an invalid
// page table (Memory inside buffer shows nothing)
- cpu::tlb_flush(page.start_address());
- // cpu::tlb_flush_all();
+ // cpu::tlb_flush(page.start_address());
+ // This is the case, because we have unmapped the active page and it is completly invalid, if we only flush one
+ // page, the other pages which are huge still exist in the cache and can therefore still be accessed. But because
+ // they are huge pages the temporary page is not mapped correctly.
+ cpu::tlb_flush_all();
}
private:
diff --git a/arch/x86_64/src/kernel/main.cpp b/arch/x86_64/src/kernel/main.cpp
index f9b252d..679fb8d 100644
--- a/arch/x86_64/src/kernel/main.cpp
+++ b/arch/x86_64/src/kernel/main.cpp
@@ -25,7 +25,7 @@ namespace teachos::arch::kernel
memory::cpu::set_efer_bit(memory::cpu::efer_flags::NXE);
memory::paging::kernel_mapper kernel(allocator, memory_information);
- auto & active_table = kernel.remap_kernel();
+ kernel.remap_kernel();
video::vga::text::write("Kernel remapping successfull", video::vga::text::common_attributes::green_on_black);
// TODO: Map heap virtual pages with active table