aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Imhof <fabian.imhof@ost.ch>2024-11-12 10:41:23 +0000
committerFabian Imhof <fabian.imhof@ost.ch>2024-11-12 10:41:23 +0000
commit9507633f04e672b3dadf1385b1562fb3101d0ea3 (patch)
treebc9acba8ed1ef1ab30f0a72884689ffae59ae509
parent13887617b17d9387e218ce702087b6a7140af9bd (diff)
downloadteachos-9507633f04e672b3dadf1385b1562fb3101d0ea3.tar.xz
teachos-9507633f04e672b3dadf1385b1562fb3101d0ea3.zip
add debug statements
-rw-r--r--arch/x86_64/include/arch/memory/paging/active_page_table.hpp1
-rw-r--r--arch/x86_64/src/kernel/main.cpp16
2 files changed, 16 insertions, 1 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 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