From 9507633f04e672b3dadf1385b1562fb3101d0ea3 Mon Sep 17 00:00:00 2001 From: Fabian Imhof Date: Tue, 12 Nov 2024 10:41:23 +0000 Subject: add debug statements --- .../include/arch/memory/paging/active_page_table.hpp | 1 + arch/x86_64/src/kernel/main.cpp | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'arch') 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 c5b972b..9931711 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 @@ -214,6 +214,7 @@ namespace teachos::arch::memory::paging allocator.deallocate_frame(frame.value()); } + public: page_table_handle active_handle; ///< Underlying active level 4 page table }; diff --git a/arch/x86_64/src/kernel/main.cpp b/arch/x86_64/src/kernel/main.cpp index 679fb8d..92d277d 100644 --- a/arch/x86_64/src/kernel/main.cpp +++ b/arch/x86_64/src/kernel/main.cpp @@ -25,7 +25,21 @@ namespace teachos::arch::kernel memory::cpu::set_efer_bit(memory::cpu::efer_flags::NXE); memory::paging::kernel_mapper kernel(allocator, memory_information); - kernel.remap_kernel(); + auto & active_table = kernel.remap_kernel(); + auto x = active_table.active_handle.next_table(0); + if (x.has_value()) + { + auto y = x.value().next_table(0); + + if (y.has_value()) + { + auto z = y.value().next_table(0); + if (z.has_value()) + { + } + } + } + video::vga::text::write("Kernel remapping successfull", video::vga::text::common_attributes::green_on_black); video::vga::text::write("Kernel remapping successfull", video::vga::text::common_attributes::green_on_black); // TODO: Map heap virtual pages with active table -- cgit v1.2.3