aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/arch/memory/paging/page_table.hpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/arch/x86_64/include/arch/memory/paging/page_table.hpp b/arch/x86_64/include/arch/memory/paging/page_table.hpp
index 3a31dc5..9aaaafb 100644
--- a/arch/x86_64/include/arch/memory/paging/page_table.hpp
+++ b/arch/x86_64/include/arch/memory/paging/page_table.hpp
@@ -21,7 +21,9 @@ namespace teachos::arch::memory::paging
struct page_table_handle
{
/**
- * @brief Level of the page table, level 1 will not be able to call next_table anymore, because it would result in
+ * @brief Level of the page table.
+ *
+ * Level 1 will not be able to call next_table anymore, because it would result in
* attempting to access memory that it should not.
*/
enum level : uint8_t
@@ -46,10 +48,11 @@ namespace teachos::arch::memory::paging
auto zero_entries() -> void;
/**
- * @brief Returns the next page table level from the given page table index. Meaning we
- * use an index into a Level 4 page table to get the according Level 3 page table. If this method is called with a
- * Level 1 page table it will instead assert and halt execution, because there is no furthere page table and
- * mangeling up and returning the physical address would cause hard to debug issues.
+ * @brief Returns the next page table level from the given page table index.
+ *
+ * Meaning we use an index into a Level 4 page table to get the according Level 3 page table. If this method is
+ * called with a Level 1 page table it will instead assert and halt execution, because there is no furthere page
+ * table and mangeling up and returning the physical address would cause hard to debug issues.
*
* @param table_index Index of this page table in the page table one level lower.
*/
@@ -64,14 +67,15 @@ namespace teachos::arch::memory::paging
auto operator[](std::size_t index) const -> entry;
/**
- * @brief Decrements the page table handle level enum by one, is defined so we can use it as a replacement for an
- * int index in a range based for loop. Will halt execution if called with page_table_handle::LEVEL1, because there
- * is no level below. Has to be defined as either a friend function or inline header method, because we define an
- * operator of another type. In this instance friend function was choosen, because the struct itself also requires
- * the operator, but declaring before the struct is not possible, because the enum is in the struct. This is
- * inpossible because the struct requires the operator declared before itself to work, and the operator requires the
- * struct declared before itself to work. Furthermore this allows the defintion of the method to be done in the cpp,
- * avoiding includes in the header file.
+ * @brief Decrements the page table handle level enum by one.
+ *
+ * Is defined so we can use it as a replacement for an int index in a range based for loop. Will halt execution if
+ * called with page_table_handle::LEVEL1, because there is no level below. Has to be defined as either a friend
+ * function or inline header method, because we define an operator of another type. In this instance friend function
+ * was choosen, because the struct itself also requires the operator, but declaring before the struct is not
+ * possible, because the enum is in the struct. This is inpossible because the struct requires the operator declared
+ * before itself to work, and the operator requires the struct declared before itself to work. Furthermore this
+ * allows the defintion of the method to be done in the cpp, avoiding includes in the header file.
*
* @param value Value we want to decrement on
* @return level New level value decrement by one, meaning the level is also decrement by one Level4 --> Level3, ...