diff options
Diffstat (limited to 'arch/x86_64/src')
| -rw-r--r-- | arch/x86_64/src/memory/paging/page_mapper.cpp | 8 | ||||
| -rw-r--r-- | arch/x86_64/src/memory/paging/page_table.cpp | 22 |
2 files changed, 0 insertions, 30 deletions
diff --git a/arch/x86_64/src/memory/paging/page_mapper.cpp b/arch/x86_64/src/memory/paging/page_mapper.cpp index be4b259..2f2ee6a 100644 --- a/arch/x86_64/src/memory/paging/page_mapper.cpp +++ b/arch/x86_64/src/memory/paging/page_mapper.cpp @@ -9,16 +9,8 @@ namespace teachos::arch::memory::paging auto create_or_get() -> page_table_handle { - static auto initialized = false; static page_table_handle active_handle{reinterpret_cast<page_table *>(PAGE_TABLE_LEVEL_4_ADDRESS), page_table_handle::LEVEL4}; - - if (!initialized) - { - active_handle.initialize_page_tables(); - initialized = true; - } - return active_handle; } diff --git a/arch/x86_64/src/memory/paging/page_table.cpp b/arch/x86_64/src/memory/paging/page_table.cpp index 0121e95..3ad1d54 100644 --- a/arch/x86_64/src/memory/paging/page_table.cpp +++ b/arch/x86_64/src/memory/paging/page_table.cpp @@ -96,28 +96,6 @@ namespace teachos::arch::memory::paging "[Page Table] Attempted to pass nullptr as handle to page table handle method"); } - auto page_table_handle::initialize_page_tables() -> void - { - // TODO: This should be done differently and only once the other methods are working see Rempaing the Kernel - /* - exception_handling::assert(handle_level == page_table_handle::LEVEL4, - "[Page Table] Attempted to initialize a page table of level 3 or lower"); - auto level3_page_table = std::construct_at(reinterpret_cast<page_table *>(&_end_of_image)); - for (std::size_t n = 1; n <= PAGE_TABLE_ENTRY_COUNT; ++n) - { - std::size_t offset = sizeof(page_table) * n; - std::construct_at(reinterpret_cast<page_table *>(&_end_of_image + offset)); - for (std::size_t m = 1; m <= PAGE_TABLE_ENTRY_COUNT; ++m) - { - std::size_t offset = sizeof(page_table) * ((PAGE_TABLE_ENTRY_COUNT * n) + m); - std::construct_at(reinterpret_cast<page_table *>(&_end_of_image + offset)); - } - } - std::size_t const flags = reinterpret_cast<std::size_t>(level3_page_table); - this->operator[](0U) = entry{flags}; - */ - } - auto page_table_handle::zero_entries() -> void { handle->zero_entries(); } auto page_table_handle::is_empty() const -> bool { return handle->is_empty(); } |
