aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-11-01 13:22:02 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-11-01 13:22:02 +0000
commit31e1ac359eb4b84bdd81f768b2de327193976a55 (patch)
tree5cd9653afa4cd79b3c8caf89ff7651010380006a /arch/x86_64/src
parentb38ce5e24222ec97b45e1f87da4a392859947064 (diff)
downloadteachos-31e1ac359eb4b84bdd81f768b2de327193976a55.tar.xz
teachos-31e1ac359eb4b84bdd81f768b2de327193976a55.zip
Remove static page mapper and replace with unique active and inactive page table classes.
Diffstat (limited to 'arch/x86_64/src')
-rw-r--r--arch/x86_64/src/kernel/main.cpp2
-rw-r--r--arch/x86_64/src/memory/paging/active_page_table.cpp (renamed from arch/x86_64/src/memory/paging/page_mapper.cpp)2
-rw-r--r--arch/x86_64/src/memory/paging/inactive_page_table.cpp5
-rw-r--r--arch/x86_64/src/memory/paging/temporary_page.cpp2
4 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86_64/src/kernel/main.cpp b/arch/x86_64/src/kernel/main.cpp
index 22335d1..f1d6496 100644
--- a/arch/x86_64/src/kernel/main.cpp
+++ b/arch/x86_64/src/kernel/main.cpp
@@ -3,7 +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/memory/paging/active_page_table.hpp"
#include "arch/memory/paging/temporary_page.hpp"
#include "arch/video/vga/text.hpp"
diff --git a/arch/x86_64/src/memory/paging/page_mapper.cpp b/arch/x86_64/src/memory/paging/active_page_table.cpp
index 30055e8..38696f8 100644
--- a/arch/x86_64/src/memory/paging/page_mapper.cpp
+++ b/arch/x86_64/src/memory/paging/active_page_table.cpp
@@ -1,4 +1,4 @@
-#include "arch/memory/paging/page_mapper.hpp"
+#include "arch/memory/paging/active_page_table.hpp"
namespace teachos::arch::memory::paging
{
diff --git a/arch/x86_64/src/memory/paging/inactive_page_table.cpp b/arch/x86_64/src/memory/paging/inactive_page_table.cpp
new file mode 100644
index 0000000..1f36aa3
--- /dev/null
+++ b/arch/x86_64/src/memory/paging/inactive_page_table.cpp
@@ -0,0 +1,5 @@
+#include "arch/memory/paging/inactive_page_table.hpp"
+
+namespace teachos::arch::memory::paging
+{
+} // namespace teachos::arch::memory::paging
diff --git a/arch/x86_64/src/memory/paging/temporary_page.cpp b/arch/x86_64/src/memory/paging/temporary_page.cpp
index 4a8f4da..180b4a8 100644
--- a/arch/x86_64/src/memory/paging/temporary_page.cpp
+++ b/arch/x86_64/src/memory/paging/temporary_page.cpp
@@ -27,7 +27,7 @@ namespace teachos::arch::memory::paging
auto temporary_page::zero_entries(active_page_table & active_table) -> void
{
auto frame = allocator.allocate_frame();
- exception_handling::assert(!frame.has_value(), "[Temporary Page] Tiny allocator could not allocate a frame");
+ exception_handling::assert(frame.has_value(), "[Temporary Page] Tiny allocator could not allocate a frame");
page_table_handle handle = map_table_frame(frame.value(), active_table);
handle.zero_entries();