diff options
| author | Fabian Imhof <fabian.imhof@ost.ch> | 2024-10-20 12:17:58 +0000 |
|---|---|---|
| committer | Fabian Imhof <fabian.imhof@ost.ch> | 2024-10-20 12:17:58 +0000 |
| commit | aa0634589cb7d51f57e3e555bb15ebca99bc162e (patch) | |
| tree | fec7e76845a0784bff58ae255bfc68768ad5a2fc /arch/x86_64/include | |
| parent | da2341ec12128d3b4983a67d39aeaf76b1781fa8 (diff) | |
| download | teachos-aa0634589cb7d51f57e3e555bb15ebca99bc162e.tar.xz teachos-aa0634589cb7d51f57e3e555bb15ebca99bc162e.zip | |
document page mapping and entry
Diffstat (limited to 'arch/x86_64/include')
| -rw-r--r-- | arch/x86_64/include/arch/memory/paging/page_entry.hpp | 3 | ||||
| -rw-r--r-- | arch/x86_64/include/arch/memory/paging/page_mapper.hpp | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/arch/x86_64/include/arch/memory/paging/page_entry.hpp b/arch/x86_64/include/arch/memory/paging/page_entry.hpp index 109735d..2d97d77 100644 --- a/arch/x86_64/include/arch/memory/paging/page_entry.hpp +++ b/arch/x86_64/include/arch/memory/paging/page_entry.hpp @@ -59,8 +59,9 @@ namespace teachos::arch::memory::paging * calculate_physical_address() will return the new address instead of the old one. * * @param frame Physical frame that contains the address we want to copy into our underlying std::bitset. + * @param flags Entry flags which will be set on the entry */ - auto set_entry(allocator::physical_frame frame, std::bitset<64U> additional_flags) -> void; + auto set_entry(allocator::physical_frame frame, std::bitset<64U> flags) -> void; /** * @brief Checks if the given std::bitset is a subset or equivalent to the underlying std::bitset, meaning that all diff --git a/arch/x86_64/include/arch/memory/paging/page_mapper.hpp b/arch/x86_64/include/arch/memory/paging/page_mapper.hpp index c82b08c..069161f 100644 --- a/arch/x86_64/include/arch/memory/paging/page_mapper.hpp +++ b/arch/x86_64/include/arch/memory/paging/page_mapper.hpp @@ -34,13 +34,15 @@ namespace teachos::arch::memory::paging auto translate_address(std::size_t virtual_address) -> std::optional<std::size_t>; /** - * @brief TODO + * @brief Maps a virtual page to a physical frame in the page table with the specified flags. * - * @param allocator - * @param page - * @param frame - * @param flags + * @param allocator Reference to the area frame allocator, which is used to allocate frames when a new page table is + * required. + * @param page Reference to the virtual page that is being mapped. + * @param frame The physical frame that the virtual page will be mapped to. + * @param flags A bitset of flags that configure the page table entry for this mapping. */ + auto map_page_to_frame(memory::allocator::area_frame_allocator & allocator, virtual_page const & page, memory::allocator::physical_frame const & frame, entry::bitset flags) -> void; } // namespace teachos::arch::memory::paging |
