diff options
Diffstat (limited to 'arch/x86_64/include')
| -rw-r--r-- | arch/x86_64/include/arch/memory/allocator/tiny_frame_allocator.hpp | 10 | ||||
| -rw-r--r-- | arch/x86_64/include/arch/memory/paging/active_page_table.hpp (renamed from arch/x86_64/include/arch/memory/paging/page_mapper.hpp) | 7 | ||||
| -rw-r--r-- | arch/x86_64/include/arch/memory/paging/inactive_page_table.hpp | 15 | ||||
| -rw-r--r-- | arch/x86_64/include/arch/memory/paging/temporary_page.hpp | 2 |
4 files changed, 20 insertions, 14 deletions
diff --git a/arch/x86_64/include/arch/memory/allocator/tiny_frame_allocator.hpp b/arch/x86_64/include/arch/memory/allocator/tiny_frame_allocator.hpp index 4bcec1c..e55b376 100644 --- a/arch/x86_64/include/arch/memory/allocator/tiny_frame_allocator.hpp +++ b/arch/x86_64/include/arch/memory/allocator/tiny_frame_allocator.hpp @@ -23,16 +23,8 @@ namespace teachos::arch::memory::allocator * entries *when a new page table is required. */ tiny_frame_allocator(area_frame_allocator & allocator) - : frames{} + : frames{allocator.allocate_frame(), allocator.allocate_frame(), allocator.allocate_frame()} { - for (auto & frame : frames) - { - auto temp_frame = allocator.allocate_frame(); - if (temp_frame.has_value()) - { - frame.emplace(temp_frame.value()); - } - } // Nothing to do } diff --git a/arch/x86_64/include/arch/memory/paging/page_mapper.hpp b/arch/x86_64/include/arch/memory/paging/active_page_table.hpp index 20d9afc..8011ee0 100644 --- a/arch/x86_64/include/arch/memory/paging/page_mapper.hpp +++ b/arch/x86_64/include/arch/memory/paging/active_page_table.hpp @@ -1,11 +1,10 @@ -#ifndef TEACHOS_ARCH_X86_64_MEMORY_PAGING_PAGE_MAPPER_HPP -#define TEACHOS_ARCH_X86_64_MEMORY_PAGING_PAGE_MAPPER_HPP +#ifndef TEACHOS_ARCH_X86_64_MEMORY_PAGING_ACTIVE_PAGE_TABLE_HPP +#define TEACHOS_ARCH_X86_64_MEMORY_PAGING_ACTIVE_PAGE_TABLE_HPP #include "arch/exception_handling/assert.hpp" #include "arch/memory/allocator/concept.hpp" #include "arch/memory/paging/virtual_page.hpp" -#include <algorithm> #include <array> #include <optional> @@ -216,4 +215,4 @@ namespace teachos::arch::memory::paging }; } // namespace teachos::arch::memory::paging -#endif // TEACHOS_ARCH_X86_64_MEMORY_PAGING_PAGE_MAPPER_HPP +#endif // TEACHOS_ARCH_X86_64_MEMORY_PAGING_ACTIVE_PAGE_TABLE_HPP diff --git a/arch/x86_64/include/arch/memory/paging/inactive_page_table.hpp b/arch/x86_64/include/arch/memory/paging/inactive_page_table.hpp new file mode 100644 index 0000000..4285fc2 --- /dev/null +++ b/arch/x86_64/include/arch/memory/paging/inactive_page_table.hpp @@ -0,0 +1,15 @@ +#ifndef TEACHOS_ARCH_X86_64_MEMORY_PAGING_INACTIVE_PAGE_TABLE_HPP +#define TEACHOS_ARCH_X86_64_MEMORY_PAGING_INACTIVE_PAGE_TABLE_HPP + +#include "arch/memory/allocator/physical_frame.hpp" + +namespace teachos::arch::memory::paging +{ + struct inactive_page_table + { + private: + allocator::physical_frame page_table_level_4_frame; + }; +} // namespace teachos::arch::memory::paging + +#endif // TEACHOS_ARCH_X86_64_MEMORY_PAGING_INACTIVE_PAGE_TABLE_HPP diff --git a/arch/x86_64/include/arch/memory/paging/temporary_page.hpp b/arch/x86_64/include/arch/memory/paging/temporary_page.hpp index c42745a..b658f7a 100644 --- a/arch/x86_64/include/arch/memory/paging/temporary_page.hpp +++ b/arch/x86_64/include/arch/memory/paging/temporary_page.hpp @@ -3,7 +3,7 @@ #include "arch/memory/allocator/physical_frame.hpp" #include "arch/memory/allocator/tiny_frame_allocator.hpp" -#include "arch/memory/paging/page_mapper.hpp" +#include "arch/memory/paging/active_page_table.hpp" #include "arch/memory/paging/page_table.hpp" #include "arch/memory/paging/virtual_page.hpp" |
