aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/kernel
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-21 13:35:10 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-21 13:35:10 +0000
commit039f12eb2f5785357ab1745201c8d420ab644165 (patch)
treef12202df532c3466c75c1069ab11c8fa36c08dc3 /arch/x86_64/src/kernel
parent552477a12a1163f0f80801b4055dcb5ab3f79e3e (diff)
downloadteachos-039f12eb2f5785357ab1745201c8d420ab644165.tar.xz
teachos-039f12eb2f5785357ab1745201c8d420ab644165.zip
Adding more mapping methods
Diffstat (limited to 'arch/x86_64/src/kernel')
-rw-r--r--arch/x86_64/src/kernel/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86_64/src/kernel/main.cpp b/arch/x86_64/src/kernel/main.cpp
index 88f6329..8e5aa05 100644
--- a/arch/x86_64/src/kernel/main.cpp
+++ b/arch/x86_64/src/kernel/main.cpp
@@ -3,6 +3,7 @@
#include "arch/exception_handling/assert.hpp"
#include "arch/memory/allocator/area_frame_allocator.hpp"
#include "arch/memory/multiboot/reader.hpp"
+#include "arch/memory/paging/page_mapper.hpp"
#include "arch/video/vga/text.hpp"
#include <algorithm>
@@ -28,5 +29,9 @@ namespace teachos::arch::kernel
video::vga::text::write("Allocated Frames", video::vga::text::common_attributes::green_on_black);
video::vga::text::write_number(last_allocated.value().frame_number,
video::vga::text::common_attributes::green_on_black);
+ memory::paging::map_page_to_frame(allocator, memory::paging::virtual_page{0U}, last_allocated.value(), 0U);
+ memory::paging::map_next_free_page_to_frame(allocator, memory::paging::virtual_page{0U}, 0U);
+ memory::paging::identity_map(allocator, last_allocated.value(), 0U);
+ memory::paging::unmap_page(allocator, memory::paging::virtual_page{0U});
}
} // namespace teachos::arch::kernel