aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86_64/src/memory/kernel_mapper.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86_64/src/memory/kernel_mapper.cpp b/arch/x86_64/src/memory/kernel_mapper.cpp
index 50fa325..89b2e83 100644
--- a/arch/x86_64/src/memory/kernel_mapper.cpp
+++ b/arch/x86_64/src/memory/kernel_mapper.cpp
@@ -71,13 +71,15 @@ namespace teachos::memory::x86_64
auto kernel_mapper::map_section(section_header_type const & section, std::string_view name, page_mapper & mapper)
-> void
{
- kstd::println("[x86_64:MEM] mapping {} ({} bytes)", name, section.size);
-
auto number_of_pages = (section.size + (PLATFORM_PAGE_SIZE - 1)) / PLATFORM_PAGE_SIZE;
-
auto linear_start_address = linear_address{section.virtual_load_address};
auto physical_start_address = physical_address{section.virtual_load_address & ~m_kernel_load_base};
+ kstd::println("[x86_64:MEM] mapping {}"
+ "\n {} bytes -> page count: {}"
+ "\n {} @ {}",
+ name, section.size, number_of_pages, linear_start_address, physical_start_address);
+
auto first_page = page::containing(linear_start_address);
auto first_frame = frame::containing(physical_start_address);